Fix objects with alpha below 141 are invisible#4751
Merged
Conversation
Dutchman101
approved these changes
Mar 11, 2026
Member
|
This would be ok, unless we get a bunch of user reports from different trees (or tree mods, or any unchecked scenario) that there's worsened visual glitches. Time will tell and we got to pay attention. |
Lpsd
pushed a commit
to Lpsd/mtasa-blue
that referenced
this pull request
Apr 11, 2026
This PR fixes a bug where objects with alpha < 141 are not rendered.
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR fixes a bug where objects with alpha < 141 are not rendered.
This issue has two stages: the first is the alpha threshold (
rwRENDERSTATEALPHATESTFUNCTIONREF) set to 140 in the functionCRenderer::RenderEverythingBarRoads- this is the direct cause of #425. The next stage is in the functionCVisibilityPlugins::RenderEntity, where the alpha threshold is set to 100, and then objects with alpha < 101 are not rendered.Is it safe to just set this to 0?
These settings were R*’s attempts to fix the halo effect around trees and bushes, which, as can be seen in the game, did not work.
I did not observe any new or worse rendering bugs with plants after setting these values to 0.
Alpha halo bugs "fixed" by R*:



Motivation
Fixes #425
Test plan
crun o = createObject(1337, me.position)crun o.alpha = 140Checklist