Skip to content

Made sprites rendering more compliant to GoldSrc #2188

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

SNMetamorph
Copy link
Member

@SNMetamorph SNMetamorph commented Jun 5, 2025

I did not tested it and cannot be sure that it doesn't conflicts with some Xash-specific features related to sprites. So I'll summon testers to do it.

@@ -748,6 +748,8 @@ void R_DrawSpriteModel( cl_entity_t *e )
{
case kRenderTransAlpha:
pglDepthMask( GL_FALSE );
pglEnable( GL_BLEND );
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Это ничего не меняет, оно же провалится вниз и сделает эти же два вызова второй раз

@@ -756,6 +758,9 @@ void R_DrawSpriteModel( cl_entity_t *e )
break;
case kRenderGlow:
pglDisable( GL_DEPTH_TEST );
pglDepthMask( GL_FALSE );
pglBlendFunc( GL_ONE, GL_ONE );
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Нкоманды выше и ниже просто вызовуться второй раз и ничего не поменяют. А эта не сработает потому что BlendFunc ниже затрёт её.

// all sprites can have color
pglTexEnvi( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE );
if( e->curstate.rendermode == kRenderTransColor )
pglTexEnvi( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_ALPHA );
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

нет такого env mode

@SNMetamorph SNMetamorph marked this pull request as draft June 26, 2025 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants