|Supermodel 0.3 WIP SVN623 ||[witek], 2017-08-04 15:08:40|
Convert sun angle coordinate system outside of the shader.
Remove WIP code.
Clamp the ambient light to a max of 0.75. LA Machine guns seems to use an ambient value of 1, which is full bright for everything. But for some reason the hardware seems to treat this as ~ 0.75. This fixes various missing shading in the game. This doesnt seem to have any negative effects on other games I have tested. Clamping in the shader as we might need the full range of values for fixed shading.
Use c++11 raw string literals.
Implement unclamped light model based upon Harrys findings. Unknown how this is turned on/off.
We were force normalising the result of matrix * normal, which looked correct in most cases. But this didnt preserve the scaling of the matrix, or the scaling of the model normals which resulted in many over bright areas. On its own this generally worked, but games like Star Wars looked quite broken. Harry correctly figured out if you scale these normals by the scaling value that is sometimes present in the culling nodes the lighting looks correct. Still more work to do to correctly figure out the model3s lighting model.
Ski champ for some reason is passing denormalised numbers for the modelscale. This is causing a NaN in our shader killing the lighting for these models, so we simply skip these, since they are essentially zero anyway. Thanks to Harry for finding this bug :)
Add the unclamped light model we know exists to the shaders.