mirror of
https://github.com/3b1b/manim.git
synced 2025-07-27 20:12:24 +08:00
13 lines
376 B
GLSL
13 lines
376 B
GLSL
// Assumes the following uniforms exist in the surrounding context:
|
|
// uniform mat4 to_screen_space;
|
|
// uniform float is_fixed_in_frame;
|
|
|
|
vec3 position_point_into_frame(vec3 point){
|
|
if(bool(is_fixed_in_frame)){
|
|
return point;
|
|
}else{
|
|
// Simply apply the pre-computed to_screen_space matrix.
|
|
return (to_screen_space * vec4(point, 1)).xyz;
|
|
}
|
|
}
|