mirror of
https://bitbucket.org/CPMADevs/cnq3
synced 2024-11-25 13:31:15 +00:00
trivial CRP code improvement
This commit is contained in:
parent
b7522d8f7c
commit
ea3b071c58
2 changed files with 3 additions and 6 deletions
|
@ -261,7 +261,6 @@ void AccumDepthOfField::Accumulate()
|
|||
CmdBindPipeline(accumPipeline);
|
||||
CmdSetGraphicsRootConstants(0, sizeof(rc), &rc);
|
||||
CmdDraw(3, 0);
|
||||
|
||||
}
|
||||
|
||||
void AccumDepthOfField::Normalize()
|
||||
|
|
|
@ -134,8 +134,6 @@ struct DOFCombineRC
|
|||
|
||||
void GatherDepthOfField::Init()
|
||||
{
|
||||
const TextureFormat::Id renderTargetFormat = TextureFormat::R16G16B16A16_Float;
|
||||
|
||||
tileTextureWidth = (uint32_t)(glConfig.vidWidth + 15) / 16;
|
||||
tileTextureHeight = (uint32_t)(glConfig.vidHeight + 15) / 16;
|
||||
|
||||
|
@ -148,14 +146,14 @@ void GatherDepthOfField::Init()
|
|||
{
|
||||
GraphicsPipelineDesc desc("DOF combine");
|
||||
MakeFullScreenPipeline(desc, ShaderByteCode(g_combine_ps));
|
||||
desc.AddRenderTarget(0, renderTargetFormat);
|
||||
desc.AddRenderTarget(0, crp.renderTargetFormat);
|
||||
combinePipeline = CreateGraphicsPipeline(desc);
|
||||
}
|
||||
|
||||
{
|
||||
GraphicsPipelineDesc desc("DOF viz");
|
||||
MakeFullScreenPipeline(desc, ShaderByteCode(g_debug_ps));
|
||||
desc.AddRenderTarget(0, renderTargetFormat);
|
||||
desc.AddRenderTarget(0, crp.renderTargetFormat);
|
||||
debugPipeline = CreateGraphicsPipeline(desc);
|
||||
}
|
||||
|
||||
|
@ -165,7 +163,7 @@ void GatherDepthOfField::Init()
|
|||
desc.committedResource = true;
|
||||
desc.initialState = ResourceStates::UnorderedAccessBit;
|
||||
desc.allowedState = ResourceStates::UnorderedAccessBit | ResourceStates::ComputeShaderAccessBit | ResourceStates::PixelShaderAccessBit;
|
||||
desc.format = renderTargetFormat;
|
||||
desc.format = crp.renderTargetFormat;
|
||||
farColorTexture = CreateTexture(desc);
|
||||
desc.name = "DOF near field color";
|
||||
nearColorTexture = CreateTexture(desc);
|
||||
|
|
Loading…
Reference in a new issue