1234567891011121314 |
- #version 430
- layout (binding = 0) uniform sampler2D depthSamp;
- in vec4 varShadowPosition;
- out vec4 color;
- void main(void) {
- vec3 pos = varShadowPosition.xyz / varShadowPosition.w;
- float shadow = float(texture(depthSamp, pos.xy).r + 0.000001 > pos.z);
- shadow = shadow * 0.6 + 0.4;
- color = vec4(0.8, 0.8, 0.8, 1.0) * shadow;
- }
|