Go back the convention of positioning stroke vertices in space before geom shader

This commit is contained in:
Grant Sanderson 2023-01-16 21:46:43 -08:00
parent 8ac0aa484b
commit 8d277af47c
2 changed files with 5 additions and 4 deletions

View file

@ -179,7 +179,7 @@ void main() {
corners[i],
unit_normal
);
gl_Position = get_gl_Position(position_point_into_frame(corners[i]));
gl_Position = get_gl_Position(corners[i]);
EmitVertex();
}
EndPrimitive();

View file

@ -1,10 +1,9 @@
#version 330
uniform vec2 frame_shape;
in vec3 point;
in vec4 stroke_rgba;
in float stroke_width;
in vec3 joint_normal;
in float joint_angle;
// Bezier control point
@ -17,8 +16,10 @@ out float v_vert_index;
const float STROKE_WIDTH_CONVERSION = 0.01;
#INSERT get_gl_Position.glsl
void main(){
verts = point;
verts = position_point_into_frame(point);
v_stroke_width = STROKE_WIDTH_CONVERSION * stroke_width * frame_shape[1] / 8.0;
v_joint_angle = joint_angle;
v_color = stroke_rgba;