ref: gl: draw normal-rendermode sprites according to their texture format - #2730
Open
oscarsolerfollana wants to merge 1 commit into
Open
oscarsolerfollana wants to merge 1 commit into
oscarsolerfollana wants to merge 1 commit into
Conversation
…rmat GoldSrc, inheriting from Quake, draws sprites in kRenderNormal according to the sprite's own texFormat: additive sprites blend additively and indexalpha sprites alpha-blend. Xash disabled blending entirely, drawing them opaque. Visible in Natural Selection: the lerk's spore projectile is a client-side temp entity that never sets a rendermode, so its indexalpha sprite rendered as an opaque green blob instead of a translucent cloud. Minimal repro with any indexalpha sprite, no mod needed: ent_create env_sprite model sprites/spore2.spr spawnflags 1
Member
|
Thanks, will review it later |
a1batross
requested changes
Sep 6, 2026
| case kRenderNormal: | ||
| default: | ||
| pglDisable( GL_BLEND ); | ||
| // GoldSrc parity: in the normal render mode sprites draw according to |
Member
There was a problem hiding this comment.
GoldSrc doesn't really check for texFormat when it decides the blending, it only matters during texture load.
Member
There was a problem hiding this comment.
I think we just implement the same blending GoldSrc uses on sprites and a gl_spriteblend cvar.
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.
GoldSrc (inheriting from Quake) draws sprites in
kRenderNormalaccording to the sprite's owntexFormat: additive sprites blend additively, indexalpha sprites alpha-blend. Xash disables blending entirely, so they render opaque.Visible in Natural Selection: the lerk's spore projectile is a client-side temp entity that never sets a rendermode — its indexalpha sprite renders as an opaque green blob instead of a translucent cloud (correct on GoldSrc). Verified fixed in-game.
Minimal repro with any indexalpha sprite, no mod needed:
Explicit rendermodes are unaffected — the change only touches the
kRenderNormal/default path.