Refactor poking tuples

This commit is contained in:
2021-02-19 19:19:08 +01:00
parent defc8da088
commit 2866535b52
4 changed files with 58 additions and 45 deletions
+1 -2
View File
@@ -2,11 +2,10 @@
in vec4 gColor;
in vec2 cenPosT;
in float gRad;
in float gWdth;
out vec4 fColor;
out float gl_FragDepth;
uniform vec2 winSize;
void main()
{
vec2 pos = gl_FragCoord.xy;
+4 -2
View File
@@ -2,9 +2,10 @@
layout (points) in;
layout (triangle_strip, max_vertices = 4) out;
in vec4 vColor [];
in float vRad [];
in vec4 vparams [];
out vec4 gColor;
out float gRad;
out float gWdth;
out vec2 cenPosT;
uniform vec2 winSize;
@@ -15,7 +16,8 @@ void main()
vec3 cenPos = gl_in[0].gl_Position.xyz;
//cenPos = vec3 (0.5,0,0);
gColor = vColor[0];
gRad = vRad[0] * zoom * 2;
gRad = vparams[0].x * zoom * 2;
gWdth = vparams[0].w * zoom * 2;
// gRad = 0.2;
cenPosT = vec2 ( (cenPos.x + 1) * 0.5 * winSize.x , (cenPos.y + 1) * 0.5 * winSize.y);
+3 -3
View File
@@ -1,13 +1,13 @@
#version 430 core
layout (location = 0) in vec3 position;
layout (location = 1) in vec4 color;
layout (location = 2) in float rad;
layout (location = 2) in vec4 saEaRadWdth;
out vec4 vColor;
out float vRad;
out vec4 vparams;
void main()
{
gl_Position = vec4(position,1);
//gl_Position = vec4(0,0,0,1);
vColor = color;
vRad = rad;
vparams = saEaRadWdth;
}