mirror of
https://github.com/3b1b/manim.git
synced 2025-11-14 06:47:51 +00:00
Remove redundant and unused get_gl_Position.glsl file
This commit is contained in:
parent
8179ba88d0
commit
60b762ca43
1 changed files with 0 additions and 23 deletions
|
|
@ -1,23 +0,0 @@
|
|||
uniform float is_fixed_in_frame;
|
||||
uniform mat4 view;
|
||||
uniform float focal_distance;
|
||||
|
||||
const float DEFAULT_FRAME_HEIGHT = 8.0;
|
||||
const float ASPECT_RATIO = 16.0 / 9.0;
|
||||
const float X_SCALE = 2.0 / DEFAULT_FRAME_HEIGHT / ASPECT_RATIO;
|
||||
const float Y_SCALE = 2.0 / DEFAULT_FRAME_HEIGHT;
|
||||
|
||||
void emit_gl_Position(vec3 point){
|
||||
vec4 result = vec4(point, 1.0);
|
||||
if(!bool(is_fixed_in_frame)){
|
||||
result = view * result;
|
||||
}
|
||||
// Essentially a projection matrix
|
||||
result.x *= X_SCALE;
|
||||
result.y *= Y_SCALE;
|
||||
result.z /= focal_distance;
|
||||
result.w = 1.0 - result.z;
|
||||
// Flip and scale to prevent premature clipping
|
||||
result.z *= -0.1;
|
||||
gl_Position = result;
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue