Doodle3D-Core/shaders/normal_depth_frag.glsl

10 lines
175 B
Plaintext
Raw Normal View History

2017-11-23 13:17:44 +01:00
varying vec3 vNormal;
varying float vDepth;
void main() {
vec2 normal = vNormal.xy / 2. + .5;
float depth = mod(vDepth, 1.);
gl_FragColor = vec4(normal, depth, 1.);
}