mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-16 00:54:54 +00:00
undefined preprocessors on some machines eval to true. given this is purely a bool anyway, might as well stick to ifdef
This commit is contained in:
parent
2d18d5b280
commit
c0b6007b9f
2 changed files with 6 additions and 6 deletions
|
|
@ -219,10 +219,10 @@ vec3 evaluateStandardBRDF(Surface surface, SurfaceToLight surfaceToLight)
|
||||||
float D = D_GGX(surfaceToLight.NdotH, surface.linearRoughnessSq);
|
float D = D_GGX(surfaceToLight.NdotH, surface.linearRoughnessSq);
|
||||||
vec3 Fr = D * F * Vis;
|
vec3 Fr = D * F * Vis;
|
||||||
|
|
||||||
#if CAPTURING == true
|
#ifdef CAPTURING
|
||||||
return mix(Fd + Fr,surface.f0,surface.metalness);
|
return saturate(mix(Fd + Fr,surface.f0,surface.metalness));
|
||||||
#else
|
#else
|
||||||
return Fd + Fr;
|
return saturate(Fd + Fr);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -220,10 +220,10 @@ float3 evaluateStandardBRDF(Surface surface, SurfaceToLight surfaceToLight)
|
||||||
float D = D_GGX(surfaceToLight.NdotH, surface.linearRoughnessSq);
|
float D = D_GGX(surfaceToLight.NdotH, surface.linearRoughnessSq);
|
||||||
float3 Fr = D * F * Vis;
|
float3 Fr = D * F * Vis;
|
||||||
|
|
||||||
#if CAPTURING == true
|
#ifdef CAPTURING
|
||||||
return lerp(Fd + Fr,surface.f0,surface.metalness);
|
return saturate(lerp(Fd + Fr,surface.f0,surface.metalness));
|
||||||
#else
|
#else
|
||||||
return Fd + Fr;
|
return saturate(Fd + Fr);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue