armory/Shaders/debug_draw/line_deferred.frag.glsl
2018-11-27 21:44:56 +01:00

19 lines
367 B
GLSL

#version 450
#include "compiled.inc"
in vec3 color;
// #ifdef HLSL
vec4 wvpposition;
// #endif
out vec4[2] fragColor;
void main() {
// #ifdef HLSL // D3D
fragColor[0] = vec4(1.0, 1.0, 0.0, 1.0 - ((wvpposition.z / wvpposition.w) * 0.5 + 0.5));
// #else
// fragColor[0] = vec4(1.0, 1.0, 0.0, 1.0 - gl_FragCoord.z);
// #endif
fragColor[1] = vec4(color, 1.0);
}