mirror of
https://github.com/3b1b/manim.git
synced 2025-08-05 16:49:03 +00:00
12 lines
530 B
Text
12 lines
530 B
Text
![]() |
// Assumes the following uniforms exist in the surrounding context:
|
||
|
// uniform float aspect_ratio;
|
||
|
|
||
|
vec4 get_gl_Position(vec3 point){
|
||
|
// Extremely minimal modification, but that might change later...
|
||
|
point.x /= aspect_ratio;
|
||
|
// Todo, does this discontinuity add weirdness? Theoretically, by this point,
|
||
|
// the z-coordiante of gl_Position only matter for z-indexing. The reason
|
||
|
// for thie line is to avoid agressive clipping of distant points.
|
||
|
if(point.z < 0) point.z *= 0.1;
|
||
|
return vec4(point, 1);
|
||
|
}
|