Problem: Textures that refer to other Textures in a CompositorsChain can not be fetch with CompositorInstance::getTargetForTex(const String &name)
Example (see below): Compositor CompA has a Texture CompATexture. Composior CompB has a Reference named RefToCompATexture to CompATexture.
CompositorInstance::getTargetForTex(const String &name) will throw an exception if i search for CompATexture in CompB, because it only looks after the name of the texture in reference compositors, not for the reference name
Code: Select all
compB->getTargetForTex("CompATexture"); // -> will succeed
compB->getTargetForTex("RefToCompATexture ");// -> throws exeption
A patch is here: https://sourceforge.net/tracker/?func=d ... tid=302997.
Code: Select all
compositor CompA
{
technique
{
texture CompATexture target_width target_height PF_R8G8B8A8 chain_scope
target CompATexture
{
input none
material_scheme some_fancy_stuff
pass clear
{
clear
{
buffers colour depth
colour_value 1 1 1 1
depth_value 1.0
}
}
pass render_scene
{
}
}
target_output
{
input none
pass render_quad
{
material copy_buffer
input 0 CompATexture
}
}
}
}
compositor CompB
{
technique
{
texture_ref RefToCompATexture CompA CompATexture
target_output
{
input none
pass render_quad
{
material copy_buffer
input 0 RefToCompATexture
}
}
}
}