3b1b-manim/manimlib/shaders/quadratic_bezier_fill_vert.glsl

28 lines
706 B
Text
Raw Normal View History

2020-02-03 10:52:39 -08:00
#version 330
2020-06-01 16:21:18 -07:00
uniform mat4 to_screen_space;
in vec3 point;
in vec3 unit_normal;
2020-02-03 10:52:39 -08:00
in vec4 color;
in float fill_all; // Either 0 or 1
2020-06-02 16:18:44 -07:00
in float gloss;
2020-02-03 10:52:39 -08:00
out vec3 bp; // Bezier control point
out vec3 v_global_unit_normal;
2020-02-03 10:52:39 -08:00
out vec4 v_color;
out float v_fill_all;
2020-06-02 16:18:44 -07:00
out float v_gloss;
2020-02-03 10:52:39 -08:00
2020-06-01 16:21:18 -07:00
// To my knowledge, there is no notion of #include for shaders,
// so to share functionality between this and others, the caller
// replaces this line with the contents of named file
#INSERT position_point_into_frame.glsl
2020-02-03 10:52:39 -08:00
void main(){
2020-06-01 16:21:18 -07:00
bp = position_point_into_frame(point);
2020-06-04 11:29:36 -07:00
v_global_unit_normal = normalize(position_point_into_frame(unit_normal));
2020-02-03 10:52:39 -08:00
v_color = color;
v_fill_all = fill_all;
2020-06-02 16:18:44 -07:00
v_gloss = gloss;
2020-02-03 10:52:39 -08:00
}