+ | Texture better coede

This commit is contained in:
TheRedShip
2025-01-28 22:28:35 +01:00
parent ae83d7d9f1
commit 23f2a9a5c6
5 changed files with 5 additions and 9 deletions

View File

@ -113,9 +113,7 @@ vec3 getTextureColor(int texture_index, hitInfo hit)
void calculateLightColor(GPUMaterial mat, hitInfo hit, inout vec3 color, inout vec3 light, inout uint rng_state)
{
if (mat.texture_index != -1)
color *= getTextureColor(mat.texture_index, hit);
color *= mat.texture_index == -1 ? vec3(1.0) : getTextureColor(mat.texture_index, hit);
color *= mat.color;
light += mat.emission * mat.color;
// light += sampleLights(hit.position, rng_state);