added matfx functions for fb alpha

This commit is contained in:
aap 2020-05-27 20:39:51 +02:00
parent 2b797aeca1
commit 6ff378bb16
2 changed files with 19 additions and 0 deletions

View File

@ -225,6 +225,14 @@ MatFX::setEnvCoefficient(float32 coef)
this->fx[i].env.coefficient = coef; this->fx[i].env.coefficient = coef;
} }
void
MatFX::setEnvFBAlpha(bool32 useFBAlpha)
{
int32 i = this->getEffectIndex(ENVMAP);
if(i >= 0)
this->fx[i].env.fbAlpha = useFBAlpha;
}
Texture* Texture*
MatFX::getEnvTexture(void) MatFX::getEnvTexture(void)
{ {
@ -252,6 +260,15 @@ MatFX::getEnvCoefficient(void)
return 0.0f; return 0.0f;
} }
bool32
MatFX::getEnvFBAlpha(void)
{
int32 i = this->getEffectIndex(ENVMAP);
if(i >= 0)
return this->fx[i].env.fbAlpha;
return 0;
}
void void
MatFX::setDualTexture(Texture *t) MatFX::setDualTexture(Texture *t)

View File

@ -140,9 +140,11 @@ struct MatFX
void setEnvTexture(Texture *t); void setEnvTexture(Texture *t);
void setEnvFrame(Frame *f); void setEnvFrame(Frame *f);
void setEnvCoefficient(float32 coef); void setEnvCoefficient(float32 coef);
void setEnvFBAlpha(bool32 useFBAlpha);
Texture *getEnvTexture(void); Texture *getEnvTexture(void);
Frame *getEnvFrame(void); Frame *getEnvFrame(void);
float32 getEnvCoefficient(void); float32 getEnvCoefficient(void);
bool32 getEnvFBAlpha(void);
// Dual // Dual
void setDualTexture(Texture *t); void setDualTexture(Texture *t);
void setDualSrcBlend(int32 blend); void setDualSrcBlend(int32 blend);