19 lines
432 B
GLSL
19 lines
432 B
GLSL
uniform sampler2D ntex;
|
|
|
|
out vec4 Diff;
|
|
out vec4 Spec;
|
|
|
|
#stk_include "utils/decodeNormal.frag"
|
|
#stk_include "utils/getPosFromUVDepth.frag"
|
|
#stk_include "utils/DiffuseIBL.frag"
|
|
#stk_include "utils/SpecularIBL.frag"
|
|
|
|
void main(void)
|
|
{
|
|
vec2 uv = gl_FragCoord.xy / screen;
|
|
vec3 normal = normalize(DecodeNormal(2. * texture(ntex, uv).xy - 1.));
|
|
|
|
Diff = vec4(0.25 * DiffuseIBL(normal), 1.);
|
|
Spec = vec4(0., 0., 0., 1.);
|
|
}
|