out vec2 fragUv; out vec3 fragNormal; out vec3 fragPos; out vec2 screenUv; void main() { // normal vertex stuff gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 ); // this is so i get the texture warping effect, you can remove it but it will also affect the halftoning gl_Position /= gl_Position.w; // just pass the stuff to the frag shader fragUv = uv; fragNormal = normalMatrix * normal; // worldspace fragPos = (modelMatrix * vec4( position, 1.0 )).xyz; // pass position in worldspace aswell screenUv = gl_Position.xy; // meow }