Debian Codegraph @

third_party/spirv-cross/shaders-msl/frag/sample-depth-separate-image-sampler.frag

raw
1 #version 450
2
3 layout(set = 0, binding = 0) uniform texture2D uDepth;
4 layout(set = 0, binding = 1) uniform texture2D uColor;
5 layout(set = 0, binding = 2) uniform sampler uSampler;
6 layout(set = 0, binding = 3) uniform samplerShadow uSamplerShadow;
7 layout(location = 0) out float FragColor;
8
9 float sample_depth_from_function(texture2D uT, samplerShadow uS)
10 {
11 return texture(sampler2DShadow(uT, uS), vec3(0.5));
12 }
13
14 float sample_color_from_function(texture2D uT, sampler uS)
15 {
16 return texture(sampler2D(uT, uS), vec2(0.5)).x;
17 }
18
19 void main()
20 {
21 FragColor = sample_depth_from_function(uDepth, uSamplerShadow) + sample_color_from_function(uColor, uSampler);
22 }