X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=shaders%2Fcommon_world.glsl;h=45e12dff48267ba71c814a07a3272ea3eb29c339;hb=f3a2490079baf440238b78e54f4476649eddbda2;hp=d7b3ccfefc0741947a9bcd380b64e44e24d4a23a;hpb=a3c10b9dec1ed7136721695033ebeef30717f249;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/shaders/common_world.glsl b/shaders/common_world.glsl index d7b3ccf..45e12df 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]; @@ -10,43 +12,24 @@ layout (std140) uniform ub_world_lighting int g_light_count; int g_light_preview; int g_shadow_samples; + + vec4 g_point_light_positions[32]; + vec4 g_point_light_colours[32]; }; 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