projects
/
carveJwlIkooP6JGAAIwe30JlM.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
absolutely SHIT bug
[carveJwlIkooP6JGAAIwe30JlM.git]
/
shaders
/
common_world.glsl
diff --git
a/shaders/common_world.glsl
b/shaders/common_world.glsl
index 5c06d73db33caf07636035c02042dd0a7a7388da..cb68f35a4cf7f2ebac919722825990b4d8a3eca4 100644
(file)
--- a/
shaders/common_world.glsl
+++ b/
shaders/common_world.glsl
@@
-16,6
+16,8
@@
layout (std140) uniform ub_world_lighting
vec4 g_sunset_ambient;
vec4 g_sun_colour;
vec4 g_sun_dir;
vec4 g_sunset_ambient;
vec4 g_sun_colour;
vec4 g_sun_dir;
+ vec4 g_board_0;
+ vec4 g_board_1;
float g_water_fog;
float g_time;
float g_water_fog;
float g_time;
@@
-48,9
+50,8
@@
float world_depth_sample( vec3 pos )
float world_water_depth( vec3 pos )
{
float world_water_depth( vec3 pos )
{
- vec2 depth_coord = (pos.xz - g_depth_bounds.xy) * g_depth_bounds.zw;
float ref_depth = g_water_plane.y*g_water_plane.w;
float ref_depth = g_water_plane.y*g_water_plane.w;
- return
texture( g_world_depth, depth_coord ).g
- ref_depth;
+ return
world_depth_sample( pos )
- ref_depth;
}
float shadow_sample( vec3 vdir )
}
float shadow_sample( vec3 vdir )
@@
-118,7
+119,7
@@
vec3 scene_calculate_light( int light_index,
light_delta = normalize( light_delta );
float quadratic = dist2*100.0;
light_delta = normalize( light_delta );
float quadratic = dist2*100.0;
- float attenuation = 1.0
f/( 1.0f
+ quadratic );
+ float attenuation = 1.0
/( 1.0
+ quadratic );
attenuation *= max( dot( light_delta, normal ), 0.0 );
float falloff = max( 0.0, 1.0-(dist2*light_co.w) );
attenuation *= max( dot( light_delta, normal ), 0.0 );
float falloff = max( 0.0, 1.0-(dist2*light_co.w) );