Better shader org, prep for gi

This commit is contained in:
2026-09-21 23:12:26 +02:00
parent a332ac08ed
commit e673c6dc0d
17 changed files with 1323 additions and 1625 deletions
+8 -2
View File
@@ -620,14 +620,20 @@ where
structure_pool[overwritten_element].pointers[i] =
select(u32(0), u32(1)<<31, (structure_nodes[index].pointers[i] >> 31) != 0);
var bit = u32(1);
if(i % ({children_count} / 2) != 0)
{{
bit = u32(u32(1) << u32(i % ({children_count} / 2)));
}}
let turn_on_bit =
select(
u32(0),
u32(u32(1) << u32(i % ({children_count} / 2))),
bit,
((structure_nodes[index].pointers[i] >> 30) & 1) != 0
);
if(i > {children_count} / 2)
if(i >= {children_count} / 2)
{{
occupancy_high |= turn_on_bit;
}}else