~ | Shader hot reloading

This commit is contained in:
TheRedShip
2025-02-14 00:10:46 +01:00
parent 4ddacdaadd
commit 583e15685a
9 changed files with 90 additions and 40 deletions

View File

@ -204,7 +204,7 @@ vec3 pathtrace(Ray ray, inout uint rng_state)
float p = max(color.r, max(color.g, color.b));
if (randomValue(rng_state) >= p) break;
color /= max(p, 0.001);
GPUMaterial mat = materials[hit.mat_index];
calculateLightColor(mat, hit, color, light, rng_state);