prepare for deferred clears

This commit is contained in:
Samuliak
2024-05-24 14:16:42 +02:00
committed by Evan Husted
parent 084b75a398
commit 016df3b050
2 changed files with 77 additions and 15 deletions

View File

@@ -11,8 +11,7 @@ struct FragmentOut {
uint stencil [[stencil]];
};
vertex VertexOut vertexMain(ushort vid [[vertex_id]])
{
vertex VertexOut vertexMain(ushort vid [[vertex_id]]) {
int low = vid & 1;
int high = vid >> 1;
@@ -27,11 +26,10 @@ vertex VertexOut vertexMain(ushort vid [[vertex_id]])
}
fragment FragmentOut fragmentMain(VertexOut in [[stage_in]],
constant float& clear_color [[buffer(0)]])
{
constant float& clear_depth [[buffer(0)]]) {
FragmentOut out;
out.depth = clear_color;
out.depth = clear_depth;
// out.stencil = stencil_clear;
return out;