diff options
author | Tofu Buzzard <no-email> | 2011-02-09 16:18:13 -0800 |
---|---|---|
committer | Tofu Buzzard <no-email> | 2011-02-09 16:18:13 -0800 |
commit | 2a49b392a40808a6415839dd767f849b6ea26020 (patch) | |
tree | 4bd28d4619813e4b14db63eb26bf0b8b858a687f /indra/llrender/llgl.cpp | |
parent | 2b54ad52574b95edc2103761bb5653dbdee69da6 (diff) | |
parent | 8c718d51873cbbe3e00042329ac8c7c6396ae9c2 (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); |