File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change 11float ShadowPCF(vec4 shadowCoord, uint cascadeIndex)
22{
3+ vec3 N = normalize (normal);
4+ vec3 L = normalize (shadowUBO.lightPosition.xyz - worldPos);
5+ float NoL = dot (N, L);
6+
37 ivec2 texDim = textureSize(shadowMap, 0 ).xy;
4- float scale = shadowUBO.pcfScale;
8+
9+ // (1.0 - NoL) allows more blur for vertical surfaces
10+ float scale = shadowUBO.pcfScale + (1.0 - NoL);
511 float dx = scale * 1.0 / float (texDim.x);
612 float dy = scale * 1.0 / float (texDim.y);
713
8- vec3 N = normalize (normal);
9- vec3 L = normalize (shadowUBO.lightPosition.xyz - worldPos);
10- float NoL = dot (N, L);
1114 float bias = max (shadowUBO.shadowMaxBias * (1.0 - NoL), shadowUBO.shadowMinBias);
1215
1316 // TODO Find out a better blurring technique concerning multiple shadow maps
You can’t perform that action at this time.
0 commit comments