#682 Do conservative updates on probes.
parent
a5a2254b6f
commit
7a9cdf2b52
|
|
@ -155,6 +155,25 @@ void LLHeroProbeManager::update()
|
|||
|
||||
|
||||
probe_pos.load3(point.mV);
|
||||
|
||||
// Collect the list of faces that need updating based upon the camera's rotation.
|
||||
LLVector3 cam_direction = LLVector3(0, 0, -1) * LLViewerCamera::instance().getQuaternion();
|
||||
|
||||
static LLVector3 cubeFaces[6] = {
|
||||
LLVector3(1, 0, 0),
|
||||
LLVector3(-1, 0, 0),
|
||||
LLVector3(0, 1, 0),
|
||||
LLVector3(0, -1, 0),
|
||||
LLVector3(0, 0, 1),
|
||||
LLVector3(0, 0, -1)
|
||||
};
|
||||
|
||||
for (int i = 0; i < 6; i++)
|
||||
{
|
||||
bool shouldUpdate = (cam_direction * cubeFaces[i]) > 0;
|
||||
|
||||
mFaceUpdateList[i] = shouldUpdate;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -185,7 +204,8 @@ void LLHeroProbeManager::update()
|
|||
{
|
||||
for (U32 i = 0; i < 6; ++i)
|
||||
{
|
||||
updateProbeFace(mProbes[j], i, near_clip);
|
||||
if (mFaceUpdateList[i])
|
||||
updateProbeFace(mProbes[j], i, near_clip);
|
||||
}
|
||||
}
|
||||
mRenderingMirror = false;
|
||||
|
|
|
|||
|
|
@ -134,6 +134,7 @@ private:
|
|||
bool mReset = false;
|
||||
|
||||
bool mRenderingMirror = false;
|
||||
std::map<int, bool> mFaceUpdateList;
|
||||
|
||||
std::set<LLPointer<LLVOVolume>> mHeroVOList;
|
||||
LLPointer<LLVOVolume> mNearestHero;
|
||||
|
|
|
|||
|
|
@ -786,9 +786,12 @@ bool LLPipeline::allocateScreenBuffer(U32 resX, U32 resY, U32 samples)
|
|||
U32 res = mReflectionMapManager.mProbeResolution * 4; //multiply by 4 because probes will be 16x super sampled
|
||||
allocateScreenBuffer(res, res, samples);
|
||||
|
||||
res = mHeroProbeManager.mProbeResolution; // We also scale the hero probe RT to the probe res since we don't super sample it.
|
||||
mRT = &mHeroProbeRT;
|
||||
allocateScreenBuffer(res, res, samples);
|
||||
if (RenderMirrors)
|
||||
{
|
||||
res = mHeroProbeManager.mProbeResolution; // We also scale the hero probe RT to the probe res since we don't super sample it.
|
||||
mRT = &mHeroProbeRT;
|
||||
allocateScreenBuffer(res, res, samples);
|
||||
}
|
||||
|
||||
mRT = &mMainRT;
|
||||
gCubeSnapshot = FALSE;
|
||||
|
|
|
|||
Loading…
Reference in New Issue