mirror of
https://github.com/3b1b/manim.git
synced 2025-07-28 04:23:16 +08:00
11 lines
292 B
GLSL
11 lines
292 B
GLSL
// Assumes theese uniforms exist in the surrounding context
|
|
// uniform float scale;
|
|
// uniform float aspect_ratio;
|
|
// uniform float frame_center;
|
|
|
|
vec3 scale_and_shift_point_for_frame(vec3 point){
|
|
point -= frame_center;
|
|
point /= scale;
|
|
point.x /= aspect_ratio;
|
|
return point;
|
|
} |