Fix T38439: allow IOR in range [0, inf] instead of [1, inf] in Cycles.

The same can be achieved by flipping normals on the mesh, but it can be
convenient to do this in the shader.
This commit is contained in:
Brecht Van Lommel
2014-02-03 17:06:37 +01:00
parent 8b1731e13d
commit eff3bd4e98
8 changed files with 9 additions and 9 deletions

View File

@@ -22,7 +22,7 @@ shader node_fresnel(
normal Normal = N,
output float Fac = 0.0)
{
float f = max(IOR, 1.0 + 1e-5);
float f = max(IOR, 1e-5);
float eta = backfacing() ? 1.0 / f: f;
float cosi = dot(I, Normal);
Fac = fresnel_dielectric_cos(cosi, eta);