fixes transparent refelctions

This commit is contained in:
zomseffen 2025-02-05 17:51:17 +01:00
parent dc66ae4b3d
commit c07e8a3061
3 changed files with 9 additions and 9 deletions

Binary file not shown.

View file

@ -355,15 +355,15 @@ Tracing trace_ray(uint volume_start, vec3 starting_pos, vec3 start_direction, fl
if (!result.has_hit && result.has_transparent_hit) {
// did we stop because nothing could be seen through the object?
if (max(result.color_mul.x, max(result.color_mul.y, result.color_mul.z)) < 0.1) {
// if so count it as a hit
// if so count it as a hit and recover the pre transparent color multiplier
result.has_hit = true;
}
result.color_mul = color_mul_transparent;
}
result.end_pos = end_pos_transparent;
result.end_color = end_color_transparent;
result.end_volume = end_volume_transparent;
result.end_facing = end_facing_transparent;
result.end_raster = end_raster_transparent;
result.color_mul = color_mul_transparent;
}
return result;