void TDistortionMeshDrawingPolicy<DistortMeshPolicy>::SetMeshRenderState( FRHICommandList& RHICmdList, const FSceneView& View, const FPrimitiveSceneProxy* PrimitiveSceneProxy, const FMeshBatch& Mesh, int32 BatchElementIndex, bool bBackFace, float DitheredLODTransitionValue, const ElementDataType& ElementData, const ContextDataType PolicyContext ) const { const FMeshBatchElement& BatchElement = Mesh.Elements[BatchElementIndex]; EmitMeshDrawEvents(RHICmdList, PrimitiveSceneProxy, Mesh); // Set transforms VertexShader->SetMesh(RHICmdList, VertexFactory,View,PrimitiveSceneProxy,BatchElement,DitheredLODTransitionValue); if(HullShader && DomainShader) { HullShader->SetMesh(RHICmdList, VertexFactory,View,PrimitiveSceneProxy,BatchElement,DitheredLODTransitionValue); DomainShader->SetMesh(RHICmdList, VertexFactory,View,PrimitiveSceneProxy,BatchElement,DitheredLODTransitionValue); } #if !(UE_BUILD_SHIPPING || UE_BUILD_TEST) // Don't set pixel shader constants if we are overriding with the shader complexity pixel shader if (!bOverrideWithShaderComplexity) #endif // !(UE_BUILD_SHIPPING || UE_BUILD_TEST) { if (!bInitializeOffsets) { DistortPixelShader->SetMesh(RHICmdList, VertexFactory,View,PrimitiveSceneProxy,BatchElement,DitheredLODTransitionValue); } } // Set rasterizer state. RHICmdList.SetRasterizerState(GetStaticRasterizerState<true>( (Mesh.bWireframe || IsWireframe()) ? FM_Wireframe : FM_Solid, IsTwoSided() ? CM_None : (XOR( XOR(View.bReverseCulling,bBackFace), Mesh.ReverseCulling) ? CM_CCW : CM_CW))); }
void FConvertToUniformMeshDrawingPolicy::SetMeshRenderState( FRHICommandList& RHICmdList, const FSceneView& View, const FPrimitiveSceneProxy* PrimitiveSceneProxy, const FMeshBatch& Mesh, int32 BatchElementIndex, bool bBackFace, const FMeshDrawingRenderState& DrawRenderState, const ElementDataType& ElementData, const ContextDataType PolicyContext ) const { const FMeshBatchElement& BatchElement = Mesh.Elements[BatchElementIndex]; // Set transforms VertexShader->SetMesh(RHICmdList, VertexFactory,View,PrimitiveSceneProxy,BatchElement,DrawRenderState); GeometryShader->SetMesh(RHICmdList, VertexFactory,View,PrimitiveSceneProxy,BatchElement,DrawRenderState); // Set rasterizer state. RHICmdList.SetRasterizerState(GetStaticRasterizerState<true>( (Mesh.bWireframe || IsWireframe()) ? FM_Wireframe : FM_Solid, IsTwoSided() ? CM_None : (XOR( XOR(View.bReverseCulling,bBackFace), Mesh.ReverseCulling) ? CM_CCW : CM_CW))); }