@jnoyola wrote:
I'm touching up my deferred rendering lighting, and I'm noticing strange behavior with the G-Buffer normals. I can't tell if there's something I did wrong, or if it's common, expected behavior.
Look at the first image, where everything seems correct. I have a square room, with the camera pointing down and forward, and a directional light pointing down and to the right. The vertices at the two far corners of the room have normals pointing diagonally towards the center (as shown), with the center of wall having it's proper normal (also shown) as interpolated by the shader.
Now look at the second image. When I move the camera forward, something with the multiplication by WorldViewIT causes the normals to shift (as shown) and the entire far wall becomes dark. This somewhat makes sense since the light direction is in the same plane as the wall, but regardless of the lighting produced, it seems like the normals shouldn't be changing.
Is this expected behavior? I feel like I've seen lighting like this in games before, but it's strange to see the lighting change so much when I just move across the room.
I can share the shader code if necessary.
Posts: 3
Participants: 2