SL-13561 When ALM is enabled, disabling water rendering breaks the sky
parent
5534781acf
commit
cb07acf9fe
|
|
@ -9203,7 +9203,13 @@ inline float sgn(float a)
|
|||
void LLPipeline::generateWaterReflection(LLCamera& camera_in)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
if (LLPipeline::sWaterReflections && assertInitialized() && LLDrawPoolWater::sNeedsReflectionUpdate)
|
||||
|
||||
if (!assertInitialized())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (LLPipeline::sWaterReflections && LLDrawPoolWater::sNeedsReflectionUpdate)
|
||||
{
|
||||
bool skip_avatar_update = false;
|
||||
if (!isAgentAvatarValid() || gAgentCamera.getCameraAnimating() || gAgentCamera.getCameraMode() != CAMERA_MODE_MOUSELOOK || !LLVOAvatar::sVisibleInFirstPerson)
|
||||
|
|
@ -9488,6 +9494,29 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in)
|
|||
|
||||
LLViewerCamera::sCurCameraID = LLViewerCamera::CAMERA_WORLD;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Initial sky pass is still needed even if water reflection is not rendering
|
||||
bool camera_is_underwater = LLViewerCamera::getInstance()->cameraUnderWater();
|
||||
if (!camera_is_underwater)
|
||||
{
|
||||
gPipeline.pushRenderTypeMask();
|
||||
{
|
||||
gPipeline.andRenderTypeMask(
|
||||
LLPipeline::RENDER_TYPE_SKY,
|
||||
LLPipeline::RENDER_TYPE_WL_SKY,
|
||||
LLPipeline::END_RENDER_TYPES);
|
||||
|
||||
LLCamera camera = camera_in;
|
||||
camera.setFar(camera_in.getFar() * 0.75f);
|
||||
|
||||
updateCull(camera, mSky);
|
||||
stateSort(camera, mSky);
|
||||
renderGeom(camera, TRUE);
|
||||
}
|
||||
gPipeline.popRenderTypeMask();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
glh::matrix4f look(const LLVector3 pos, const LLVector3 dir, const LLVector3 up)
|
||||
|
|
|
|||
Loading…
Reference in New Issue