fade via uniform
This commit is contained in:
parent
8b3604ec9a
commit
01740f7635
2 changed files with 3 additions and 2 deletions
|
@ -139,7 +139,7 @@ bool MsdfAtlasLayerCombo::hasChildren(){
|
|||
}
|
||||
|
||||
// unique
|
||||
void MsdfAtlasLayerCombo::draw(){
|
||||
void MsdfAtlasLayerCombo::draw(bool fade){
|
||||
OFX_PROFILER_FUNCTION()
|
||||
int elements = 0;
|
||||
for(const auto & layer : layers){
|
||||
|
@ -188,6 +188,7 @@ void MsdfAtlasLayerCombo::draw(){
|
|||
//ofPopStyle();
|
||||
|
||||
msdfShader->begin();
|
||||
msdfShader->setUniform1f("fade", fade ? 1.0f : 0.0f);
|
||||
msdfShader->setUniform2f("unitRange", unitRange);
|
||||
msdfShader->setUniform4f("bgColor", bgColor);
|
||||
msdfShader->setUniformTexture("msdf", getAtlasImage().getTexture(), 0);
|
||||
|
|
|
@ -21,7 +21,7 @@ class MsdfAtlasLayerCombo : public AtlasLayerCombo {
|
|||
const ComboIdentifier & getIdentifier() const override;
|
||||
void setVFlip(VFlipState vFlipState) override;
|
||||
bool hasChildren() override;
|
||||
void draw();
|
||||
void draw(bool fade = true);
|
||||
void exit();
|
||||
const ofImage & getAtlasImage();
|
||||
string getAtlasImagePath();
|
||||
|
|
Loading…
Reference in a new issue