armory/Shaders/debug_normals/debug_normals.frag.glsl

21 lines
312 B
Plaintext
Raw Normal View History

2016-07-22 23:25:07 +02:00
#version 450
#ifdef GL_ES
precision mediump float;
#endif
#include "../compiled.glsl"
2016-10-17 17:39:40 +02:00
#include "../std/gbuffer.glsl"
// getNor()
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);
2016-10-12 17:52:27 +02:00
fragColor = vec4(n * 0.5 + 0.5, 1.0);
2016-07-22 23:25:07 +02:00
}