Fix incorrect alpha blending in render targets#4814
Fix incorrect alpha blending in render targets#4814pedrohenryz wants to merge 2 commits intomultitheftauto:masterfrom
Conversation
|
Why is it marked as "backwards-incompatible"? |
|
I don't fully understand the issue described here - I've never encountered it, even when using transparent dxDraw calls inside a render target (is this a new issue in 1.7?). |
|
This issue already exists in 1.6, the “before” image is from 1.6. Notice that the rectangle on the left (inside the render target) is almost invisible, while the one outside of it is clearly visible. Both have the same color and transparency. You can reproduce the problem in your MTA using this script. |
|
Hmm, I'm not sure this is the correct way to draw render targets. The appropriate blend mode should always be set https://wiki.multitheftauto.com/wiki/DxSetBlendMode |
|
I need to run specific tests. But I don’t think |
|
amazing🚀 |


Semi-transparent elements rendered to RTs were too faint due to alpha being
applied twice (RT + screen), resulting in incorrect opacity.
Use separate alpha blending when rendering to RTs and introduce RT_TEXTURE
blend mode (ONE, INVSRCALPHA) for correct compositing. Automatically apply
RT_TEXTURE when drawing render targets.
Files:
Before:
After: