Fix #34679: cycles image texture alpha fringes. New rule is now that color output

will not give straight RGB values if the alpha output is used, so that mixing with
a transparent BSDF gives the correct result.
This commit is contained in:
Brecht Van Lommel
2013-04-05 16:43:53 +00:00
parent eb11b590a8
commit 3863e72c73
4 changed files with 45 additions and 12 deletions

View File

@@ -66,6 +66,9 @@ shader node_environment_texture(
/* todo: use environment for better texture filtering of equirectangular */
Color = (color)texture(filename, p[0], 1.0 - p[1], "wrap", "periodic", "alpha", Alpha);
if (isconnected(Alpha))
Color = color_unpremultiply(Color, Alpha);
if (color_space == "sRGB")
Color = color_srgb_to_scene_linear(Color);
}