From 677d609870de804a1665a99acf6671a9bbf83d9c Mon Sep 17 00:00:00 2001 From: Grant Sanderson Date: Sat, 9 Jan 2021 10:30:42 -0800 Subject: [PATCH] Tiny chantges --- manimlib/shaders/quadratic_bezier_fill/geom.glsl | 7 ++++--- manimlib/shaders/quadratic_bezier_fill/vert.glsl | 2 -- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/manimlib/shaders/quadratic_bezier_fill/geom.glsl b/manimlib/shaders/quadratic_bezier_fill/geom.glsl index 9c5b495b..435a0b31 100644 --- a/manimlib/shaders/quadratic_bezier_fill/geom.glsl +++ b/manimlib/shaders/quadratic_bezier_fill/geom.glsl @@ -4,10 +4,12 @@ layout (triangles) in; layout (triangle_strip, max_vertices = 5) out; uniform float anti_alias_width; + // Needed for get_gl_Position uniform vec2 frame_shape; uniform float focal_distance; uniform float is_fixed_in_frame; +// Needed for add_light uniform vec3 light_source_position; uniform float gloss; uniform float shadow; @@ -15,7 +17,6 @@ uniform float shadow; in vec3 bp[3]; in vec3 v_global_unit_normal[3]; in vec4 v_color[3]; -// in float v_fill_all[3]; in float v_vert_index[3]; out vec4 color; @@ -71,10 +72,10 @@ void emit_pentagon(vec3[3] points, vec3 normal){ vec3 p0_perp = cross(t01, normal); vec3 p2_perp = cross(t12, normal); - bool fill_in = orientation > 0; + bool fill_inside = orientation > 0; float aaw = anti_alias_width; vec3 corners[5]; - if(fill_in){ + if(fill_inside){ // Note, straight lines will also fall into this case, and since p0_perp and p2_perp // will point to the right of the curve, it's just what we want corners = vec3[5]( diff --git a/manimlib/shaders/quadratic_bezier_fill/vert.glsl b/manimlib/shaders/quadratic_bezier_fill/vert.glsl index 5b30bf82..c1de8341 100644 --- a/manimlib/shaders/quadratic_bezier_fill/vert.glsl +++ b/manimlib/shaders/quadratic_bezier_fill/vert.glsl @@ -11,7 +11,6 @@ in float vert_index; out vec3 bp; // Bezier control point out vec3 v_global_unit_normal; out vec4 v_color; -// out float v_fill_all; out float v_vert_index; // Analog of import for manim only @@ -21,6 +20,5 @@ void main(){ bp = position_point_into_frame(point); v_global_unit_normal = normalize(to_screen_space * vec4(unit_normal, 0)).xyz; v_color = color; - // v_fill_all = fill_all; v_vert_index = vert_index; } \ No newline at end of file