jucraft/assets/shader/outline.vsh.glsl
2023-04-25 13:54:37 +02:00

21 lines
No EOL
407 B
GLSL

#version 100
precision mediump float;
attribute vec3 pos;
uniform vec3 wpos;
uniform mat4 view;
uniform mat4 proj;
void main() {
mat4 drawProj = mat4(
vec4(-1.0, 0.0, 0.0, 0.0),
vec4(0.0, 1.0, 0.0, 0.0),
vec4(0.0, 0.0, -1.0, 0.0),
vec4(-wpos.x, wpos.y, -wpos.z, 1.0)
);
gl_Position = proj * view * drawProj * vec4(pos, 1.0);
gl_Position.z -= 0.0001;
}