armory/Shaders/debug_normals/debug_normals.frag.glsl
2017-03-11 01:50:47 +01:00

20 lines
305 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.rgb = n * 0.5 + 0.5;
}