armory/Shaders/debug_normals/debug_normals.frag.glsl
2016-10-25 13:01:20 +02:00

21 lines
312 B
GLSL
Executable file

#version 450
#ifdef GL_ES
precision mediump float;
#endif
#include "../compiled.glsl"
#include "../std/gbuffer.glsl"
// getNor()
uniform sampler2D tex;
in vec2 texCoord;
out vec4 fragColor;
void main() {
vec4 col = texture(tex, texCoord);
vec3 n = getNor(col.rg);
fragColor = vec4(n * 0.5 + 0.5, 1.0);
}