gpu: add 6GB VRAM mip dropping, 16GB RAM pool caps/OOM recovery, and clear_air +inf clamp

This commit is contained in:
theme613 committed 2026-11-28 13:19:56 +08:00
1 parent 63b902fe17
commit c9067a7d3f
8 files changed
+366 -51

No files matched your search

+7
View File
@@ -327,8 +327,15 @@ void clear_air(uint3 at : SV_DispatchThreadID) {
float far = float(at.z) / float(d);
float cap = air * lerp(dot(cells[CELLS].rgb, LUMA), dot(seen_there, LUMA), far);
float3 c = scattered[at];
uint3 bits = asuint(c);
bool3 bad = (bits & 0x7f800000u) == 0x7f800000u;
bool fixed_any = any(bad);
if (fixed_any) {
c = bad ? (bits == 0x7f800000u ? 64512.0 : 0.0) : c;
}
float has = dot(c, LUMA);
if (has > cap) scattered[at] = c * (cap / has);
else if (fixed_any) scattered[at] = c;
}
#endif