Skip to content

Commit

Permalink
update cube cam near clip
Browse files Browse the repository at this point in the history
Signed-off-by: Ian Chen <[email protected]>
  • Loading branch information
iche033 committed Sep 9, 2021
1 parent c64a577 commit 4153898
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ogre2/src/Ogre2GpuRays.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1184,7 +1184,10 @@ void Ogre2GpuRays::CreateGpuRaysTextures()
// values in 1st pass shader (gpu_rays_1st_pass_fs.glsl).
// This is so that we don't incorrectly clip the range values near the
// corners of the cube cam viewport.
this->dataPtr->nearClipCube = this->NearClipPlane() * 0.6f;

// compute smallest box to fit in sphere with radius = this->NearClipPlane
double boxSize = this->NearClipPlane() * 2 / std::sqrt(3.0);
this->dataPtr->nearClipCube = boxSize * 0.5;

this->ConfigureCamera();
this->CreateSampleTexture();
Expand Down

0 comments on commit 4153898

Please sign in to comment.