mtasa-blue icon indicating copy to clipboard operation
mtasa-blue copied to clipboard

dxDrawMaterialLine3D malfunction in the latest MTA:SA versions

Open Xenius97 opened this issue 1 year ago • 6 comments

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: image

Latest nightly: image

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.

Xenius97 avatar May 24 '24 13:05 Xenius97

Marker color code: #00a6ff

Xenius97 avatar May 24 '24 13:05 Xenius97

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

tederis avatar May 24 '24 13:05 tederis

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)

image image

Xenius97 avatar May 24 '24 13:05 Xenius97

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

Nico8345 avatar May 24 '24 14:05 Nico8345

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.

tederis avatar May 24 '24 14:05 tederis

Here is the fix #3402

tederis avatar May 25 '24 06:05 tederis

Fixed in 8414476

Dutchman101 avatar May 25 '24 23:05 Dutchman101

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

Xenius97 avatar May 29 '24 08:05 Xenius97