SPIRV-Cross/reference/shaders-hlsl/frag/depth-less-than.frag
Hans-Kristian Arntzen 4e5c8d7199 Deal with depth_greater/depth_less qualifiers.
Adds support on HLSL SM 5.0, and fixes bug on GLSL.
Makes sure early fragment tests is tested on MSL as well.
2018-11-12 10:35:36 +01:00

20 lines
325 B
GLSL

static float gl_FragDepth;
struct SPIRV_Cross_Output
{
float gl_FragDepth : SV_DepthLessEqual;
};
void frag_main()
{
gl_FragDepth = 0.5f;
}
[earlydepthstencil]
SPIRV_Cross_Output main()
{
frag_main();
SPIRV_Cross_Output stage_output;
stage_output.gl_FragDepth = gl_FragDepth;
return stage_output;
}