Possible bin/group index mismatch in NaniteRasterBinning.usf with bindless rasterization (UE 5.8)

We noticed a possible index mismatch in NaniteRasterBinning.usf in our UE 5.8-based branch, with D3D12/SM6, Minimal bindless, Nanite bindless rasterization, and depth bucketing enabled.

The helper reads raster group metadata:

uint GetRasterBinDepthBlock(uint GroupIndex)
{
    return OutRasterGroupMeta[GroupIndex].MaterialFlags_DepthBlock >> 16;
}

However, inside ExportRasterGroup(uint RasterGroup, uint RasterBin, ...), it is called with the raster bin index:

uint DepthBlock = GetRasterBinDepthBlock(RasterBin);

The caller already obtains the group index through:

const uint RasterGroup = GetRasterBinGroup(RasterBin);
// Returns OutRasterBinMeta[RasterBin].GroupIndex

Since bindless rasterization can merge multiple bins into one group, RasterBin and RasterGroup are not necessarily equal.

[Attachment Removed]

Hi there,

This issue has been fixed in UE6 CL#57339416 (f205b4) Fixed bug where Nanite depth block was indexed with rasterbin when it should now be rastergroup.

[Attachment Removed]

have any other known issues across Nanite’s bindless implementation been fixed in UE6?

There haven’t been many changes in this area, but the following related changes came up in my search:

UE6 CL#57343310 (c30cb2) Nanite bindless: Disabled unsafe merging of materials that are pixel programmable or use tessellation

CL#53851836 (dbe021) [Nanite] Merging //UE5/Dev-NaniteResearch to Main (//UE5/Main)

This integration includes the following Nanite-related work:

- Work in progress of Nanite Translucency (experimental, disabled by default)

- Work in progress of Nanite Curves (experimental, disabled by default)

- Bindless improvements/fixes

- Performance optimizations to cluster culling of Nanite skinned meshes

- Removal of Nanite Imposter code (was fully disabled previously)

- Other Nanite fixes/improvements

[Attachment Removed]

Thanks for confirming and sharing the fix. Beyond this depth-block indexing issue, have any other known issues across Nanite’s bindless implementation been fixed in UE6?

[Attachment Removed]