
I want to implement some temporal anti-aliasing using color, depth and history textures.
The idea is as follows:
I have two historyMaps, one to read from, one to write to.
Both are to be swapped after every render pass, from the "outside".
The important bit is that I want to define the history map outside of the compositor via Ogres TextureManager:
Or rather I need the texture after the rendering is done.
Code: Select all
mHistoryTexture[0] = Ogre::TextureManager::getSingleton().createManual(
"???historyMap???", Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME,
Ogre::TEX_TYPE_2D, recommendedTexSize[EYE::LEFT].w, recommendedTexSize[EYE::LEFT].h, 0, Ogre::PF_R8G8B8A8,
Ogre::TU_RENDERTARGET );
I guess the key phrase is: adding manual textures to a compositor.
Down below is my compositor.
I would appreciate some help on this matter, there is probably an answer to this I have not yet found.
Thanks for reading.
Code: Select all
compositor TXAA
{
technique
{
texture colorDepthMRT target_width target_height PF_R8G8B8A8 PF_FLOAT32_R
texture historyMap target_width target_height PF_R8G8B8A8
target colorDepthMRT
{
input previous
}
target_output
{
render_quad
{
material TXAA
input 0 colorDepthMRT 0
input 1 colorDepthMRT 1
input 2 historyMap 0
}
}
}
}