mirror of
https://github.com/3b1b/manim.git
synced 2025-11-14 09:17:51 +00:00
Have stroke/fill vert shaders take in 3d points
This commit is contained in:
parent
025f6d9524
commit
0a82229ac1
2 changed files with 8 additions and 8 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
#version 330
|
#version 330
|
||||||
|
|
||||||
in vec2 point;
|
in vec3 point;
|
||||||
in vec4 color;
|
in vec4 color;
|
||||||
in float fill_type;
|
in float fill_type;
|
||||||
|
|
||||||
|
|
@ -10,7 +10,7 @@ out float v_fill_type;
|
||||||
|
|
||||||
|
|
||||||
void main(){
|
void main(){
|
||||||
bp = point;
|
bp = point.xy; // TODO
|
||||||
v_color = color;
|
v_color = color;
|
||||||
v_fill_type = fill_type;
|
v_fill_type = fill_type;
|
||||||
}
|
}
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
#version 330
|
#version 330
|
||||||
|
|
||||||
in vec2 point;
|
in vec3 point;
|
||||||
in vec2 prev_point;
|
in vec3 prev_point;
|
||||||
in vec2 next_point;
|
in vec3 next_point;
|
||||||
|
|
||||||
in float stroke_width;
|
in float stroke_width;
|
||||||
in vec4 color;
|
in vec4 color;
|
||||||
|
|
@ -24,7 +24,7 @@ void main(){
|
||||||
v_color = color;
|
v_color = color;
|
||||||
v_joint_type = joint_type;
|
v_joint_type = joint_type;
|
||||||
|
|
||||||
bp = point;
|
bp = point.xy; // TODO, apply some kind of 3d rotation or shift first
|
||||||
prev_bp = prev_point;
|
prev_bp = prev_point.xy;
|
||||||
next_bp = next_point;
|
next_bp = next_point.xy;
|
||||||
}
|
}
|
||||||
Loading…
Add table
Reference in a new issue