~ | Emissive texture working

This commit is contained in:
TheRedShip
2025-02-02 17:10:06 +01:00
parent f03d48e62d
commit 3a70a08ea6
5 changed files with 26 additions and 27 deletions

View File

@ -202,8 +202,8 @@ vec3 pathtrace(Ray ray, inout uint rng_state)
GPUMaterial mat = materials[hit.mat_index];
calculateLightColor(mat, hit, color, light, rng_state);
// if (mat.emission > 0.0 && mat.emission_texture_index == -1)
// break;
if (mat.emission > 0.0 && mat.emission_texture_index == -1)
break;
ray = newRay(hit, ray, rng_state);
ray.inv_direction = 1.0 / ray.direction;