Skip to content

Commit

Permalink
added matfx functions for fb alpha
Browse files Browse the repository at this point in the history
  • Loading branch information
aap committed May 27, 2020
1 parent 2b797ae commit 6ff378b
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/matfx.cpp
Expand Up @@ -225,6 +225,14 @@ MatFX::setEnvCoefficient(float32 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*
MatFX::getEnvTexture(void)
{
Expand Down Expand Up @@ -252,6 +260,15 @@ MatFX::getEnvCoefficient(void)
return 0.0f;
}

bool32
MatFX::getEnvFBAlpha(void)
{
int32 i = this->getEffectIndex(ENVMAP);
if(i >= 0)
return this->fx[i].env.fbAlpha;
return 0;
}


void
MatFX::setDualTexture(Texture *t)
Expand Down
2 changes: 2 additions & 0 deletions src/rwplugins.h
Expand Up @@ -140,9 +140,11 @@ struct MatFX
void setEnvTexture(Texture *t);
void setEnvFrame(Frame *f);
void setEnvCoefficient(float32 coef);
void setEnvFBAlpha(bool32 useFBAlpha);
Texture *getEnvTexture(void);
Frame *getEnvFrame(void);
float32 getEnvCoefficient(void);
bool32 getEnvFBAlpha(void);
// Dual
void setDualTexture(Texture *t);
void setDualSrcBlend(int32 blend);
Expand Down

0 comments on commit 6ff378b

Please sign in to comment.