Reverse depth & 32F buffer format

-Adds reversed depth projection model, dramatically increasing depth buffer effective resolution.
-Adds 32F depth 8U stencil format GFXFormatD32FS8X24 (following DX naming conventions). Note this is a 64-bit format, and likely not suitable for mobile platforms. Revert to GFXFormatD24S8 in renderManager.tscript for mobile & "ancient" platforms.
-Corrects alignment of texture type details array.
This commit is contained in:
AtomicWalrus 2023-04-14 20:13:28 -06:00
parent c08fa359d2
commit 75625dc679
37 changed files with 91 additions and 57 deletions

View file

@ -1104,7 +1104,7 @@ void VolumetricFog::render(ObjectRenderInst *ri, SceneRenderState *state, BaseMa
z_buf->attachTexture(GFXTextureTarget::Color0, mDepthBuffer);
GFX->setActiveRenderTarget(z_buf);
GFX->clear(GFXClearStencil | GFXClearTarget , ColorI(0,0,0,0), 1.0f, 0);
GFX->clear(GFXClearStencil | GFXClearTarget , ColorI(0,0,0,0), 0.0f, 0);
GFX->drawPrimitive(0);
z_buf->resolve();
@ -1112,7 +1112,7 @@ void VolumetricFog::render(ObjectRenderInst *ri, SceneRenderState *state, BaseMa
//render frontside to target mFrontBuffer
z_buf->attachTexture(GFXTextureTarget::DepthStencil, GFXTextureTarget::sDefaultDepthStencil);
z_buf->attachTexture(GFXTextureTarget::Color0, mFrontBuffer);
GFX->clear(GFXClearStencil | GFXClearTarget, ColorI(0, 0, 0, 0), 1.0f, 0);
GFX->clear(GFXClearStencil | GFXClearTarget, ColorI(0, 0, 0, 0), 0.0f, 0);
GFX->setStateBlock(mStateblock_preF);