mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-17 05:09:58 +01:00
New feature: Texture view Mask Source
Enable use of a source as mask for another source. Improved Mask mechanism in Source class, with various flags for update of source (avoid repeated mask update (GPU costly). Using SourceLink to link source to mask (improved robustness of SourceLink).
This commit is contained in:
@@ -1014,7 +1014,12 @@ void SessionLoader::visit (Source& s)
|
||||
if (xmlCurrent_) {
|
||||
// read the mask shader attributes
|
||||
s.maskShader()->accept(*this);
|
||||
// set the mask from jpeg
|
||||
// set id of source used as mask (if exists)
|
||||
uint64_t id__ = 0;
|
||||
xmlCurrent_->QueryUnsigned64Attribute("source", &id__);
|
||||
s.maskSource()->connect(id__, session_);
|
||||
s.touch(Source::SourceUpdate_Mask);
|
||||
// set the mask from jpeg (if exists)
|
||||
s.setMask( SessionLoader::XMLToImage(xmlCurrent_) );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user