mirror of
https://github.com/TheRedShip/RT_GPU.git
synced 2025-09-27 10:48:34 +02:00
+ | Russian roulette was the problem
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user