diff options
author | Dave Parks <davep@lindenlab.com> | 2011-02-09 16:54:14 -0600 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2011-02-09 16:54:14 -0600 |
commit | 843a746f37f538ac3b24d891c312230f1aa801cd (patch) | |
tree | 6e032a216518d649280856d8f026b37d744cf747 /indra/llrender/llgl.cpp | |
parent | 56b0423e8926d20a2df9e316f86d57d4b976da6b (diff) | |
parent | 10518eaaaef51f6d5a23a4c8fa15267bf9aa0821 (diff) |
merge
Diffstat (limited to 'indra/llrender/llgl.cpp')
-rw-r--r-- | indra/llrender/llgl.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp index f91584b5e4..9354373dba 100644 --- a/indra/llrender/llgl.cpp +++ b/indra/llrender/llgl.cpp @@ -2071,11 +2071,14 @@ void LLGLDepthTest::checkState() } } -LLGLSquashToFarClip::LLGLSquashToFarClip(glh::matrix4f P) +LLGLSquashToFarClip::LLGLSquashToFarClip(glh::matrix4f P, U32 layer) { + + F32 depth = 0.99999f - 0.0001f * layer; + for (U32 i = 0; i < 4; i++) { - P.element(2, i) = P.element(3, i) * 0.99999f; + P.element(2, i) = P.element(3, i) * depth; } glMatrixMode(GL_PROJECTION); |