mirror of
https://github.com/3b1b/manim.git
synced 2025-08-05 16:49:03 +00:00
Fix typos in GLSL comments and add constants PURE_RED
, PURE_GREEN
, PURE_BLUE
(#2340)
* Fix typos in GLSL comments * Fix typos in GLSL comments * add constants PURE_RED, PURE_GREEN, PURE_BLUE
This commit is contained in:
parent
bd8d2fbc99
commit
a5a73cb2da
5 changed files with 9 additions and 3 deletions
|
@ -130,6 +130,9 @@ PINK: ManimColor = manim_config.colors.pink
|
|||
LIGHT_PINK: ManimColor = manim_config.colors.light_pink
|
||||
GREEN_SCREEN: ManimColor = manim_config.colors.green_screen
|
||||
ORANGE: ManimColor = manim_config.colors.orange
|
||||
PURE_RED: ManimColor = manim_config.colors.pure_red
|
||||
PURE_GREEN: ManimColor = manim_config.colors.pure_green
|
||||
PURE_BLUE: ManimColor = manim_config.colors.pure_blue
|
||||
|
||||
MANIM_COLORS: List[ManimColor] = list(manim_config.colors.values())
|
||||
|
||||
|
|
|
@ -169,6 +169,9 @@ colors:
|
|||
light_pink: "#DC75CD"
|
||||
green_screen: "#00FF00"
|
||||
orange: "#FF862F"
|
||||
pure_red: "#FF0000"
|
||||
pure_green: "#00FF00"
|
||||
pure_blue: "#0000FF"
|
||||
# Can be DEBUG / INFO / WARNING / ERROR / CRITICAL
|
||||
log_level: "INFO"
|
||||
universal_import_line: "from manimlib import *"
|
||||
|
|
|
@ -6,7 +6,7 @@ uniform vec4 clip_plane;
|
|||
|
||||
void emit_gl_Position(vec3 point){
|
||||
vec4 result = vec4(point, 1.0);
|
||||
// This allow for smooth transitions between objects fixed and unfixed from frame
|
||||
// This allows for smooth transitions between objects fixed and unfixed from frame
|
||||
result = mix(view * result, result, is_fixed_in_frame);
|
||||
// Essentially a projection matrix
|
||||
result.xyz *= frame_rescale_factors;
|
||||
|
|
|
@ -27,7 +27,7 @@ vec4 add_light(vec4 color, vec3 point, vec3 unit_normal){
|
|||
float light_to_normal = dot(to_light, unit_normal);
|
||||
// When unit normal points towards light, brighten
|
||||
float bright_factor = max(light_to_normal, 0) * reflectiveness;
|
||||
// For glossy surface, add extra shine if light beam go towards camera
|
||||
// For glossy surface, add extra shine if light beam goes towards camera
|
||||
vec3 light_reflection = reflect(-to_light, unit_normal);
|
||||
float light_to_cam = dot(light_reflection, to_camera);
|
||||
float shine = gloss * exp(-3 * pow(1 - light_to_cam, 2));
|
||||
|
|
|
@ -13,7 +13,7 @@ in vec2 uv_coords;
|
|||
|
||||
out vec4 frag_color;
|
||||
|
||||
// This include a delaration of uniform vec3 shading
|
||||
// This includes a declaration of uniform vec3 shading
|
||||
#INSERT finalize_color.glsl
|
||||
|
||||
void main() {
|
||||
|
|
Loading…
Add table
Reference in a new issue