diff options
author | Tofu Buzzard <no-email> | 2011-02-09 16:18:04 -0800 |
---|---|---|
committer | Tofu Buzzard <no-email> | 2011-02-09 16:18:04 -0800 |
commit | 8c718d51873cbbe3e00042329ac8c7c6396ae9c2 (patch) | |
tree | 524f97acaef368b5061d9b7c04e326facb47adec /indra/llrender | |
parent | 8724d3817a2ec0700ac7d9180457342b54e1bbc9 (diff) | |
parent | fd6c5296b6c25afeaf83af51a45bf95331594797 (diff) |
merge
Diffstat (limited to 'indra/llrender')
-rw-r--r-- | indra/llrender/llgl.cpp | 7 | ||||
-rw-r--r-- | indra/llrender/llgl.h | 2 |
2 files changed, 6 insertions, 3 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); diff --git a/indra/llrender/llgl.h b/indra/llrender/llgl.h index ff4e6078c9..df110613e3 100644 --- a/indra/llrender/llgl.h +++ b/indra/llrender/llgl.h @@ -320,7 +320,7 @@ private: class LLGLSquashToFarClip { public: - LLGLSquashToFarClip(glh::matrix4f projection); + LLGLSquashToFarClip(glh::matrix4f projection, U32 layer = 0); ~LLGLSquashToFarClip(); }; |