diff options
| author | Dan Goodliffe <dan@randomdan.homeip.net> | 2026-03-10 01:33:39 +0000 |
|---|---|---|
| committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2026-03-10 01:33:39 +0000 |
| commit | 61d6b49d5a4c5f58a2922a19a360e078a0aeacba (patch) | |
| tree | c192508c15d880ccb84003f3494aa2e26d36324b /gfx/gl/shaders/billboard.vert | |
| parent | Specialise glTexture::savePosition (diff) | |
| download | ilt-61d6b49d5a4c5f58a2922a19a360e078a0aeacba.tar.bz2 ilt-61d6b49d5a4c5f58a2922a19a360e078a0aeacba.tar.xz ilt-61d6b49d5a4c5f58a2922a19a360e078a0aeacba.zip | |
Switch to floating point, camera relative position buffer
Diffstat (limited to 'gfx/gl/shaders/billboard.vert')
| -rw-r--r-- | gfx/gl/shaders/billboard.vert | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gfx/gl/shaders/billboard.vert b/gfx/gl/shaders/billboard.vert index 2d73084..faf8b19 100644 --- a/gfx/gl/shaders/billboard.vert +++ b/gfx/gl/shaders/billboard.vert @@ -8,16 +8,16 @@ uniform float size; layout(location = 0) in ivec3 modelPos; layout(location = 1) in float yaw; -flat out ivec3 ModelPos; +flat out vec3 ModelPos; flat out float Yaw; flat out float Depth; void main() { - ModelPos = modelPos; + ModelPos = modelPos - viewPoint; Yaw = yaw; - gl_Position = viewProjection * vec4(modelPos - viewPoint + centre, 1); + gl_Position = viewProjection * vec4(ModelPos + centre, 1); Depth = gl_Position.w; gl_PointSize = (viewPort.w * size * 2) / gl_Position.w; } |
