Clean up cruft in arc shader
This commit is contained in:
@@ -5,29 +5,12 @@ in vec2 angles;
|
|||||||
in vec2 dist;
|
in vec2 dist;
|
||||||
out vec4 fColor;
|
out vec4 fColor;
|
||||||
|
|
||||||
//uniform float rotation;
|
|
||||||
|
|
||||||
void main()
|
void main()
|
||||||
{
|
{
|
||||||
// vec2 pos = gl_FragCoord.xy;
|
|
||||||
// float d = distance(pos,cenPosT);
|
|
||||||
// float dTest = max ( step(gRadOut/2,d)
|
|
||||||
// , 1 - step(gRadIn/2,d)
|
|
||||||
// );
|
|
||||||
//
|
|
||||||
// vec2 posDiff = pos - cenPosT;
|
|
||||||
float sa = angles.x;
|
float sa = angles.x;
|
||||||
vec2 sv = vec2 (-sin(sa), cos(sa));
|
vec2 sv = vec2 (-sin(sa), cos(sa));
|
||||||
// float saTest = dot(sv,posDiff) >= 0 ? 0 : 1;
|
|
||||||
float ea = angles.y;
|
float ea = angles.y;
|
||||||
vec2 ev = vec2 (-sin(ea), cos(ea));
|
vec2 ev = vec2 (-sin(ea), cos(ea));
|
||||||
// float eaTest = dot(ev,posDiff) <= 0 ? 0 : 1;
|
|
||||||
// float aTest = ea - sa < radians(180) ? max (saTest,eaTest)
|
|
||||||
// : min (saTest,eaTest);
|
|
||||||
//
|
|
||||||
// float onArcTest = max(dTest,aTest);
|
|
||||||
//
|
|
||||||
// gl_FragDepth = max(gl_FragCoord.z , onArcTest);
|
|
||||||
float d = (dist.x * dist.x) + (dist.y * dist.y);
|
float d = (dist.x * dist.x) + (dist.y * dist.y);
|
||||||
if (d > 1 || d < gRadIn || dot(sv, dist) < 0 || dot(ev, dist) > 0) {discard;}
|
if (d > 1 || d < gRadIn || dot(sv, dist) < 0 || dot(ev, dist) > 0) {discard;}
|
||||||
fColor = gColor;
|
fColor = gColor;
|
||||||
|
|||||||
@@ -5,15 +5,10 @@ layout (location = 2) in vec4 saEaRadWdth;
|
|||||||
out vec4 vColor;
|
out vec4 vColor;
|
||||||
out vec4 vparams;
|
out vec4 vparams;
|
||||||
|
|
||||||
uniform vec2 winSize;
|
|
||||||
uniform float zoom;
|
|
||||||
uniform vec2 translation;
|
|
||||||
uniform float rotation;
|
|
||||||
uniform mat4 worldMat;
|
uniform mat4 worldMat;
|
||||||
|
|
||||||
void main()
|
void main()
|
||||||
{
|
{
|
||||||
//gl_Position = worldMat * vec4(position.xyz,1);
|
|
||||||
gl_Position = vec4(position.xyz,1);
|
gl_Position = vec4(position.xyz,1);
|
||||||
vColor = color;
|
vColor = color;
|
||||||
vparams = saEaRadWdth;
|
vparams = saEaRadWdth;
|
||||||
|
|||||||
Reference in New Issue
Block a user