本文整理汇总了C++中FViewInfo::GetDitheredLODTransitionState方法的典型用法代码示例。如果您正苦于以下问题:C++ FViewInfo::GetDitheredLODTransitionState方法的具体用法?C++ FViewInfo::GetDitheredLODTransitionState怎么用?C++ FViewInfo::GetDitheredLODTransitionState使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FViewInfo
的用法示例。
在下文中一共展示了FViewInfo::GetDitheredLODTransitionState方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DrawPrims
bool FCustomDepthPrimSet::DrawPrims(FRHICommandListImmediate& RHICmdList, const FViewInfo& View, bool bWriteCustomStencilValues)
{
bool bDirty=false;
if(Prims.Num())
{
SCOPED_DRAW_EVENT(RHICmdList, CustomDepth);
for (int32 PrimIdx = 0; PrimIdx < Prims.Num(); PrimIdx++)
{
FPrimitiveSceneProxy* PrimitiveSceneProxy = Prims[PrimIdx];
const FPrimitiveSceneInfo* PrimitiveSceneInfo = PrimitiveSceneProxy->GetPrimitiveSceneInfo();
if (View.PrimitiveVisibilityMap[PrimitiveSceneInfo->GetIndex()])
{
const FPrimitiveViewRelevance& ViewRelevance = View.PrimitiveViewRelevanceMap[PrimitiveSceneInfo->GetIndex()];
FDepthDrawingPolicyFactory::ContextType Context(DDM_AllOpaque);
if (bWriteCustomStencilValues)
{
const uint32 CustomDepthStencilValue = PrimitiveSceneProxy->GetCustomDepthStencilValue();
RHICmdList.SetDepthStencilState(TStaticDepthStencilState<true, CF_DepthNearOrEqual, true, CF_Always, SO_Keep, SO_Keep, SO_Replace>::GetRHI(), CustomDepthStencilValue);
}
for (int32 MeshBatchIndex = 0; MeshBatchIndex < View.DynamicMeshElements.Num(); MeshBatchIndex++)
{
const FMeshBatchAndRelevance& MeshBatchAndRelevance = View.DynamicMeshElements[MeshBatchIndex];
if (MeshBatchAndRelevance.PrimitiveSceneProxy == PrimitiveSceneProxy)
{
const FMeshBatch& MeshBatch = *MeshBatchAndRelevance.Mesh;
FDepthDrawingPolicyFactory::DrawDynamicMesh(RHICmdList, View, Context, MeshBatch, false, true, MeshBatchAndRelevance.PrimitiveSceneProxy, MeshBatch.BatchHitProxyId);
}
}
if (ViewRelevance.bStaticRelevance)
{
for (int32 StaticMeshIdx = 0; StaticMeshIdx < PrimitiveSceneInfo->StaticMeshes.Num(); StaticMeshIdx++)
{
const FStaticMesh& StaticMesh = PrimitiveSceneInfo->StaticMeshes[StaticMeshIdx];
if (View.StaticMeshVisibilityMap[StaticMesh.Id])
{
const FMeshDrawingRenderState DrawRenderState(View.GetDitheredLODTransitionState(StaticMesh));
bDirty |= FDepthDrawingPolicyFactory::DrawStaticMesh(
RHICmdList,
View,
Context,
StaticMesh,
StaticMesh.Elements.Num() == 1 ? 1 : View.StaticMeshBatchVisibility[StaticMesh.Id],
true,
DrawRenderState,
PrimitiveSceneProxy,
StaticMesh.BatchHitProxyId
);
}
}
}
}
}
}
return bDirty;
}