From 7078216b61777ff89350d1bdc66c7c032b0b2296 Mon Sep 17 00:00:00 2001 From: Jules Blok Date: Mon, 15 Aug 2016 15:25:50 +0200 Subject: Improve documentation. --- Source/Core/VideoCommon/RenderBase.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Source/Core/VideoCommon/RenderBase.cpp') diff --git a/Source/Core/VideoCommon/RenderBase.cpp b/Source/Core/VideoCommon/RenderBase.cpp index fade0d00b9..3b50cd2313 100644 --- a/Source/Core/VideoCommon/RenderBase.cpp +++ b/Source/Core/VideoCommon/RenderBase.cpp @@ -86,6 +86,12 @@ unsigned int Renderer::efb_scale_numeratorY = 1; unsigned int Renderer::efb_scale_denominatorX = 1; unsigned int Renderer::efb_scale_denominatorY = 1; +// The maximum depth that is written to the depth buffer should never exceed this value. +// This is necessary because we use a 2^24 divisor for all our depth values to prevent +// floating-point round-trip errors. However the console GPU doesn't ever write a value +// to the depth buffer that exceeds 2^24 - 1. +const float Renderer::GX_MAX_DEPTH = 16777215.0f / 16777216.0f; + static float AspectToWidescreen(float aspect) { return aspect * ((16.0f / 9.0f) / (4.0f / 3.0f)); -- cgit v1.2.3