X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=shaders%2Fcommon_world.glsl;h=a3b5ae3488b7acb8e083c82ab5827800a65c97b5;hb=98b9bcf0e10bc02cf679d03fa269613e140ba878;hp=baffd66001af0c7dbd5b680f5dc1408b022b3223;hpb=0c10e79eabdb2cc0fe0b6b4116541d8eeeef1328;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/shaders/common_world.glsl b/shaders/common_world.glsl index baffd66..a3b5ae3 100644 --- a/shaders/common_world.glsl +++ b/shaders/common_world.glsl @@ -2,6 +2,9 @@ layout (location = 0) out vec4 oColour; layout (std140) uniform ub_world_lighting { + vec4 g_cube_min; + vec4 g_cube_inv_range; + vec4 g_light_colours[3]; vec4 g_light_directions[3]; vec4 g_ambient_colour; @@ -9,46 +12,33 @@ layout (std140) uniform ub_world_lighting vec4 g_water_plane; vec4 g_depth_bounds; float g_water_fog; + float g_time; int g_light_count; int g_light_preview; int g_shadow_samples; -}; -uniform sampler2D g_world_depth; + int g_debug_indices; + int g_debug_complexity; -// Standard diffuse + spec models -// ============================== - -vec3 do_light_diffuse( vec3 vfrag, vec3 wnormal ) -{ - vec3 vtotal = g_ambient_colour.rgb; - - for( int i=0; i