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/pointLight.gs | |
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/pointLight.gs')
-rw-r--r-- | gfx/gl/shaders/pointLight.gs | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/gfx/gl/shaders/pointLight.gs b/gfx/gl/shaders/pointLight.gs index 9c41ed4..fc1d7c3 100644 --- a/gfx/gl/shaders/pointLight.gs +++ b/gfx/gl/shaders/pointLight.gs @@ -20,19 +20,24 @@ const vec3[] cube = vec3[]( // http://www.cs.umd.edu/gvil/papers/av_ts.pdf ); uniform mat4 viewProjection; uniform ivec3 viewPoint; - -in vec3 centre[]; -in float size[]; +flat in vec3 position[]; +flat in vec3 colour[]; +flat in float size[]; +flat in float kq[]; layout(points) in; layout(triangle_strip, max_vertices = cube.length()) out; -out vec4 geo_centre; +flat out vec4 geo_centre; +flat out vec3 geo_colour; +flat out float geo_kq; void doVertex(int idx) { gl_Position = viewProjection * (gl_in[0].gl_Position + vec4(cube[idx] * size[0], 1)); - geo_centre = vec4(centre[0], size[0]); + geo_centre = vec4(position[0], size[0]); + geo_colour = colour[0]; + geo_kq = kq[0]; EmitVertex(); } |