dxDrawMaterialLine3D malfunction in the latest MTA:SA versions
Describe the bug
Since the latest update of MTA:SA, i've encountered a problem with the dxDrawMaterialLine3D function.
Steps to reproduce
Textures drawn with dxDrawMaterialLine3D are significantly brighter than expected. Colors are rendered incorrectly, resulting in an overly bright appearance that deviates from the intended design.
Original:
Latest nightly:
Version
I think, caused by: https://github.com/multitheftauto/mtasa-blue/commit/1f2c6e75fb71b01f0053f151e766a232ed33692b
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.
Marker color code: #00a6ff
That is not an issue. In the latest nightly build you finally have accurate colors. Before 1f2c6e7 colors were distorted by the division by two. See my comment under the PR: https://github.com/multitheftauto/mtasa-blue/pull/3321#issuecomment-1960703565
That is not an issue.
It is, these are 2 different colors. This will cause problems on all servers, all 3d stuff needs to be recolored (even if you recolor, you won't get that real color)
The old solution wasn't correct either. The fix is up to the division has been removed, so it is now possible to specify the colors correctly, but for this you have to use the getColorFilter function, see the example on wiki: https://wiki.multitheftauto.com/wiki/GetColorFilter
Okay. I have conducted a little research. The color should be converted to a linear space before being sent to GPU. That the reason. But it's important to note that before the PR colors were invalid as well. I'll fix it the the next 24 hours.
Here is the fix #3402
Fixed in 8414476
Fixed in 8414476
For 3d stuff works fine, but there is a new issue, see: https://github.com/multitheftauto/mtasa-blue/pull/3402#issuecomment-2136843658