Fix SceneLinearDepth texture using wrong size
This commit is contained in:
parent
f8f4ef5cbb
commit
f41e7f044a
1 changed files with 6 additions and 2 deletions
|
|
@ -78,6 +78,12 @@ void VkRenderBuffers::BeginFrame(int width, int height, int sceneWidth, int scen
|
|||
if (width != mWidth || height != mHeight || mSamples != samples)
|
||||
CreateScene(width, height, samples);
|
||||
|
||||
if (sceneWidth != mSceneWidth || sceneHeight != mSceneHeight)
|
||||
{
|
||||
SceneLinearDepth.Reset(fb);
|
||||
CreateSceneLinearDepth(std::max(sceneWidth, 1), std::max(sceneHeight, 1));
|
||||
}
|
||||
|
||||
mWidth = width;
|
||||
mHeight = height;
|
||||
mSamples = samples;
|
||||
|
|
@ -174,13 +180,11 @@ void VkRenderBuffers::CreateScene(int width, int height, VkSampleCountFlagBits s
|
|||
SceneDepthStencil.Reset(fb);
|
||||
SceneNormal.Reset(fb);
|
||||
SceneFog.Reset(fb);
|
||||
SceneLinearDepth.Reset(fb);
|
||||
|
||||
CreateSceneColor(width, height, samples);
|
||||
CreateSceneDepthStencil(width, height, samples);
|
||||
CreateSceneNormal(width, height, samples);
|
||||
CreateSceneFog(width, height, samples);
|
||||
CreateSceneLinearDepth(width, height);
|
||||
|
||||
VkImageTransition()
|
||||
.AddImage(&SceneColor, VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL, true)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue