summaryrefslogtreecommitdiff
path: root/gfx/gl/shaders/pointLight.vs
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2022-11-27 12:38:26 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2022-11-27 12:38:26 +0000
commita21cbb6fa7c62014eb5ffea6c8f096c2b0737c38 (patch)
tree1ea0302585fd3b169721bce82ef3d3f203a8173f /gfx/gl/shaders/pointLight.vs
parentAdd light stage to renderable objects (diff)
downloadilt-a21cbb6fa7c62014eb5ffea6c8f096c2b0737c38.tar.bz2
ilt-a21cbb6fa7c62014eb5ffea6c8f096c2b0737c38.tar.xz
ilt-a21cbb6fa7c62014eb5ffea6c8f096c2b0737c38.zip
Change pointlight render area definition to a cube
Diffstat (limited to 'gfx/gl/shaders/pointLight.vs')
-rw-r--r--gfx/gl/shaders/pointLight.vs5
1 files changed, 2 insertions, 3 deletions
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);
}