summaryrefslogtreecommitdiff
path: root/indra/newview/llgltfmaterialpreviewmgr.cpp
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2024-09-28 18:01:02 +0800
committerErik Kundiman <erik@megapahit.org>2024-10-18 18:38:25 +0800
commitad3cbb9f75c4ea7f0473225afc034c403b54fc82 (patch)
tree4e4239e97a405d2820e26a4f2215ad8ccb88af7e /indra/newview/llgltfmaterialpreviewmgr.cpp
parent7fdb350e487acc35b26de6e243ff27f94185d3a5 (diff)
parent64c055f9be03861661f8c211ae36ba0db489b12d (diff)
Merge remote-tracking branch 'secondlife/release/2024.09-ExtraFPS' into 2024.09-ExtraFPS
Diffstat (limited to 'indra/newview/llgltfmaterialpreviewmgr.cpp')
-rw-r--r--indra/newview/llgltfmaterialpreviewmgr.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/indra/newview/llgltfmaterialpreviewmgr.cpp b/indra/newview/llgltfmaterialpreviewmgr.cpp
index 06920734fe..cf6b08797d 100644
--- a/indra/newview/llgltfmaterialpreviewmgr.cpp
+++ b/indra/newview/llgltfmaterialpreviewmgr.cpp
@@ -193,7 +193,7 @@ LLGLTFPreviewTexture::LLGLTFPreviewTexture(LLPointer<LLFetchedGLTFMaterial> mate
// static
LLPointer<LLGLTFPreviewTexture> LLGLTFPreviewTexture::create(LLPointer<LLFetchedGLTFMaterial> material)
{
- return new LLGLTFPreviewTexture(material, LLPipeline::MAX_BAKE_WIDTH);
+ return new LLGLTFPreviewTexture(material, LLPipeline::MAX_PREVIEW_WIDTH);
}
bool LLGLTFPreviewTexture::needsRender()
@@ -434,7 +434,7 @@ bool LLGLTFPreviewTexture::render()
SetTemporarily<bool> no_dof(&LLPipeline::RenderDepthOfField, false);
SetTemporarily<bool> no_glow(&LLPipeline::sRenderGlow, false);
SetTemporarily<bool> no_ssr(&LLPipeline::RenderScreenSpaceReflections, false);
- SetTemporarily<U32> no_fxaa(&LLPipeline::RenderFSAASamples, U32(0));
+ SetTemporarily<U32> no_aa(&LLPipeline::RenderFSAAType, U32(0));
SetTemporarily<LLPipeline::RenderTargetPack*> use_auxiliary_render_target(&gPipeline.mRT, &gPipeline.mAuxillaryRT);
LLVector3 light_dir3(1.0f, 1.0f, 1.0f);
@@ -471,10 +471,10 @@ bool LLGLTFPreviewTexture::render()
PreviewSphere& preview_sphere = get_preview_sphere(mGLTFMaterial, object_transform);
gPipeline.setupHWLights();
- glh::matrix4f mat = copy_matrix(gGLModelView);
- glh::vec4f transformed_light_dir(light_dir.mV);
- mat.mult_matrix_vec(transformed_light_dir);
- SetTemporarily<LLVector4> force_sun_direction_high_graphics(&gPipeline.mTransformedSunDir, LLVector4(transformed_light_dir.v));
+ glm::mat4 mat = get_current_modelview();
+ glm::vec4 transformed_light_dir = glm::make_vec4(light_dir.mV);
+ transformed_light_dir = mat * transformed_light_dir;
+ SetTemporarily<LLVector4> force_sun_direction_high_graphics(&gPipeline.mTransformedSunDir, LLVector4(glm::value_ptr(transformed_light_dir)));
// Override lights to ensure the sun is always shining from a certain direction (low graphics)
// See also force_sun_direction_high_graphics and fixup_shader_constants
{