Provisional working coloured lights
This commit is contained in:
@@ -3,9 +3,9 @@ layout (points) in;
|
||||
layout (triangle_strip, max_vertices = 4) out;
|
||||
layout (std140, binding = 0) uniform TheMat { mat4 theMat; } ;
|
||||
uniform vec3 lightPos;
|
||||
uniform vec2 radLum;
|
||||
uniform vec4 lumRad;
|
||||
out vec3 dField;
|
||||
out float lum;
|
||||
out vec3 lum;
|
||||
float isLHS (vec2 startV, vec2 testV)
|
||||
{ return sign( -startV.x * testV.y + startV.y * testV.x); }
|
||||
void main()
|
||||
@@ -13,8 +13,8 @@ void main()
|
||||
vec4 p1 = vec4 (gl_in[0].gl_Position.xy,0,1);
|
||||
vec4 p2 = vec4 (gl_in[0].gl_Position.zw,0,1);
|
||||
if (isLHS (p1.xy - lightPos.xy, p2.xy - lightPos.xy) < 0)
|
||||
{ lum = radLum.y;
|
||||
float rad = radLum.x;
|
||||
{ lum = lumRad.rgb;
|
||||
float rad = lumRad.a;
|
||||
vec4 p3 = vec4 (p1.xy,100,1);
|
||||
vec4 p4 = vec4 (p2.xy,100,1);
|
||||
vec2 d1 = p1.xy - lightPos.xy;
|
||||
|
||||
Reference in New Issue
Block a user