+ | Russian roulette was the problem

This commit is contained in:
TheRedShip
2025-01-07 10:16:40 +01:00
parent 56d3a1394b
commit 34be8433f7
4 changed files with 15 additions and 15 deletions

View File

@ -105,10 +105,10 @@ vec3 pathtrace(Ray ray, inout uint rng_state)
GPUMaterial mat = materials[obj.mat_index];
// RR
float p = max(color.r, max(color.g, color.b));
if (randomValue(rng_state) > p)
break;
color /= p;
// float p = max(color.r, max(color.g, color.b));
// if (randomValue(rng_state) > p && i > 1)
// break;
// color /= p;
//
color *= mat.color;