Fix ssrs
This commit is contained in:
parent
cc8b74f3a9
commit
368a9a37b3
|
@ -320,6 +320,15 @@ void main() {
|
|||
if (dotNL > 0.0) svisibility = max(0, 1.0 - traceShadow(voxels, voxpos, l, 0.1, 10.0, n));
|
||||
#endif
|
||||
|
||||
#ifdef _SSRS
|
||||
float tvis = traceShadowSS(-sunDir, p, gbufferD, invVP, eye);
|
||||
// vec2 coords = getProjectedCoord(hitCoord);
|
||||
// vec2 deltaCoords = abs(vec2(0.5, 0.5) - coords.xy);
|
||||
// float screenEdgeFactor = clamp(1.0 - (deltaCoords.x + deltaCoords.y), 0.0, 1.0);
|
||||
// tvis *= screenEdgeFactor;
|
||||
svisibility *= tvis;
|
||||
#endif
|
||||
|
||||
fragColor.rgb += sdirect * svisibility * sunCol;
|
||||
#endif
|
||||
|
||||
|
@ -348,15 +357,6 @@ void main() {
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef _SSRS
|
||||
float tvis = traceShadowSS(-l, p, gbufferD, invVP, eye);
|
||||
// vec2 coords = getProjectedCoord(hitCoord);
|
||||
// vec2 deltaCoords = abs(vec2(0.5, 0.5) - coords.xy);
|
||||
// float screenEdgeFactor = clamp(1.0 - (deltaCoords.x + deltaCoords.y), 0.0, 1.0);
|
||||
// tvis *= screenEdgeFactor;
|
||||
visibility *= tvis;
|
||||
#endif
|
||||
|
||||
#ifdef _Clusters
|
||||
|
||||
float depthl = linearize(depth * 0.5 + 0.5, cameraProj);
|
||||
|
|
Loading…
Reference in a new issue