2. Is it correct that V1_LEGACY z-depths do not affect V1_FAST (and FAST)?
Our application is cycling render queue group mode as group id increases (0=V1_LEGACY, 1=V1_FAST, 2=FAST, 3=V1_LEGACY, and so on), so that we have full control of draw order independent of legacy or not. Or so I thought. But I just noticed that when I tried to render a V1_LEGACY object that should be front-most, by putting it in a high V1_LEGACY group id, it was always displaying behind V1_FAST objects that had much lower group id.. I then switched to a HLMS Unlit datablock just for test, and then the object correctly displayed in front..
When looking at the implementation of RenderQueue::render, it seems like render queues with mode V1_LEGACY render immediately, while V1_FAST and FAST are added to command buffer and executed after the loop, so that V1_LEGACY objects are always rendered first?
In my test it also seems like the z-depth written by the V1_LEGACY object does not cull the V1_FAST objects that should be behind.. For example I use the following simple LLM to just draw something front most (the V1_FAST objects just use standard PBS datablocks):
Code: Select all
struct VsOut
{
float4 position : SV_Position;
};
struct PsOut
{
float4 color : SV_TARGET;
};
VsOut vs(float4 position : POSITION)
{
VsOut Out;
Out.position = float4(position.xy, 0.0, 1.0);
return Out;
}
PsOut ps()
{
PsOut Out;
Out.color = float4(1.0, 0.0, 0.0, 1.0);
return Out;
}
Code: Select all
vertex_program polygonMaskVS hlsl
{
target vs_4_0
source polygonMask.hlsl
entry_point vs
}
fragment_program polygonMaskPS hlsl
{
target ps_4_0
source polygonMask.hlsl
entry_point ps
}
Code: Select all
material polygonMask
{
technique
{
pass
{
cull_hardware none
cull_mode none
depth_write on
vertex_program_ref polygonMaskVS
{
}
fragment_program_ref polygonMaskPS
{
}
}
}
}