#include "core.fsh"
#include "pixel_codec.fsh"
in highp vec4 DepthNormal_f;

#if defined(DISL_DPETH_NORMAL_COMPRESSED)
layout(location = 0) out vec4 G_DepthNormal;
#else
layout(location = 0) out vec4 G_Depth;
layout(location = 1) out vec3 G_Normal;
#endif

void main()
{
#if defined(DISL_DPETH_NORMAL_COMPRESSED)
    G_DepthNormal = EncodeDepthNormal(DepthNormal_f.x, DepthNormal_f.yzw);
#else
    G_Depth = EncodeFloatRGBA(DepthNormal_f.x);
    G_Normal = DepthNormal_f.yzw * 0.5 + 0.5;
#endif
}
