diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2024-01-13 10:05:44 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2024-01-13 10:05:44 +0000 |
commit | eb2094a1641c333a6e6f953e3b37aa962937cd59 (patch) | |
tree | 01908d3a3d5bf28a96784bbb2e931e46a53a5090 /gfx/gl/shaders/pointLight.fs | |
parent | Add model support for point lights (diff) | |
download | ilt-eb2094a1641c333a6e6f953e3b37aa962937cd59.tar.bz2 ilt-eb2094a1641c333a6e6f953e3b37aa962937cd59.tar.xz ilt-eb2094a1641c333a6e6f953e3b37aa962937cd59.zip |
Update point light shaders for instancing
Diffstat (limited to 'gfx/gl/shaders/pointLight.fs')
-rw-r--r-- | gfx/gl/shaders/pointLight.fs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gfx/gl/shaders/pointLight.fs b/gfx/gl/shaders/pointLight.fs index ba327b6..7531d3e 100644 --- a/gfx/gl/shaders/pointLight.fs +++ b/gfx/gl/shaders/pointLight.fs @@ -6,9 +6,9 @@ out vec3 FragColor; layout(binding = 0) uniform isampler2D gPosition; layout(binding = 1) uniform sampler2D gNormal; uniform ivec4 viewPort; -uniform vec3 colour; -uniform float kq; -in vec4 geo_centre; +flat in vec4 geo_centre; +flat in vec3 geo_colour; +flat in float geo_kq; void main() @@ -26,5 +26,5 @@ main() if (normalDot < 0) { discard; } - FragColor = (colour * normalDot) / (1 + (kq * pow(lightDist / 1000.0, 2))); + FragColor = (geo_colour * normalDot) / (1 + (geo_kq * pow(lightDist / 1000.0, 2))); } |