|
|
|
|
|
|
// It can be accomplished by reading the stencil buffer. |
|
|
|
// A faster solution (which avoids an extra texture fetch) is to simply make sure that |
|
|
|
// all pixels which belong to an SSS material are not black (those that don't always are). |
|
|
|
// We choose the blue color channel since it's perceptually the least noticeable. |
|
|
|
subsurfaceLighting.r = max(subsurfaceLighting.r, HALF_MIN); |
|
|
|
subsurfaceLighting.b = max(subsurfaceLighting.b, HALF_MIN); |
|
|
|
return subsurfaceLighting; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
return subsurfaceLighting.r > 0; |
|
|
|
return subsurfaceLighting.b > 0; |
|
|
|
} |
|
|
|
|
|
|
|
// MACRO from Legacy Untiy |
|
|
|