| 1 |
#version 450 |
| 2 |
|
| 3 |
layout(set = 0, binding = 0) uniform sampler2DShadow uShadow; |
| 4 |
layout(set = 0, binding = 1) uniform texture2D uTexture; |
| 5 |
layout(set = 0, binding = 2) uniform samplerShadow uSampler; |
| 6 |
|
| 7 |
layout(location = 0) in vec3 vUV; |
| 8 |
layout(location = 0) out float FragColor; |
| 9 |
|
| 10 |
float sample_combined() |
| 11 |
{ |
| 12 |
return texture(uShadow, vec3(vUV.xy, vUV.z)); |
| 13 |
} |
| 14 |
|
| 15 |
float sample_separate() |
| 16 |
{ |
| 17 |
return texture(sampler2DShadow(uTexture, uSampler), vec3(vUV.xy, vUV.z)); |
| 18 |
} |
| 19 |
|
| 20 |
void main() |
| 21 |
{ |
| 22 |
FragColor = sample_combined() + sample_separate(); |
| 23 |
} |
| 24 |
|