I'm trying to change my compositor so that rendering goes to locally-created textures until the end, at which point it may be copied to a window. But I'm having a problem with depths.
If I set up a compositor node to use local color and depth textures, linked with an RTV, can I then pass them to other nodes, and have the depth texture still be the depth buffer for the color texture? Setting up an RTV in a script seems to be too new to be in the manual, and unfortunately the phpBB forum software won't let me search for a 3-letter word like "rtv".
Consider the following:
Code: Select all
compositor_node Start
{
in 0 ultimateDestination
texture colorTx target_width target_height target_format
texture depthTx target_width target_height PFG_D32_FLOAT
rtv colorTx
{
depth depthTx
}
target colorTx
{
pass render_scene
{
load { all clear }
store { all store }
rq_first 0
rq_last 210
}
}
out 0 ultimateDestination
out 1 colorTx
out 2 depthTx
}
compositor_node Halo
{
in 0 ultimateDestination
in 1 colorTx
in 2 depthTx
texture selDepth target_width target_height PFG_D32_FLOAT
target selDepth
{
pass render_scene
{
load { depth clear }
store { depth store }
rq_first 211
rq_last 212
}
}
target colorTx
{
pass render_quad
{
load { all load }
store { all store }
material JWHalo
input 0 selDepth
}
}
out 0 ultimateDestination
out 1 colorTx
out 2 depthTx
}
compositor_node Finish
{
in 0 ultimateDestination
in 1 colorTx
in 2 depthTx
target ultimateDestination
{
pass render_quad
{
load { all clear }
store { all store }
material JWCopy
input 0 depthTx
input 1 colorTx
}
}
}
It looks as if the depth check always passes in the quad pass of the Halo node. That didn't happen when the quad pass of the Halo node was rendering to the window.