-
-
Notifications
You must be signed in to change notification settings - Fork 302
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
base: master
Are you sure you want to change the base?
Conversation
@@ -748,6 +748,8 @@ void R_DrawSpriteModel( cl_entity_t *e ) | |||
{ | |||
case kRenderTransAlpha: | |||
pglDepthMask( GL_FALSE ); | |||
pglEnable( GL_BLEND ); |
There was a problem hiding this comment.
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 ); |
There was a problem hiding this comment.
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 ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
нет такого env mode
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.