|
|
|
|
|
|
{ |
|
|
|
// Reverse the normal. |
|
|
|
illuminance = saturate(dot(-bsdfData.normalWS, L)); |
|
|
|
// For low thickness, we can reuse the shadowing status for the back of the object. |
|
|
|
shadow = (bsdfData.thickness <= SSS_LOW_THICKNESS) ? shadow : 1; |
|
|
|
illuminance *= shadow * cookie.a; |
|
|
|
|
|
|
|
|
|
|
{ |
|
|
|
// Reverse the normal. |
|
|
|
illuminance = saturate(dot(-bsdfData.normalWS, L)) * attenuation; |
|
|
|
// For low thickness, we can reuse the shadowing status for the back of the object. |
|
|
|
shadow = (bsdfData.thickness <= SSS_LOW_THICKNESS) ? shadow : 1; |
|
|
|
illuminance *= shadow * cookie.a; |
|
|
|
|
|
|
|
|
|
|
{ |
|
|
|
// Reverse the normal. |
|
|
|
illuminance = saturate(dot(-bsdfData.normalWS, L) * clipFactor); |
|
|
|
// For low thickness, we can reuse the shadowing status for the back of the object. |
|
|
|
shadow = (bsdfData.thickness <= SSS_LOW_THICKNESS) ? shadow : 1; |
|
|
|
illuminance *= shadow * cookie.a; |
|
|
|
|
|
|
|