X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;ds=sidebyside;f=shaders%2Fcommon_world.glsl;h=043cf26898971b270032a2b5ff5bd78c4bacd202;hb=409edea2cf6271956137918e4e0b4f1c2addf620;hp=4d9b0d3d6a7211f6cdb38499338264ab252ffc84;hpb=168eb5c363f510d60703498e01ffcdb52bf9fd07;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/shaders/common_world.glsl b/shaders/common_world.glsl index 4d9b0d3..043cf26 100644 --- a/shaders/common_world.glsl +++ b/shaders/common_world.glsl @@ -1,3 +1,5 @@ +layout (location = 0) out vec4 oColour; + layout (std140) uniform ub_world_lighting { vec4 g_light_colours[3]; @@ -9,70 +11,59 @@ layout (std140) uniform ub_world_lighting float g_water_fog; int g_light_count; int g_light_preview; -}; + int g_shadow_samples; -uniform sampler2D g_world_depth; + // g_time ? -// Standard diffuse + spec models -// ============================== - -vec3 do_light_diffuse( vec3 vfrag, vec3 wnormal ) -{ - vec3 vtotal = g_ambient_colour.rgb; - - for( int i=0; i