i've strange problem multiple render targets. attached 3 textures fbo: color, normal , position. can correctly render color , position, rendering normal texture yields (green , red part of spinning cube):
in lower left corner, there result of rendering normal texture quad.
in vertex shader, i'm computing normal as: normal = gl_normalmatrix * gl_normal
, , in fragment shader, i'm emitting as: gl_fragdata[1] = vec4(normal, 1);
.
what's issue here?
turns out forgot supply normals rendered quads. adding glnormal3f()
calls fixed problem.
Comments
Post a Comment