mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Fixed caustics
This commit is contained in:
parent
a3fcd7f568
commit
abda8058fe
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user