diff --git a/vulkan_shader/rt/camera.rmiss b/vulkan_shader/rt/camera.rmiss index 27a16266..1676d3e4 100644 --- a/vulkan_shader/rt/camera.rmiss +++ b/vulkan_shader/rt/camera.rmiss @@ -12,7 +12,8 @@ void main() { vec3 dir = ray.direction; dir = vec3(-dir.y, dir.z, -dir.x); if (envmap != 0) { - ray.radiance = texture(samplerEnvironment, dir).xyz; + // FIXME: super high values seem to cause nan + ray.radiance = clamp(texture(samplerEnvironment, dir).xyz, vec3(0,0,0), vec3(100, 100, 100)); } else { ray.radiance = ambientLight; }