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:
@@ -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);
|
||||
|
Reference in New Issue
Block a user