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:
AzaezelX 2020-11-13 15:19:50 -06:00
parent 2d18d5b280
commit c0b6007b9f
2 changed files with 6 additions and 6 deletions

View file

@ -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
}

View file

@ -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
}