From d19b244ee18e79f1c7b1b9f8035c7a9739cddd6e Mon Sep 17 00:00:00 2001 From: Grant Sanderson Date: Fri, 13 Jan 2023 22:11:13 -0800 Subject: [PATCH] Move uniform pixel_shape declaration outside of get_gl_Position --- manimlib/shaders/inserts/get_gl_Position.glsl | 1 - manimlib/shaders/quadratic_bezier_fill/geom.glsl | 1 + manimlib/shaders/quadratic_bezier_stroke/geom.glsl | 1 + manimlib/shaders/true_dot/geom.glsl | 1 + 4 files changed, 3 insertions(+), 1 deletion(-) diff --git a/manimlib/shaders/inserts/get_gl_Position.glsl b/manimlib/shaders/inserts/get_gl_Position.glsl index 675e5c20..cfcacf48 100644 --- a/manimlib/shaders/inserts/get_gl_Position.glsl +++ b/manimlib/shaders/inserts/get_gl_Position.glsl @@ -2,7 +2,6 @@ uniform float is_fixed_in_frame; uniform vec3 camera_offset; uniform mat3 camera_rotation; uniform vec2 frame_shape; -uniform vec2 pixel_shape; // Move this uniform float focal_distance; const vec2 DEFAULT_FRAME_SHAPE = vec2(8.0 * 16.0 / 9.0, 8.0); diff --git a/manimlib/shaders/quadratic_bezier_fill/geom.glsl b/manimlib/shaders/quadratic_bezier_fill/geom.glsl index 952f727d..a0692773 100644 --- a/manimlib/shaders/quadratic_bezier_fill/geom.glsl +++ b/manimlib/shaders/quadratic_bezier_fill/geom.glsl @@ -4,6 +4,7 @@ layout (triangles) in; layout (triangle_strip, max_vertices = 5) out; uniform float anti_alias_width; +uniform vec2 pixel_shape; // Needed for finalize_color uniform vec3 light_source_position; diff --git a/manimlib/shaders/quadratic_bezier_stroke/geom.glsl b/manimlib/shaders/quadratic_bezier_stroke/geom.glsl index 550cc112..92806509 100644 --- a/manimlib/shaders/quadratic_bezier_stroke/geom.glsl +++ b/manimlib/shaders/quadratic_bezier_stroke/geom.glsl @@ -5,6 +5,7 @@ layout (triangle_strip, max_vertices = 6) out; uniform float anti_alias_width; uniform float flat_stroke; +uniform vec2 pixel_shape; //Needed for lighting uniform vec3 light_source_position; diff --git a/manimlib/shaders/true_dot/geom.glsl b/manimlib/shaders/true_dot/geom.glsl index 64e3db72..b1dfc0ba 100644 --- a/manimlib/shaders/true_dot/geom.glsl +++ b/manimlib/shaders/true_dot/geom.glsl @@ -4,6 +4,7 @@ layout (points) in; layout (triangle_strip, max_vertices = 4) out; uniform float anti_alias_width; +uniform vec2 pixel_shape; in vec3 v_point[1]; in float v_radius[1];