Hi,
I have a question regarding the nanite pixel programmable visualization mode (r.nanite.visualize pixelprogrammable). When using it to profile our nanite performances, I was surprised to see that none of the materials using two sided or WPO were flagged by the visualization (ie appearing red). When checking the shader code, here’s what it looks like:
else if (VisualizeMode == NANITE_VISUALIZE_PIXEL_PROGRAMMABLE_RASTER)
{
bool bHighlight = false;
switch (GetPixelProgrammableVisMode())
{
case NANITE_PIXEL_PROG_VIS_MODE_DEFAULT:
bHighlight = MaterialFlags.bPixelDiscard || MaterialFlags.bPixelDepthOffset;
break;
case NANITE_PIXEL_PROG_VIS_MODE_MASKED_ONLY:
bHighlight = MaterialFlags.bPixelDiscard;
break;
case NANITE_PIXEL_PROG_VIS_MODE_PDO_ONLY:
bHighlight = MaterialFlags.bPixelDepthOffset;
break;
default:
break;
}
if (bFallbackRaster &&
(PrimitiveData.PixelProgrammableDistanceSquared > 0.0f ||
PrimitiveData.MaterialDisplacementFadeOutSize > 0.0f))
{
// We've disabled pixel programmable for this cluster
bHighlight = false;
}
Result = select(bHighlight, float3(1, 0, 0), float3(0.1, 0, 0.3));
}
From that code we are only checking for masked materials and pixel depth offset and ignoring flags like bDisplacement, bTwoSided and bWorldPositionOffset which as far as I understood would trigger the pixel programmable pipeline.
Is there any reason why the pixelprogrammable visualization is only checking those two flags?
Thanks.