~ | Fixing path

This commit is contained in:
TheRedShip
2025-02-22 17:51:59 +01:00
parent f3fe25b6b1
commit d7b33309d8
4 changed files with 5 additions and 5 deletions

View File

@ -246,7 +246,7 @@ hitInfo traverseBVHs(Ray ray, inout Stats stats)
hitInfo temp_hit = traceBVH(transformedRay, BvhData[i], stats);
float transformed_t = temp_hit.t / bvh_data.scale;
float transformed_t = temp_hit.t * (1.0 / bvh_data.scale);
if (transformed_t < hit.t)
{
GPUTriangle triangle = triangles[temp_hit.obj_index];
@ -322,8 +322,8 @@ void main()
if (pixel_coords.x >= int(u_resolution.x) || pixel_coords.y >= int(u_resolution.y))
return;
vec2 uv = ((vec2(pixel_coords)) / u_resolution) * 2.0 - 1.0;;
uv.x *= u_resolution.x / u_resolution.y;
vec2 uv = ((vec2(pixel_coords)) * (1.0 / u_resolution)) * 2.0 - 1.0;;
uv.x *= u_resolution.x * (1.0 / u_resolution.y);
vec3 color = debugColor(uv);

View File

@ -67,7 +67,7 @@ void main()
totalWeight += weight;
}
}
light /= totalWeight;
light * (1.0 / totalWeight);
if (u_pass == u_pass_count - 1)
{
vec4 color = light * imageLoad(color_texture, pixel_coords);