From a21cbb6fa7c62014eb5ffea6c8f096c2b0737c38 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 27 Nov 2022 12:38:26 +0000 Subject: Change pointlight render area definition to a cube --- gfx/gl/shaders/pointLight.vs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'gfx/gl/shaders/pointLight.vs') diff --git a/gfx/gl/shaders/pointLight.vs b/gfx/gl/shaders/pointLight.vs index 6236c33..35682fa 100644 --- a/gfx/gl/shaders/pointLight.vs +++ b/gfx/gl/shaders/pointLight.vs @@ -4,7 +4,6 @@ layout(location = 0) in vec3 position; uniform vec3 colour; uniform float kq; -uniform mat4 viewProjection; out vec3 centre; out float size; @@ -13,6 +12,6 @@ void main() { centre = position; - size = sqrt(256 * max(max(colour.r, colour.g), colour.b) / kq); - gl_Position = viewProjection * vec4(centre, 1); + size = (8 * sqrt(max(max(colour.r, colour.g), colour.b))) / sqrt(kq); + gl_Position = vec4(centre, 0); } -- cgit v1.2.3