Render bezier curves using distance fields

This commit is contained in:
2021-03-14 00:13:29 +01:00
parent 3aefb8319d
commit b0c8c10658
6 changed files with 51 additions and 37 deletions
+5 -5
View File
@@ -1,10 +1,10 @@
#version 430 core
layout (location = 0) in vec3 position;
layout (location = 1) in vec4 color;
layout (location = 2) in vec3 radVec;
layout (location = 2) in vec4 boxes;
out vec4 vColor;
out vec2 vPosOff;
out float vRadMag;
out vec2 boxOut;
out vec2 boxIn;
uniform vec2 winSize;
uniform float zoom;
@@ -16,6 +16,6 @@ void main()
{
gl_Position = worldMat * vec4(position.xyz,1);
vColor = color;
vPosOff = ( worldMat * vec4(radVec.xy,0,1) ).xy ;
vRadMag = radVec.z ;
boxOut = boxes.xy ;
boxIn = boxes.zw ;
}