armory/Shaders/debug_normals/debug_normals.frag.glsl

16 lines
241 B
Plaintext
Raw Normal View History

2016-07-22 23:25:07 +02:00
#version 450
2017-12-13 14:21:42 +01:00
#include "compiled.glsl"
#include "std/gbuffer.glsl"
2016-07-22 23:25:07 +02:00
uniform sampler2D tex;
in vec2 texCoord;
2016-10-12 17:52:27 +02:00
out vec4 fragColor;
2016-07-22 23:25:07 +02:00
void main() {
vec4 col = texture(tex, texCoord);
2016-10-17 17:39:40 +02:00
vec3 n = getNor(col.rg);
2017-03-11 01:50:47 +01:00
fragColor.rgb = n * 0.5 + 0.5;
2016-07-22 23:25:07 +02:00
}