mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-05-04 09:59:44 -05:00
Actually make use of the model matrix in the atmosphere radius calculation for determining whether it should be culled (closes #1465)
This commit is contained in:
@@ -113,7 +113,7 @@ namespace {
|
||||
constexpr const char* GlslDeferredcastVsPath =
|
||||
"${MODULES}/atmosphere/shaders/atmosphere_deferred_vs.glsl";
|
||||
|
||||
constexpr const float ATM_EPS = 2.f;
|
||||
constexpr const float ATM_EPS = 2000.f;
|
||||
constexpr const float KM_TO_M = 1000.f;
|
||||
|
||||
|
||||
@@ -213,7 +213,7 @@ void AtmosphereDeferredcaster::preRaycast(const RenderData& renderData,
|
||||
renderData.camera.sgctInternal.projectionMatrix()
|
||||
) * renderData.camera.combinedViewMatrix();
|
||||
|
||||
const float totalAtmosphere = (_atmosphereRadius + ATM_EPS)* KM_TO_M;
|
||||
const float totalAtmosphere = (scaledRadius + ATM_EPS);
|
||||
if (!isAtmosphereInFrustum(MV, tPlanetPosWorld, totalAtmosphere)) {
|
||||
program.setUniform(_uniformCache.cullAtmosphere, 1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user