summaryrefslogtreecommitdiff
path: root/gfx
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2024-01-12 19:21:37 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2024-01-12 19:21:37 +0000
commit972d7260affe7f0d8eebaef609f5576a18f66f73 (patch)
tree1c36937b1f14d36237eba3212480ba6124767114 /gfx
parentTweak street light definition (diff)
downloadilt-972d7260affe7f0d8eebaef609f5576a18f66f73.tar.bz2
ilt-972d7260affe7f0d8eebaef609f5576a18f66f73.tar.xz
ilt-972d7260affe7f0d8eebaef609f5576a18f66f73.zip
Fix order or multiple to address reversed rotation
Diffstat (limited to 'gfx')
-rw-r--r--gfx/gl/shaders/spotLight.vs4
1 files changed, 2 insertions, 2 deletions
diff --git a/gfx/gl/shaders/spotLight.vs b/gfx/gl/shaders/spotLight.vs
index 8023f18..eed8778 100644
--- a/gfx/gl/shaders/spotLight.vs
+++ b/gfx/gl/shaders/spotLight.vs
@@ -20,8 +20,8 @@ flat out float kq;
void
main()
{
- position = modelPos + ivec3(v_position * mat3(model));
- direction = normalize(v_direction * mat3(model));
+ position = modelPos + 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);