2017-12-03 11:19:13 +01:00
|
|
|
#version 450
|
|
|
|
|
2017-12-13 14:21:42 +01:00
|
|
|
#include "compiled.glsl"
|
|
|
|
#include "std/gbuffer.glsl"
|
2017-12-03 11:19:13 +01:00
|
|
|
|
|
|
|
uniform sampler2D shadowMap;
|
|
|
|
|
|
|
|
in vec2 texCoord;
|
|
|
|
out float fragColor;
|
|
|
|
|
|
|
|
uniform vec2 step;
|
|
|
|
|
|
|
|
void main() {
|
|
|
|
fragColor = 1.0;
|
|
|
|
const vec2 smStep = 1.0 / shadowmapSize;
|
|
|
|
for (int i = -20 * penumbraScale; i < 20 * penumbraScale; i++) fragColor = min(fragColor, texture(shadowMap, texCoord.xy + step * smStep * i).r);
|
|
|
|
}
|