Skip to content
Snippets Groups Projects
Commit ac3b56cb authored by Rye Mutt's avatar Rye Mutt :bread:
Browse files

Merge branch 'DRTVWR-559' of https://github.com/secondlife/viewer into cronchy

parents 0766be25 de73cf75
No related branches found
No related tags found
2 merge requests!3Update to main branch,!2Rebase onto current main branch
...@@ -134,7 +134,7 @@ void preProbeSample(vec3 pos) ...@@ -134,7 +134,7 @@ void preProbeSample(vec3 pos)
int neighborIdx = refIndex[i].y; int neighborIdx = refIndex[i].y;
if (neighborIdx != -1) if (neighborIdx != -1)
{ {
int neighborCount = min(refIndex[i].z, REF_SAMPLE_COUNT-1); int neighborCount = refIndex[i].z;
int count = 0; int count = 0;
while (count < neighborCount) while (count < neighborCount)
......
...@@ -441,7 +441,11 @@ void LLDrawPoolWLSky::renderDeferred(S32 pass) ...@@ -441,7 +441,11 @@ void LLDrawPoolWLSky::renderDeferred(S32 pass)
{ {
renderStarsDeferred(origin); renderStarsDeferred(origin);
} }
renderSkyCloudsDeferred(origin, camHeightLocal, cloud_shader);
if (!gCubeSnapshot || gPipeline.mReflectionMapManager.isRadiancePass()) // don't draw clouds in irradiance maps to avoid popping
{
renderSkyCloudsDeferred(origin, camHeightLocal, cloud_shader);
}
} }
gGL.setColorMask(true, true); gGL.setColorMask(true, true);
} }
......
...@@ -70,7 +70,7 @@ void LLReflectionMap::autoAdjustOrigin() ...@@ -70,7 +70,7 @@ void LLReflectionMap::autoAdjustOrigin()
{ {
LL_PROFILE_ZONE_SCOPED_CATEGORY_DISPLAY; LL_PROFILE_ZONE_SCOPED_CATEGORY_DISPLAY;
if (mGroup) if (mGroup && !mComplete)
{ {
const LLVector4a* bounds = mGroup->getBounds(); const LLVector4a* bounds = mGroup->getBounds();
auto* node = mGroup->getOctreeNode(); auto* node = mGroup->getOctreeNode();
......
...@@ -860,6 +860,9 @@ void LLReflectionMapManager::updateUniforms() ...@@ -860,6 +860,9 @@ void LLReflectionMapManager::updateUniforms()
{ {
//LL_PROFILE_ZONE_NAMED_CATEGORY_DISPLAY("rmmsu - refNeighbors"); //LL_PROFILE_ZONE_NAMED_CATEGORY_DISPLAY("rmmsu - refNeighbors");
//pack neghbor list //pack neghbor list
const U32 max_neighbors = 64;
U32 neighbor_count = 0;
for (auto& neighbor : refmap->mNeighbors) for (auto& neighbor : refmap->mNeighbors)
{ {
if (ni >= 4096) if (ni >= 4096)
...@@ -875,6 +878,12 @@ void LLReflectionMapManager::updateUniforms() ...@@ -875,6 +878,12 @@ void LLReflectionMapManager::updateUniforms()
// this neighbor may be sampled // this neighbor may be sampled
rpd.refNeighbor[ni++] = idx; rpd.refNeighbor[ni++] = idx;
neighbor_count++;
if (neighbor_count >= max_neighbors)
{
break;
}
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment