mtasa-blue
mtasa-blue copied to clipboard
GENERATE_NORMALS generates completely useless normals
Describe the bug
Recently i tried this HLSL value and the result is bad. I dont know if this can even be fixed but in its current state GENERATE_NORMALS is literally useless:
https://imgur.com/a/CsVJDTL
Steps to reproduce
- Export a model with vertex prelight and vertex color (Doing so will export the model without vertex normals due to DFF limitation)
- Replace any object
- Apply a dynamic lighting shader to that object that uses normals to calculate the light, it will be completely screwed
Version
Multi Theft Auto v1.5.9-release-21166
Additional context
No response
Relevant log output
No response
Security Policy
- [X] I have read and understood the Security Policy and this issue is not security related.
It doesn't generate any normals, takes them from model, if they are not present normals will be 0,0,0
How is it possible that there are no normals? The faces must face in a direction. It should take these values. What it currently does looks like fully random.
https://github.com/multitheftauto/mtasa-blue/blob/16769b8d1c94e2b9fe6323dcba46d1305f87a190/Client/core/CAdditionalVertexStreamManager.cpp#L105-L128
CheckCanDoThis looks like reason of this
It seems that the normal handling needs improvement and this solution has been made transitional only as long as there is nothing better available
It doesn't generate any normals, takes them from model, if they are not present normals will be 0,0,0
That is not true. See CAdditionalVertexStreamManager::UpdateAdditionalStreamContent