diff --git a/assets/voxygen/shaders/particle-frag.glsl b/assets/voxygen/shaders/particle-frag.glsl index 17dfba2fae..92cebd6e21 100644 --- a/assets/voxygen/shaders/particle-frag.glsl +++ b/assets/voxygen/shaders/particle-frag.glsl @@ -6,7 +6,11 @@ #define LIGHTING_REFLECTION_KIND LIGHTING_REFLECTION_KIND_GLOSSY -#define LIGHTING_TRANSPORT_MODE LIGHTING_TRANSPORT_MODE_RADIANCE +#if (FLUID_MODE == FLUID_MODE_CHEAP) + #define LIGHTING_TRANSPORT_MODE LIGHTING_TRANSPORT_MODE_IMPORTANCE +#elif (FLUID_MODE == FLUID_MODE_SHINY) + #define LIGHTING_TRANSPORT_MODE LIGHTING_TRANSPORT_MODE_RADIANCE +#endif #define LIGHTING_DISTRIBUTION_SCHEME LIGHTING_DISTRIBUTION_SCHEME_MICROFACET diff --git a/assets/voxygen/shaders/terrain-frag.glsl b/assets/voxygen/shaders/terrain-frag.glsl index 71fc97f46f..9e7153a91a 100644 --- a/assets/voxygen/shaders/terrain-frag.glsl +++ b/assets/voxygen/shaders/terrain-frag.glsl @@ -293,8 +293,8 @@ void main() { #ifndef EXPERIMENTAL_NOCAUSTICS #if (FLUID_MODE == FLUID_MODE_SHINY) if (faces_fluid) { - vec3 wpos = f_pos + focus_off.xyz; - vec3 spos = (wpos + wpos.z * vec3(sun_dir.xy, 0)) * 0.05; + vec3 wpos = f_pos + vec3(focus_off.xy, 0); + vec3 spos = (wpos + (fluid_alt - wpos.z) * vec3(sun_dir.xy, 0)) * 0.05; reflected_light += max(1.0 - pow(abs(noise_3d(vec3(spos.xy, tick.x * 0.1 + dot(sin(wpos.xy * 0.8), vec2(1)) * 0.05)) - 0.5) * 10, 0.001), 0) * 1000 * cam_attenuation