SPIRV-Cross/reference/shaders/vulkan/frag/combined-texture-sampler-shadow.vk.frag.vk
Hans-Kristian Arntzen 7ab3f3f74e Deal better with CompositeExtract from constant composite.
There is no good reason for applications to emit this kind of code, but
some do. Special case this scenario.
2021-01-22 12:30:16 +01:00

33 lines
768 B
Plaintext

#version 310 es
precision mediump float;
precision highp int;
layout(set = 0, binding = 2) uniform mediump texture2D uDepth;
layout(set = 0, binding = 0) uniform mediump samplerShadow uSampler;
layout(set = 0, binding = 1) uniform mediump sampler uSampler1;
layout(location = 0) out float FragColor;
float samp2(mediump texture2D t, mediump samplerShadow s)
{
return texture(sampler2DShadow(t, s), vec3(vec3(1.0).xy, 1.0));
}
float samp3(mediump texture2D t, mediump sampler s)
{
return texture(sampler2D(t, s), vec2(1.0)).x;
}
float samp(mediump texture2D t, mediump samplerShadow s, mediump sampler s1)
{
float r0 = samp2(t, s);
float r1 = samp3(t, s1);
return r0 + r1;
}
void main()
{
FragColor = samp(uDepth, uSampler, uSampler1);
}