SPIRV-Cross/reference/shaders/asm/frag/sample-and-compare.asm.frag
Hans-Kristian Arntzen a4ac27546a MSL: Fix textures which are sampled and compared against.
depth2d in MSL only returns float, not float4, even for normal sampling.
We need to conditionally remap-swizzle back to float4.
2019-02-22 12:27:40 +01:00

14 lines
446 B
GLSL

#version 450
uniform sampler2D SPIRV_Cross_Combinedg_Textureg_Sampler;
uniform sampler2DShadow SPIRV_Cross_Combinedg_Textureg_CompareSampler;
layout(location = 0) in vec2 in_var_TEXCOORD0;
layout(location = 0) out float out_var_SV_Target;
void main()
{
out_var_SV_Target = texture(SPIRV_Cross_Combinedg_Textureg_Sampler, in_var_TEXCOORD0).x + textureLod(SPIRV_Cross_Combinedg_Textureg_CompareSampler, vec3(in_var_TEXCOORD0, 0.5), 0.0);
}