本文整理汇总了C++中FRHICommandList::CopyToResolveTarget方法的典型用法代码示例。如果您正苦于以下问题:C++ FRHICommandList::CopyToResolveTarget方法的具体用法?C++ FRHICommandList::CopyToResolveTarget怎么用?C++ FRHICommandList::CopyToResolveTarget使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FRHICommandList
的用法示例。
在下文中一共展示了FRHICommandList::CopyToResolveTarget方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: FinishOcclusionTerm
void FinishOcclusionTerm(FRHICommandList& RHICmdList, const FViewInfo& View, const FLightSceneInfo* const LightSceneInfo, TRefCountPtr<IPooledRenderTarget>& LightShaftsSource, TRefCountPtr<IPooledRenderTarget>& LightShaftsDest)
{
TShaderMapRef<FScreenVS> ScreenVertexShader(View.ShaderMap);
const FIntPoint BufferSize = FSceneRenderTargets::Get(RHICmdList).GetBufferSizeXY();
const uint32 DownsampleFactor = GetLightShaftDownsampleFactor();
const FIntPoint FilterBufferSize = BufferSize / DownsampleFactor;
const FIntPoint DownSampledXY = View.ViewRect.Min / DownsampleFactor;
const uint32 DownsampledSizeX = View.ViewRect.Width() / DownsampleFactor;
const uint32 DownsampledSizeY = View.ViewRect.Height() / DownsampleFactor;
SetRenderTarget(RHICmdList, LightShaftsDest->GetRenderTargetItem().TargetableTexture, FTextureRHIRef());
RHICmdList.SetViewport(0, 0, 0.0f, FilterBufferSize.X, FilterBufferSize.Y, 1.0f);
RHICmdList.SetBlendState(TStaticBlendState<>::GetRHI());
RHICmdList.SetRasterizerState(TStaticRasterizerState<>::GetRHI());
RHICmdList.SetDepthStencilState(TStaticDepthStencilState<false, CF_Always>::GetRHI());
TShaderMapRef<FFinishOcclusionPixelShader> MaskOcclusionTermPixelShader(View.ShaderMap);
SetGlobalBoundShaderState(RHICmdList, View.GetFeatureLevel(), AccumulateTermBoundShaderState, GFilterVertexDeclaration.VertexDeclarationRHI, *ScreenVertexShader, *MaskOcclusionTermPixelShader);
/// ?
MaskOcclusionTermPixelShader->SetParameters(RHICmdList, LightSceneInfo, View, LightShaftsSource);
{
// Apply a radial blur to the bloom and occlusion mask
DrawRectangle(
RHICmdList,
DownSampledXY.X, DownSampledXY.Y,
DownsampledSizeX, DownsampledSizeY,
DownSampledXY.X, DownSampledXY.Y,
DownsampledSizeX, DownsampledSizeY,
FilterBufferSize, FilterBufferSize,
*ScreenVertexShader,
EDRF_UseTriangleOptimization);
}
RHICmdList.CopyToResolveTarget(LightShaftsDest->GetRenderTargetItem().TargetableTexture, LightShaftsDest->GetRenderTargetItem().ShaderResourceTexture, false, FResolveParams());
}