Closed jbauman42 closed 12 years ago
I assume that you're referring to the lighting on prop meshes, such as the ammo cabinets and haystacks, etc. If so, yes. I'm aware that the lighting algorithm is messed up. I've tinkered with it off and on but didn't have the time to fix it before the initial showing that I did. :(
If people are actually trying to use the code, I'll take another peek. It was one of those bugs that was driving me crazy.
(The "Comment" button is very close to the "Comment & Close" button. Did you know?)
I think the issue may be with the "normal" vertex attribute. Coming into the mesh vertex shader, normal is always (0, 0, 0), whereas position, texture, and tangent all look fine. This in turn causes all the tangent space calculations to fall apart.
Fixed by pull request from divergentdave. (Thank you!)
Looking at the demo, it seems that diffuse lighting is either 0 or 1, not in between. It seems like there's an issue with tangentLightDir in the vertex shader, as the y and z components are always 0.