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