#677 Set mirror pass flag in llsettingsvo
parent
476cbaed6a
commit
a4225663ac
|
|
@ -183,23 +183,6 @@ void LLDrawPoolMaterials::renderDeferred(S32 pass)
|
|||
glUniform4fv(specular, 1, lastSpecular.mV);
|
||||
}
|
||||
|
||||
if (gPipeline.mHeroProbeManager.isMirrorPass())
|
||||
{
|
||||
mShader->uniform1f(LLShaderMgr::MIRROR_FLAG, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
mShader->uniform1f(LLShaderMgr::MIRROR_FLAG, 0);
|
||||
}
|
||||
|
||||
LLVector4 clipPlane = LLVector4(gPipeline.mHeroProbeManager.mMirrorPosition[0],
|
||||
gPipeline.mHeroProbeManager.mMirrorPosition[1],
|
||||
gPipeline.mHeroProbeManager.mMirrorPosition[2],
|
||||
1);
|
||||
|
||||
mShader->uniform4fv(LLShaderMgr::CLIP_PLANE,
|
||||
1, clipPlane.mV);
|
||||
|
||||
LLVOAvatar* lastAvatar = nullptr;
|
||||
|
||||
for (LLCullResult::drawinfo_iterator i = begin; i != end; )
|
||||
|
|
|
|||
|
|
@ -166,7 +166,7 @@ void LLHeroProbeManager::update()
|
|||
LLVector3 point = (reject - project) + hero_pos;
|
||||
|
||||
mCurrentClipPlane.setVec(hero_pos, face_normal);
|
||||
mMirrorPosition = hero_pos;
|
||||
mMirrorPosition = mNearestHero->getPositionAgent();
|
||||
mMirrorNormal = LLVector3(0, 0, 1);
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1033,6 +1033,15 @@ void LLSettingsVOWater::applySpecial(void *ptarget, bool force)
|
|||
shader->uniform4fv(LLShaderMgr::CLIP_PLANE, mirrorPlane.mV);
|
||||
LLVector4 light_direction = env.getClampedLightNorm();
|
||||
|
||||
if (gPipeline.mHeroProbeManager.isMirrorPass())
|
||||
{
|
||||
shader->uniform1f(LLShaderMgr::MIRROR_FLAG, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
shader->uniform1f(LLShaderMgr::MIRROR_FLAG, 0);
|
||||
}
|
||||
|
||||
F32 waterFogKS = 1.f / llmax(light_direction.mV[2], WATER_FOG_LIGHT_CLAMP);
|
||||
|
||||
shader->uniform1f(LLShaderMgr::WATER_FOGKS, waterFogKS);
|
||||
|
|
|
|||
Loading…
Reference in New Issue