mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-13 17:30:51 +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);
|
||||
vec3 Fr = D * F * Vis;
|
||||
|
||||
#if CAPTURING == true
|
||||
return mix(Fd + Fr,surface.f0,surface.metalness);
|
||||
#ifdef CAPTURING
|
||||
return saturate(mix(Fd + Fr,surface.f0,surface.metalness));
|
||||
#else
|
||||
return Fd + Fr;
|
||||
return saturate(Fd + Fr);
|
||||
#endif
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -220,10 +220,10 @@ float3 evaluateStandardBRDF(Surface surface, SurfaceToLight surfaceToLight)
|
|||
float D = D_GGX(surfaceToLight.NdotH, surface.linearRoughnessSq);
|
||||
float3 Fr = D * F * Vis;
|
||||
|
||||
#if CAPTURING == true
|
||||
return lerp(Fd + Fr,surface.f0,surface.metalness);
|
||||
#ifdef CAPTURING
|
||||
return saturate(lerp(Fd + Fr,surface.f0,surface.metalness));
|
||||
#else
|
||||
return Fd + Fr;
|
||||
return saturate(Fd + Fr);
|
||||
#endif
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue