resources.shaders.util.Linear.vert Maven / Gradle / Ivy
The newest version!
#pragma include includes/StdLib.vert
in vec4 in_position; //
in vec2 in_texcoord; //
in vec3 in_normal; //
out vec2 texcoord;
out vec3 normal;
out float depth;
uniform mat4 mat_mvp; //
uniform mat3 mat_nv; //
uniform float near = -1000;
uniform float far = 1000;
void main() {
texcoord = in_texcoord;
normal = mat_nv * in_normal;
gl_Position = mat_mvp * in_position;
depth = (-gl_Position.z-near)/(far-near);
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy