diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2024-01-13 11:31:13 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2024-01-13 11:31:13 +0000 |
commit | 332355a9f4a4199e0ddb51852546d44ec54e176f (patch) | |
tree | 4998cde56004f53a0218dc5f00d578f939ffea08 /gfx/gl/shaders/spotLight.fs | |
parent | Integer support in persistence (diff) | |
parent | Only create VAOs for the light type(s) in use (diff) | |
download | ilt-332355a9f4a4199e0ddb51852546d44ec54e176f.tar.bz2 ilt-332355a9f4a4199e0ddb51852546d44ec54e176f.tar.xz ilt-332355a9f4a4199e0ddb51852546d44ec54e176f.zip |
Merge branch 'model-lights'
Diffstat (limited to 'gfx/gl/shaders/spotLight.fs')
-rw-r--r-- | gfx/gl/shaders/spotLight.fs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gfx/gl/shaders/spotLight.fs b/gfx/gl/shaders/spotLight.fs index 937f922..ad33458 100644 --- a/gfx/gl/shaders/spotLight.fs +++ b/gfx/gl/shaders/spotLight.fs @@ -6,10 +6,10 @@ 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; -in vec4 geo_direction; +flat in vec4 geo_centre; +flat in vec4 geo_direction; +flat in vec3 geo_colour; +flat in float geo_kq; void main() @@ -30,5 +30,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))); } |