mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-24 09:03:48 +00:00
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:
parent
c08fa359d2
commit
75625dc679
37 changed files with 91 additions and 57 deletions
|
|
@ -531,7 +531,7 @@ void renderFrame(GFXTextureTargetRef* target, MatrixF transform, Frustum frustum
|
|||
|
||||
// Clear the current viewport area
|
||||
GFX->setViewport(targetRect);
|
||||
GFX->clear(GFXClearZBuffer | GFXClearStencil | GFXClearTarget, canvasClearColor, 1.0f, 0);
|
||||
GFX->clear(GFXClearZBuffer | GFXClearStencil | GFXClearTarget, canvasClearColor, 0.0f, 0);
|
||||
|
||||
// Make sure we have a clean matrix state
|
||||
// before we start rendering anything!
|
||||
|
|
@ -555,7 +555,7 @@ void renderFrame(GFXTextureTargetRef* target, MatrixF transform, Frustum frustum
|
|||
GFXTargetRef origTarget = GFX->getActiveRenderTarget();
|
||||
|
||||
// Clear the zBuffer so GUI doesn't hose object rendering accidentally
|
||||
GFX->clear(GFXClearZBuffer, ColorI(20, 20, 20), 1.0f, 0);
|
||||
GFX->clear(GFXClearZBuffer, ColorI(20, 20, 20), 0.0f, 0);
|
||||
|
||||
GFX->setFrustum(frustum);
|
||||
MatrixF mSaveProjection = GFX->getProjectionMatrix();
|
||||
|
|
|
|||
|
|
@ -455,7 +455,7 @@ void LightFlareData::prepRender(SceneRenderState *state, LightFlareState *flareS
|
|||
lightPosSS *= oneOverViewportExtent;
|
||||
lightPosSS = (lightPosSS * 2.0f) - Point3F::One;
|
||||
lightPosSS.y = -lightPosSS.y;
|
||||
lightPosSS.z = 0.0f;
|
||||
lightPosSS.z = 1.0f;
|
||||
|
||||
// Determine the center of the current projection so we can converge there
|
||||
Point3F centerProj(0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue