Clear screen to neutral gray

This commit is contained in:
2026-08-09 20:45:36 +01:00
parent a0b7c0672a
commit e206e4647b
2 changed files with 23 additions and 2 deletions
+5 -1
View File
@@ -8,7 +8,8 @@
struct BlitData {
float4 rect; // NDC fit rect: x0, y0, x1, y1
uint selected;
uint pad[3];
uint mode; // 0 = sample texture, 1 = solid background
uint pad[2];
};
[[vk::push_constant]]
@@ -33,5 +34,8 @@ VSOutput main(uint vertexIndex : SV_VertexID) {
[shader("fragment")]
float4 main(VSOutput input) {
if (blit.mode == 1) {
return float4(0.18, 0.18, 0.18, 1.0);
}
return textures[NonUniformResourceIndex(blit.selected)].Sample(input.UV);
}