SPIRV-Cross/shaders-msl/frag/sample-mask-in-and-out.fixed-sample-mask.frag
Tomek Ponitka 18f23c47d9 Enabling setting a fixed sampleMask in Metal fragment shaders.
In Metal render pipelines don't have an option to set a sampleMask
parameter, the only way to get that functionality is to set the
sample_mask output of the fragment shader to this value directly.
We also need to take care to combine the fixed sample mask with the
one that the shader might possibly output.
2020-07-24 11:19:46 +02:00

11 lines
137 B
GLSL

#version 450
layout(location = 0) out vec4 FragColor;
void main()
{
FragColor = vec4(1.0);
gl_SampleMask[0] = gl_SampleMaskIn[0];
}