commit
162c87a0a8
|
|
@ -279,7 +279,7 @@ bool LLGLSLShader::readProfileQuery(bool for_runtime, bool force_read)
|
||||||
GLuint64 samples_passed = 0;
|
GLuint64 samples_passed = 0;
|
||||||
glGetQueryObjectui64v(mSamplesQuery, GL_QUERY_RESULT, &samples_passed);
|
glGetQueryObjectui64v(mSamplesQuery, GL_QUERY_RESULT, &samples_passed);
|
||||||
|
|
||||||
U64 primitives_generated = 0;
|
GLuint64 primitives_generated = 0;
|
||||||
glGetQueryObjectui64v(mPrimitivesQuery, GL_QUERY_RESULT, &primitives_generated);
|
glGetQueryObjectui64v(mPrimitivesQuery, GL_QUERY_RESULT, &primitives_generated);
|
||||||
sTotalTimeElapsed += time_elapsed;
|
sTotalTimeElapsed += time_elapsed;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1253,10 +1253,10 @@ bool LLFace::getGeometryVolume(const LLVolume& volume,
|
||||||
{
|
{
|
||||||
color = tep->getColor();
|
color = tep->getColor();
|
||||||
|
|
||||||
if (tep->getGLTFRenderMaterial())
|
if (tep->getGLTFRenderMaterial())
|
||||||
{
|
{
|
||||||
color = tep->getGLTFRenderMaterial()->mBaseColor;
|
color = tep->getGLTFRenderMaterial()->mBaseColor;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rebuild_color)
|
if (rebuild_color)
|
||||||
|
|
|
||||||
|
|
@ -1805,7 +1805,6 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
|
||||||
getChild<LLUICtrl>("shinyOffsetV")->setValue(offset_y);
|
getChild<LLUICtrl>("shinyOffsetV")->setValue(offset_y);
|
||||||
getChild<LLUICtrl>("glossiness")->setValue(material->getSpecularLightExponent());
|
getChild<LLUICtrl>("glossiness")->setValue(material->getSpecularLightExponent());
|
||||||
getChild<LLUICtrl>("environment")->setValue(material->getEnvironmentIntensity());
|
getChild<LLUICtrl>("environment")->setValue(material->getEnvironmentIntensity());
|
||||||
getChild<LLUICtrl>("mirror")->setValue(material->getEnvironmentIntensity());
|
|
||||||
|
|
||||||
updateShinyControls(!material->getSpecularID().isNull(), true);
|
updateShinyControls(!material->getSpecularID().isNull(), true);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2243,8 +2243,11 @@ void LLTextureCtrl::draw()
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
preview = LLViewerTextureManager::getFetchedTexture(mImageAssetID, FTT_DEFAULT, true, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE);
|
mTexturep = LLViewerTextureManager::getFetchedTexture(mImageAssetID, FTT_DEFAULT, true, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE);
|
||||||
preview->setBoostLevel(LLGLTexture::BOOST_PREVIEW);
|
mTexturep->setBoostLevel(LLGLTexture::BOOST_PREVIEW);
|
||||||
|
mTexturep->forceToSaveRawImage(0);
|
||||||
|
|
||||||
|
preview = mTexturep;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -91,14 +91,14 @@ void LLTinyGLTFHelper::initFetchedTextures(tinygltf::Material& material,
|
||||||
{
|
{
|
||||||
if (material.pbrMetallicRoughness.metallicRoughnessTexture.index != material.occlusionTexture.index)
|
if (material.pbrMetallicRoughness.metallicRoughnessTexture.index != material.occlusionTexture.index)
|
||||||
{
|
{
|
||||||
LLImageDataLock lockIn(occlusion_img);
|
|
||||||
LLImageDataLock lockOut(mr_img);
|
|
||||||
// occlusion is a distinct texture from pbrMetallicRoughness
|
// occlusion is a distinct texture from pbrMetallicRoughness
|
||||||
// pack into mr red channel
|
// pack into mr red channel
|
||||||
int occlusion_idx = material.occlusionTexture.index;
|
int occlusion_idx = material.occlusionTexture.index;
|
||||||
int mr_idx = material.pbrMetallicRoughness.metallicRoughnessTexture.index;
|
int mr_idx = material.pbrMetallicRoughness.metallicRoughnessTexture.index;
|
||||||
if (occlusion_idx != mr_idx)
|
if (occlusion_idx != mr_idx)
|
||||||
{
|
{
|
||||||
|
LLImageDataLock lockIn(occlusion_img);
|
||||||
|
LLImageDataLock lockOut(mr_img);
|
||||||
//scale occlusion image to match resolution of mr image
|
//scale occlusion image to match resolution of mr image
|
||||||
occlusion_img->scale(mr_img->getWidth(), mr_img->getHeight());
|
occlusion_img->scale(mr_img->getWidth(), mr_img->getHeight());
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue