|
|
|
|
|
|
|
|
|
|
// Evaluate the diffuse part. |
|
|
|
{ |
|
|
|
#ifdef DIFFUSE_LAMBERT_BRDF |
|
|
|
#ifdef LIT_DIFFUSE_LAMBERT_BRDF |
|
|
|
ltcValue = LTCEvaluate(P1, P2, B, _identity3x3); |
|
|
|
#else |
|
|
|
ltcValue = LTCEvaluate(P1, P2, B, preLightData.ltcXformDisneyDiffuse); |
|
|
|
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
#ifndef DIFFUSE_LAMBERT_BRDF |
|
|
|
#ifndef LIT_DIFFUSE_LAMBERT_BRDF |
|
|
|
ltcValue *= preLightData.ltcDisneyDiffuseMagnitude; |
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Evaluate the diffuse part. |
|
|
|
{ |
|
|
|
#ifdef DIFFUSE_LAMBERT_BRDF |
|
|
|
#ifdef LIT_DIFFUSE_LAMBERT_BRDF |
|
|
|
ltcValue = LTCEvaluate(L, V, bsdfData.normalWS, preLightData.NdotV, lightData.twoSided, |
|
|
|
_identity3x3); |
|
|
|
#else |
|
|
|
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
#ifndef DIFFUSE_LAMBERT_BRDF |
|
|
|
#ifndef LIT_DIFFUSE_LAMBERT_BRDF |
|
|
|
ltcValue *= preLightData.ltcDisneyDiffuseMagnitude; |
|
|
|
#endif |
|
|
|
|
|
|
|