Graphics/DeferredRenderTechnique: Optimize Deferred Shading
No longer copies depth twice Former-commit-id: fa946456f8196d2955efa278f2c47cdc9f6c0dac [formerly df5a55b487b02ebe7df1c31dc640ca60042ed49b] [formerly 5ebfb7cd0df4c998292a7f0b661438f4f2fc3b6d [formerly bd64449e3ecaa7443a4db86d6ef787fd42fbc314]] Former-commit-id: 7bd35cd3c2bd845f9ee8b3d2d2a48793f63047e7 [formerly 267393d8cb349d6f77bf9e707c6ce2d5344ed7d7] Former-commit-id: b9e45d39c4ec5a0ea4dd0cc37f478af0cf3e0caa
This commit is contained in:
@@ -232,7 +232,7 @@ namespace Nz
|
||||
unsigned int width = dimensions.x;
|
||||
unsigned int height = dimensions.y;
|
||||
|
||||
m_depthStencilBuffer->Create(PixelFormatType_Depth24Stencil8, width, height);
|
||||
m_depthStencilTexture->Create(ImageType_2D, PixelFormatType_Depth24Stencil8, width, height);
|
||||
|
||||
m_GBuffer[0]->Create(ImageType_2D, PixelFormatType_RGBA8, width, height); // Texture 0 : Diffuse Color + Specular
|
||||
m_GBuffer[1]->Create(ImageType_2D, PixelFormatType_RG16F, width, height); // Texture 1 : Encoded normal
|
||||
@@ -246,7 +246,7 @@ namespace Nz
|
||||
|
||||
// Texture 3 : Emission map ?
|
||||
|
||||
m_GBufferRTT->AttachBuffer(AttachmentPoint_DepthStencil, 0, m_depthStencilBuffer);
|
||||
m_GBufferRTT->AttachTexture(AttachmentPoint_DepthStencil, 0, m_depthStencilTexture);
|
||||
|
||||
m_GBufferRTT->Unlock();
|
||||
|
||||
@@ -258,7 +258,7 @@ namespace Nz
|
||||
m_workRTT->AttachTexture(AttachmentPoint_Color, i, m_workTextures[i]);
|
||||
}
|
||||
|
||||
m_workRTT->AttachBuffer(AttachmentPoint_DepthStencil, 0, m_depthStencilBuffer);
|
||||
m_workRTT->AttachTexture(AttachmentPoint_DepthStencil, 0, m_depthStencilTexture);
|
||||
|
||||
m_workRTT->Unlock();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user