|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
// Returns the modified albedo (diffuse color) for materials with subsurface scattering. |
|
|
|
// Ref: Advanced Techniques for Realistic Real-Time Skin Rendering. |
|
|
|
float3 ApplyDiffuseTexturingMode(BSDFData bsdfData) |
|
|
|
|
|
|
#ifdef WANT_SSS_CODE |
|
|
|
if (bsdfData.materialId == MATERIALID_LIT_SSS) |
|
|
|
{ |
|
|
|
#if defined(SHADERPASS) && (SHADERPASS == SHADERPASS_SUBSURFACE_SCATTERING) |
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
#endif |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
// For image based lighting, a part of the BSDF is pre-integrated. |
|
|
|
// This is done both for specular and diffuse (in case of DisneyDiffuse) |
|
|
|