Skip to content

Commit

Permalink
Have stroke/fill vert shaders take in 3d points
Browse files Browse the repository at this point in the history
  • Loading branch information
3b1b committed Feb 5, 2020
1 parent 025f6d9 commit 0a82229
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions manimlib/shaders/quadratic_bezier_fill_vert.glsl
@@ -1,6 +1,6 @@
#version 330

in vec2 point;
in vec3 point;
in vec4 color;
in float fill_type;

Expand All @@ -10,7 +10,7 @@ out float v_fill_type;


void main(){
bp = point;
bp = point.xy; // TODO
v_color = color;
v_fill_type = fill_type;
}
12 changes: 6 additions & 6 deletions manimlib/shaders/quadratic_bezier_stroke_vert.glsl
@@ -1,8 +1,8 @@
#version 330

in vec2 point;
in vec2 prev_point;
in vec2 next_point;
in vec3 point;
in vec3 prev_point;
in vec3 next_point;

in float stroke_width;
in vec4 color;
Expand All @@ -24,7 +24,7 @@ void main(){
v_color = color;
v_joint_type = joint_type;

bp = point;
prev_bp = prev_point;
next_bp = next_point;
bp = point.xy; // TODO, apply some kind of 3d rotation or shift first
prev_bp = prev_point.xy;
next_bp = next_point.xy;
}

0 comments on commit 0a82229

Please sign in to comment.