Updated shadow shaders
This commit is contained in:
parent
13f28d6bdb
commit
73c5a0ff4a
|
@ -83,7 +83,7 @@ float CalcShadowValue (sampler2D shadowMap, vec4 worldSpaceFragPos, mat4 lightPV
|
||||||
return 0.0f;
|
return 0.0f;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return 0.3f;
|
return 1.0f;
|
||||||
// return step (fragPosLightPOV.z, );
|
// return step (fragPosLightPOV.z, );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Binary file not shown.
|
@ -7,6 +7,12 @@ layout(location = 0) out vec4 shadowMap;
|
||||||
|
|
||||||
void main()
|
void main()
|
||||||
{
|
{
|
||||||
|
float depth = gl_FragCoord.z;
|
||||||
|
|
||||||
|
float dx = dFdx(depth);
|
||||||
|
float dy = dFdy(depth);
|
||||||
|
|
||||||
|
float moment2 = depth * depth + 0.25f * (dx * dx + dy * dy);
|
||||||
// shadowMap = vec4 (0.0f, 0.0f, gl_FragCoord.z, 1.0f);
|
// shadowMap = vec4 (0.0f, 0.0f, gl_FragCoord.z, 1.0f);
|
||||||
shadowMap = vec4 (gl_FragCoord.z, gl_FragCoord.z * gl_FragCoord.z, 0.0f, 1.0f);
|
shadowMap = vec4 (gl_FragCoord.z, moment2, 0.0f, 1.0f);
|
||||||
}
|
}
|
Binary file not shown.
Loading…
Reference in New Issue