diff options
| author | Dan Goodliffe <dan@randomdan.homeip.net> | 2026-02-06 19:56:46 +0000 |
|---|---|---|
| committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2026-02-06 19:56:46 +0000 |
| commit | 99f5033fdc6e2701bf5bb76e89e100a846cbba80 (patch) | |
| tree | b72ec7920738132166daab88b6fdb895819dac04 /gfx/gl/shaders/pointLight.vert | |
| parent | Add glDebugScope (diff) | |
| parent | Make similar array tidy-up to networkStraight shaders (diff) | |
| download | ilt-99f5033fdc6e2701bf5bb76e89e100a846cbba80.tar.bz2 ilt-99f5033fdc6e2701bf5bb76e89e100a846cbba80.tar.xz ilt-99f5033fdc6e2701bf5bb76e89e100a846cbba80.zip | |
Merge branch 'glmax'
Diffstat (limited to 'gfx/gl/shaders/pointLight.vert')
| -rw-r--r-- | gfx/gl/shaders/pointLight.vert | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/gfx/gl/shaders/pointLight.vert b/gfx/gl/shaders/pointLight.vert new file mode 100644 index 0000000..2fd5418 --- /dev/null +++ b/gfx/gl/shaders/pointLight.vert @@ -0,0 +1,24 @@ +#version 460 core + +layout(location = 0) in vec3 v_position; +layout(location = 1) in vec3 v_colour; +layout(location = 2) in float v_kq; +layout(location = 3) in mat3 model; +layout(location = 6) in ivec3 modelPos; + +uniform ivec3 viewPoint; + +flat out vec3 position; +flat out vec3 colour; +flat out float size; +flat out float kq; + +void +main() +{ + position = modelPos + ivec3(mat3(model) * v_position); + kq = v_kq; + size = (8000 * sqrt(max(max(v_colour.r, v_colour.g), v_colour.b))) / sqrt(v_kq); + colour = v_colour; + gl_Position = vec4(position - viewPoint, 0); +} |
