From 46e2769572242916b588e972478b33310a7163a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Madar=C3=A1sz?= Date: Tue, 23 Apr 2024 11:22:04 +0200 Subject: [PATCH] fix: prefer skysphere over skyenv --- engine/art/shaders/fs_32_4_model.glsl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/engine/art/shaders/fs_32_4_model.glsl b/engine/art/shaders/fs_32_4_model.glsl index b76a91d..2bbca65 100644 --- a/engine/art/shaders/fs_32_4_model.glsl +++ b/engine/art/shaders/fs_32_4_model.glsl @@ -282,15 +282,15 @@ vec3 sample_irradiance_slow( vec3 normal, vec3 vertex_tangent ) vec3 sample_irradiance_fast( vec3 normal, vec3 vertex_tangent ) { // Sample the irradiance map if it exists, otherwise fall back to blurred reflection map. - if ( has_tex_skyenv ) + if ( has_tex_skysphere ) { vec2 polar = sphere_to_polar( normal ); - return pow(textureLod( tex_skyenv, polar, 0.0 ), vec4(1.0/2.2)).rgb * exposure; + return pow(textureLod( tex_skysphere, polar, 0.80 * skysphere_mip_count ), vec4(1.0/2.2)).rgb * exposure; } else { vec2 polar = sphere_to_polar( normal ); - return pow(textureLod( tex_skysphere, polar, 0.80 * skysphere_mip_count ), vec4(1.0/2.2)).rgb * exposure; + return pow(textureLod( tex_skyenv, polar, 0.0 ), vec4(1.0/2.2)).rgb * exposure; } }