50dce10c5d
This extension provides a new operation which causes a fragment to be discarded without terminating the fragment shader invocation. The invocation for the discarded fragment becomes a helper invocation, so that derivatives will remain defined. The old `HelperInvocation` builtin becomes undefined when this occurs, so a second new instruction queries the current helper invocation status. This is only fully supported for GLSL. HLSL doesn't support the `IsHelperInvocation` operation and MSL doesn't support the `DemoteToHelperInvocation` op. Fixes #1052.
10 lines
68 B
GLSL
10 lines
68 B
GLSL
void frag_main()
|
|
{
|
|
discard;
|
|
}
|
|
|
|
void main()
|
|
{
|
|
frag_main();
|
|
}
|