mirror of
https://github.com/3b1b/manim.git
synced 2025-09-19 04:41:56 +00:00
Add stand-in for better unit normal treatment
This commit is contained in:
parent
d1c765353d
commit
d87db65344
1 changed files with 2 additions and 1 deletions
|
@ -11,6 +11,7 @@ uniform float is_fixed_in_frame;
|
|||
|
||||
uniform float anti_alias_width;
|
||||
uniform float flat_stroke;
|
||||
uniform mat3 camera_rotation;
|
||||
|
||||
//Needed for lighting
|
||||
uniform vec3 light_source_position;
|
||||
|
@ -134,7 +135,7 @@ void main() {
|
|||
if (distance(verts[0], verts[1]) == 0 && distance(verts[1], verts[2]) == 0) return;
|
||||
|
||||
bezier_degree = (abs(v_joint_angle[1]) < ANGLE_THRESHOLD) ? 1.0 : 2.0;
|
||||
vec3 unit_normal = get_unit_normal(vec3[3](verts[0], verts[1], verts[2]));
|
||||
vec3 unit_normal = camera_rotation * vec3(0.0, 0.0, 1.0); // TODO, track true unit normal globally
|
||||
|
||||
// Adjust stroke width based on distance from the camera
|
||||
float scaled_strokes[3];
|
||||
|
|
Loading…
Add table
Reference in a new issue