Allow to specify buffer name from parameters in effects
This commit is contained in:
@@ -849,7 +849,11 @@ Texture* GBufferBuilder::build(Effect* effect, Pass* pass, const SGPropertyNode*
|
|||||||
} else {
|
} else {
|
||||||
SG_LOG(SG_INPUT, SG_ALERT, "no texture unit");
|
SG_LOG(SG_INPUT, SG_ALERT, "no texture unit");
|
||||||
}
|
}
|
||||||
buffer = prop->getStringValue("name");
|
const SGPropertyNode* nameProp = getEffectPropertyChild(effect, prop,
|
||||||
|
"name");
|
||||||
|
if (!nameProp)
|
||||||
|
return 0;
|
||||||
|
buffer = nameProp->getStringValue();
|
||||||
|
|
||||||
pass->setBufferUnit( unit, buffer );
|
pass->setBufferUnit( unit, buffer );
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user