layout (location = 0) out vec4 oColour; layout (std140) uniform ub_world_lighting { vec4 g_light_colours[3]; vec4 g_light_directions[3]; vec4 g_ambient_colour; vec4 g_water_plane; vec4 g_depth_bounds; float g_water_fog; int g_light_count; int g_light_preview; int g_shadow_samples; }; uniform sampler2D g_world_depth; // Standard diffuse + spec models // ============================== vec3 do_light_diffuse( vec3 vfrag, vec3 wnormal ) { vec3 vtotal = g_ambient_colour.rgb; for( int i=0; i