It's been a while since I've used global textures: Since global textures are everywhere and RTVs need to be defined explicitly, OgreNext is currently not autogenerating the RTVs for the nodes that need it. But you can write one yourself:
Code: Select all
compositor_node Final
{
in 0 rt_out
rtv my_rtv
{
color global_rt
}
target my_rtv
{
pass clear {}
}
target rt_out
{
pass clear {}
}
}
workspace ExampleWorkspace
{
texture global_rt target_width target_height PFG_RGBA16_FLOAT msaa_auto
connect_external 0 Final 0
}
See the full syntax in the manual.
HINT: Rather than using a global texture you may find it more useful to create an empty node that just defines textures and outputs them, like this:
Code: Select all
compositor_node TextureOwner
{
texture my_own_rt target_width target_height PFG_RGBA16_FLOAT msaa_auto
out 0 my_own_rt
}
compositor_node Final
{
in 0 rt_out
in 1 my_own_rt
target my_own_rt
{
pass clear {}
}
target rt_out
{
pass clear {}
}
}
workspace ExampleWorkspace
{
connect 0 TextureOwner 1 Final
connect_external 0 Final 0
}
This is more flexible because when you need to modify your graphics settings and thus the Compositor, you can rewire some nodes with the additional textures (specially true for MSAA because MSAA often requires extra textures to be handled as a special case). Having global texture names means that if you suddenly wish Node A and Node B to have a different texture, you must change the script for both nodes. But with this approach, you can just rewire Node B to source its texture from a different node; which can happen at runtime if graphics settings change.