skyline/app/src/main/shaders/clear.frag
Billy Laws 13a96c5aba Implement a helper shader for partial clears
These are not natively supported by Vulkan, so use a helper shader and colorWriteMask for the same behaviour.
2022-11-19 12:49:05 +00:00

18 lines
268 B
GLSL

#version 460
layout (location = 0) out vec4 colour;
layout (push_constant) uniform constants {
vec4 colour;
bool clearDepth;
float depth;
} PC;
void main()
{
if (PC.clearDepth)
gl_FragDepth = PC.depth;
else
colour = PC.colour;
}