Files
manim/manimlib/shaders/scale_and_shift_point_for_frame.glsl
2020-02-16 10:53:16 -08:00

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;
}