Open Leopard1907 opened 2 years ago
This is using fixed function and inverting the view * world matrix doesn't work. So we end up passing a matrix full of NaN and INF to the shader which messes up the normal and the lighting after that.
Apparently D3D9 just passes the transposed WorldView matrix when it can not be inverted.
Then there's also this:
directional light: 0, 0, -1 normals: 0, 0, 1 3rd column in the transform matrix: 0, 0, 0
My best theory is that D3DRS_NORMALIZENORMALS
turns the 0,0,0 normal that we get after applying the normal matrix into something sensible that works here. I haven't confirmed that yet though.
Software information
Fruit Ninja HD
System information
Apitrace file(s)
Log files
Additional info