Add menu and some cleanup
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
|
||||
flat in vec2 startPos;
|
||||
in vec2 vertPos;
|
||||
|
||||
out vec4 fragColor;
|
||||
|
||||
uniform vec4 color;
|
||||
uniform float dashSize;
|
||||
uniform float gapSize;
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 dir = (vertPos.xy - startPos.xy);
|
||||
float dist = length(dir);
|
||||
|
||||
if (fract(dist / (dashSize + gapSize)) > dashSize/(dashSize + gapSize))
|
||||
discard;
|
||||
fragColor = color;
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
|
||||
layout (location = 0) in vec2 pos;
|
||||
|
||||
flat out vec2 startPos;
|
||||
out vec2 vertPos;
|
||||
|
||||
uniform mat4 viewMatrix;
|
||||
|
||||
void main()
|
||||
{
|
||||
vec4 outPos = viewMatrix * vec4(pos.x, pos.y, 0.0, 1.0);
|
||||
gl_Position = outPos;
|
||||
vertPos = pos.xy / outPos.w;
|
||||
startPos = vertPos;
|
||||
}
|
||||
Reference in New Issue
Block a user