From 5c376235878c9a1b014670f6d3768c4433dd0a0d Mon Sep 17 00:00:00 2001 From: rconde01 Date: Sat, 16 Mar 2024 12:59:46 -0400 Subject: [PATCH] reduce max layers per fragment to improve performance on lower end GPUs --- sample/a-buffer/composite.wgsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sample/a-buffer/composite.wgsl b/sample/a-buffer/composite.wgsl index 72604372..ff5aadff 100644 --- a/sample/a-buffer/composite.wgsl +++ b/sample/a-buffer/composite.wgsl @@ -49,7 +49,7 @@ fn main_fs(@builtin(position) position: vec4f) -> @location(0) vec4f { let headsIndex = u32(fragCoords.y - sliceInfo.sliceStartY) * uniforms.targetWidth + u32(fragCoords.x); // The maximum layers we can process for any pixel - const maxLayers = 24u; + const maxLayers = 12u; var layers: array;