Cycles: Add an interpolation option to environment textures

This commit exposes the interpolation parameter for environment textures (requested by DolpheenDream on IRC), just as it already is for image textures.

Reviewers: sergey

Differential Revision: https://developer.blender.org/D1544
This commit is contained in:
Lukas Stockner
2015-10-08 03:31:15 +02:00
parent 3ab5075cf9
commit e3abcd6723
7 changed files with 61 additions and 54 deletions

View File

@@ -45,6 +45,7 @@ shader node_environment_texture(
vector Vector = P,
string filename = "",
string projection = "Equirectangular",
string interpolation = "linear",
string color_space = "sRGB",
int is_float = 1,
int use_alpha = 1,
@@ -64,7 +65,7 @@ shader node_environment_texture(
p = environment_texture_direction_to_mirrorball(p);
/* todo: use environment for better texture filtering of equirectangular */
Color = (color)texture(filename, p[0], 1.0 - p[1], "wrap", "periodic", "alpha", Alpha);
Color = (color)texture(filename, p[0], 1.0 - p[1], "wrap", "periodic", "interp", interpolation, "alpha", Alpha);
if (use_alpha) {
Color = color_unpremultiply(Color, Alpha);