diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2024-09-12 21:13:10 -0400 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2024-09-12 21:13:10 -0400 |
commit | 3d191c09b1b1eb6726fe67f6fdf5445d83536578 (patch) | |
tree | fa1c7e42b499638c0487b6af5c59ed048624f4a0 /indra/newview/llgltfmaterialpreviewmgr.cpp | |
parent | b8678d8fa3521f4496ddc569de391633711e46cb (diff) | |
parent | ccbd69bf6b287861b41fdb00e9d372746dfc2702 (diff) |
Merge branch 'develop' into release/luau-scripting
Diffstat (limited to 'indra/newview/llgltfmaterialpreviewmgr.cpp')
-rw-r--r-- | indra/newview/llgltfmaterialpreviewmgr.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/indra/newview/llgltfmaterialpreviewmgr.cpp b/indra/newview/llgltfmaterialpreviewmgr.cpp index e38ba8762a..294b445694 100644 --- a/indra/newview/llgltfmaterialpreviewmgr.cpp +++ b/indra/newview/llgltfmaterialpreviewmgr.cpp @@ -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 { |