Added depth sorting attribute to Material class
Only works for billboards for now Former-commit-id: 50a46d3266a2e7fc6d75629103ad8b7193b13bf3
This commit is contained in:
@@ -434,7 +434,7 @@ void NzForwardRenderQueue::Sort(const NzAbstractViewer* viewer)
|
||||
const NzMaterial* mat = pair.first;
|
||||
auto& container = pair.second;
|
||||
|
||||
if (mat->IsEnabled(nzRendererParameter_Blend))
|
||||
if (mat->IsDepthSortingEnabled())
|
||||
{
|
||||
std::sort(container.begin(), container.end(), [&viewerPos](const BillboardData& data1, const BillboardData& data2)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user