Doodle3D-Core/shaders/normal_depth_vert.glsl

11 lines
241 B
Plaintext
Raw Normal View History

2017-11-23 13:17:44 +01:00
varying vec3 vNormal;
varying float vDepth;
void main() {
vNormal = normalize(normalMatrix * normal);
vDepth = (projectionMatrix * modelViewMatrix * vec4(position, 1.0)).z / 30.;
#include <begin_vertex>
#include <project_vertex>
}