mirror of
https://github.com/KhronosGroup/SPIRV-Cross.git
synced 2024-11-14 16:01:07 +00:00
248e9ae9ed
Fragment shaders that require explicit early fragment tests are incompatible with specifying depth and stencil values within the shader. If explicit early fragment tests is specified, remove the depth and stencil outputs from the output structure, and replace them with dummy local variables. Add CompilerMSL:uses_explicit_early_fragment_test() function to consolidate testing for whether early fragment tests are required. Add two unit tests for depth-out with, and without, early fragment tests.
11 lines
204 B
GLSL
11 lines
204 B
GLSL
#version 430
|
|
layout(depth_less) out float gl_FragDepth;
|
|
|
|
layout(location = 0) out vec4 color_out;
|
|
|
|
void main()
|
|
{
|
|
color_out = vec4(1.0, 0.0, 0.0, 1.0);
|
|
gl_FragDepth = 0.699999988079071044921875;
|
|
}
|