summaryrefslogtreecommitdiff
path: root/gfx/gl/shaders/pointLight.gs
diff options
context:
space:
mode:
Diffstat (limited to 'gfx/gl/shaders/pointLight.gs')
-rw-r--r--gfx/gl/shaders/pointLight.gs15
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();
}