mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-22 03:15:00 +01:00
Improved water shader
This commit is contained in:
@@ -37,9 +37,18 @@ float move_factor = 0.0;
|
||||
#include "light_common.glsl"
|
||||
#include "apply_fog.glsl"
|
||||
#include "tonemapping.glsl"
|
||||
#include "water_surface.glsl"
|
||||
|
||||
void main()
|
||||
{
|
||||
// the realistic water (gfx.water.realistic, water_surface.glsl)
|
||||
if (water_realistic())
|
||||
{
|
||||
vec2 flow = water_flow(f_coord);
|
||||
water_surface(f_coord + flow, water_wave_normal(f_coord, flow, length(f_pos.xyz)), WATER_SPECULARITY, water_roughness());
|
||||
return;
|
||||
}
|
||||
|
||||
//wave distortion
|
||||
move_factor += (param[2].z * time);
|
||||
move_factor = mod(move_factor, 1.0);
|
||||
|
||||
Reference in New Issue
Block a user