From 61d6b49d5a4c5f58a2922a19a360e078a0aeacba Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Tue, 10 Mar 2026 01:33:39 +0000 Subject: Switch to floating point, camera relative position buffer --- gfx/gl/shaders/spotLight.vert | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gfx/gl/shaders/spotLight.vert') diff --git a/gfx/gl/shaders/spotLight.vert b/gfx/gl/shaders/spotLight.vert index 36d2ee5..83f3859 100644 --- a/gfx/gl/shaders/spotLight.vert +++ b/gfx/gl/shaders/spotLight.vert @@ -20,11 +20,11 @@ flat out float kq; void main() { - position = modelPos + ivec3(mat3(model) * v_position); + position = (modelPos - viewPoint) + ivec3(mat3(model) * v_position); direction = normalize(mat3(model) * v_direction); colour = v_colour; kq = v_kq; size = (8000 * sqrt(max(max(colour.r, colour.g), colour.b))) / sqrt(kq); arc = vec2(cos(v_arc / 2), tan(v_arc / 2)); - gl_Position = vec4(position - viewPoint, 0); + gl_Position = vec4(position, 0); } -- cgit v1.3