summaryrefslogtreecommitdiff
path: root/indra/llrender/llcubemap.cpp
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2022-04-29 13:51:11 +0000
committerDave Parks <davep@lindenlab.com>2022-04-29 13:51:11 +0000
commit93a025966649e281ceff8d1471bc983cc036bc17 (patch)
tree478dad507b450dce72c84ce7c87ab0266549ef45 /indra/llrender/llcubemap.cpp
parentdeffbca3ee209f6aea3358692d9ca6dc7090e748 (diff)
SL-17282 prototype mixing of reflection map into legacy materials
Diffstat (limited to 'indra/llrender/llcubemap.cpp')
-rw-r--r--indra/llrender/llcubemap.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/indra/llrender/llcubemap.cpp b/indra/llrender/llcubemap.cpp
index 40d15280d3..cc61158aa6 100644
--- a/indra/llrender/llcubemap.cpp
+++ b/indra/llrender/llcubemap.cpp
@@ -183,8 +183,7 @@ void LLCubeMap::initEnvironmentMap(const std::vector<LLPointer<LLImageRaw> >& ra
llassert(rawimages[i]->getHeight() == resolution);
llassert(rawimages[i]->getComponents() == components);
-
- mImages[i] = new LLImageGL(resolution, resolution, components, FALSE);
+ mImages[i] = new LLImageGL(resolution, resolution, components, TRUE);
mImages[i]->setTarget(mTargets[i], LLTexUnit::TT_CUBE_MAP);
mRawImages[i] = rawimages[i];
mImages[i]->createGLTexture(0, mRawImages[i], texname);
@@ -195,6 +194,11 @@ void LLCubeMap::initEnvironmentMap(const std::vector<LLPointer<LLImageRaw> >& ra
mImages[i]->setSubImage(mRawImages[i], 0, 0, resolution, resolution);
}
+ enableTexture(0);
+ bind();
+ mImages[0]->setFilteringOption(LLTexUnit::TFO_ANISOTROPIC);
+ glEnable(GL_TEXTURE_CUBE_MAP_SEAMLESS);
+ glGenerateMipmap(GL_TEXTURE_CUBE_MAP);
gGL.getTexUnit(0)->disable();
disable();
}