Commit Graph

56 Commits (a52391d582ec7299273d3ff38efdb2455da7700e)

Author SHA1 Message Date
Brad Linden 9775d7ea10 Merge remote-tracking branch 'origin/release/maint-a' into project/gltf_development 2024-06-11 17:42:17 -07:00
Ansariel 1ebf62e102 Clean up line endings that got mangled up during last merge 2024-06-11 15:40:09 +02:00
Ansariel d9789bfaf2 Merge branch 'main' of https://github.com/secondlife/viewer into DRTVWR-600-maint-A
# Conflicts:
#	indra/llappearance/llavatarappearance.h
#	indra/llimage/llimage.cpp
#	indra/llmath/llvolume.cpp
#	indra/llmath/llvolume.h
#	indra/llprimitive/llgltfmaterial.h
#	indra/llrender/llrendertarget.cpp
#	indra/llrender/llshadermgr.cpp
#	indra/newview/lldynamictexture.cpp
#	indra/newview/llenvironment.cpp
#	indra/newview/llfetchedgltfmaterial.cpp
#	indra/newview/llfloaterimagepreview.cpp
#	indra/newview/llfloaterimagepreview.h
#	indra/newview/llfloaterregioninfo.cpp
#	indra/newview/llfloaterregioninfo.h
#	indra/newview/llmaniprotate.cpp
#	indra/newview/llmaniptranslate.cpp
#	indra/newview/llpanelvolume.cpp
#	indra/newview/llselectmgr.cpp
#	indra/newview/llselectmgr.h
#	indra/newview/llsurface.cpp
#	indra/newview/llsurface.h
#	indra/newview/llsurfacepatch.cpp
#	indra/newview/lltexturectrl.cpp
#	indra/newview/lltexturectrl.h
#	indra/newview/lltinygltfhelper.cpp
#	indra/newview/llviewertexture.cpp
#	indra/newview/llviewerwindow.cpp
#	indra/newview/llviewerwindow.h
#	indra/newview/llvlcomposition.cpp
#	indra/newview/llvlcomposition.h
#	indra/newview/llvocache.cpp
#	indra/newview/llvovolume.cpp
#	indra/newview/pipeline.cpp
2024-06-11 13:38:43 +02:00
Cosmic Linden 6de0086ae9 secondlife/viewer#1475: Add PBR terrain repeats editing 2024-06-07 18:14:32 -07:00
Ansariel 1b67dd855c Merge remote-tracking branch 'origin/main' into DRTVWR-600-maint-A
# Conflicts:
#	autobuild.xml
#	indra/cmake/CMakeLists.txt
#	indra/cmake/GoogleMock.cmake
#	indra/llaudio/llaudioengine_fmodstudio.cpp
#	indra/llaudio/llaudioengine_fmodstudio.h
#	indra/llaudio/lllistener_fmodstudio.cpp
#	indra/llaudio/lllistener_fmodstudio.h
#	indra/llaudio/llstreamingaudio_fmodstudio.cpp
#	indra/llaudio/llstreamingaudio_fmodstudio.h
#	indra/llcharacter/llmultigesture.cpp
#	indra/llcharacter/llmultigesture.h
#	indra/llimage/llimage.cpp
#	indra/llimage/llimagepng.cpp
#	indra/llimage/llimageworker.cpp
#	indra/llimage/tests/llimageworker_test.cpp
#	indra/llmessage/tests/llmockhttpclient.h
#	indra/llprimitive/llgltfmaterial.h
#	indra/llrender/llfontfreetype.cpp
#	indra/llui/llcombobox.cpp
#	indra/llui/llfolderview.cpp
#	indra/llui/llfolderviewmodel.h
#	indra/llui/lllineeditor.cpp
#	indra/llui/lllineeditor.h
#	indra/llui/lltextbase.cpp
#	indra/llui/lltextbase.h
#	indra/llui/lltexteditor.cpp
#	indra/llui/lltextvalidate.cpp
#	indra/llui/lltextvalidate.h
#	indra/llui/lluictrl.h
#	indra/llui/llview.cpp
#	indra/llwindow/llwindowmacosx.cpp
#	indra/newview/app_settings/settings.xml
#	indra/newview/llappearancemgr.cpp
#	indra/newview/llappearancemgr.h
#	indra/newview/llavatarpropertiesprocessor.cpp
#	indra/newview/llavatarpropertiesprocessor.h
#	indra/newview/llbreadcrumbview.cpp
#	indra/newview/llbreadcrumbview.h
#	indra/newview/llbreastmotion.cpp
#	indra/newview/llbreastmotion.h
#	indra/newview/llconversationmodel.h
#	indra/newview/lldensityctrl.cpp
#	indra/newview/lldensityctrl.h
#	indra/newview/llface.inl
#	indra/newview/llfloatereditsky.cpp
#	indra/newview/llfloatereditwater.cpp
#	indra/newview/llfloateremojipicker.h
#	indra/newview/llfloaterimsessiontab.cpp
#	indra/newview/llfloaterprofiletexture.cpp
#	indra/newview/llfloaterprofiletexture.h
#	indra/newview/llgesturemgr.cpp
#	indra/newview/llgesturemgr.h
#	indra/newview/llimpanel.cpp
#	indra/newview/llimpanel.h
#	indra/newview/llinventorybridge.cpp
#	indra/newview/llinventorybridge.h
#	indra/newview/llinventoryclipboard.cpp
#	indra/newview/llinventoryclipboard.h
#	indra/newview/llinventoryfunctions.cpp
#	indra/newview/llinventoryfunctions.h
#	indra/newview/llinventorygallery.cpp
#	indra/newview/lllistbrowser.cpp
#	indra/newview/lllistbrowser.h
#	indra/newview/llpanelobjectinventory.cpp
#	indra/newview/llpanelprofile.cpp
#	indra/newview/llpanelprofile.h
#	indra/newview/llpreviewgesture.cpp
#	indra/newview/llsavedsettingsglue.cpp
#	indra/newview/llsavedsettingsglue.h
#	indra/newview/lltooldraganddrop.cpp
#	indra/newview/llurllineeditorctrl.cpp
#	indra/newview/llvectorperfoptions.cpp
#	indra/newview/llvectorperfoptions.h
#	indra/newview/llviewerparceloverlay.cpp
#	indra/newview/llviewertexlayer.cpp
#	indra/newview/llviewertexturelist.cpp
#	indra/newview/macmain.h
#	indra/test/test.cpp
2024-05-22 19:04:52 +02:00
Dave Parks 03c4458bdc
#1392 GLTF Upload (#1394)
* #1392 WIP -- Functional texture upload, stubbed out .bin upload.

* #1392 GLTF Upload WIP -- Emulates successful upload

Successfully uploads texture
Emulates successful .gltf and .bin upload by injecting into local asset cache.
Emulates rez from inventory by setting sculpt ID of selected object
Currently fails in tinygltf parsing due to missing .bin

* Add missing notification

* Build fix

* #1392 Add boost::json .gltf reading support.

* #1392 boost::json GLTF writing prototype

* Create gltf/README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* #1392 Add ability to render directly from LL::GLTF::Material

* Fix for mac build

* Mac build fix

* #1392 AssetType and Inventory Type plumbing

* #1392 More sane error handling and scheduling of uploads.

* #1392 Actually attempt to upload glbin

* Mac build fix, upload nudge

* Mac build fix

* Fix glTF asset uploads to server

* Mac build fix (inline not static)

* More consistent inline

* Add glm, mac nudge.

* #1392 For consistency with spec, start using glm over glh:: and LLFoo

* Another attempt at placating Mac builds

* Another Mac nudge

* Mac build take 23

* #1392 Prune LLMatrix4a from GLTF namespace.

* #1392 Fix for orientation being off (glm::quat is wxyz, not xyzw)

* #1392 WIP -- Actually send the sculpt type and id, nudge readme and alpha rendering

* #1392 Working download!

* #1394 Add support for GLTFEnabled SimulatorFeature

* #1392 Review feedback

---------

Co-authored-by: Pepper Linden <3782201+rohvani@users.noreply.github.com>
2024-05-20 13:22:55 -05:00
Nat Goodspeed 094dcc07f8 Merge DRTVWR-591-maint-X to main on promotion of secondlife/viewer #705: Maintenance X 2024-05-14 21:02:28 -04:00
Brad Linden 31a3423239 Merge remote-tracking branch 'origin/release/materials_featurette' into project/gltf_development 2024-05-14 11:07:13 -07:00
Cosmic Linden cdcfbab5c4 secondlife/viewer#907: Fix bad merge in LLGLTFMaterial
Caused by a conflict between the LLGLTFMaterial::getHash fix, and an improvement in LLGLTFMaterial field ordering for platform-dependent memory reduction.
2024-05-13 15:33:14 -07:00
Cosmic Linden 9441608623 secondlife/viewer#907: Local PBR terrain texture transforms 2024-05-10 17:42:54 -07:00
Jonathan "Geenz" Goodman 54816bdf81
Fix for mirrors not functioning properly under water. (#1436)
* #1165 Fix for clipping and culling for mirrors under water.
2024-05-08 13:40:58 -07:00
Brad Linden f79548ec68 Merge remote-tracking branch 'origin/main' into project/gltf_development 2024-05-06 17:33:46 -07:00
RunitaiLinden c6d752b880 Merge remote-tracking branch 'origin/DRTVWR-600-maint-A' into gltf-dev-maint-a-merge 2024-05-06 16:48:58 -05:00
Brad Linden 8d5372577c Update LLGLTFMaterial tests for changes introduced in SL-20523
also correct member packing to match server side
2024-05-02 10:54:15 -07:00
Andrey Lihatskiy 1b68f71348 #824 Process source files in bulk: replace tabs with spaces, convert CRLF to LF, and trim trailing whitespaces as needed 2024-04-29 07:56:09 +03:00
Cosmic Linden 294eaa3c57 secondlife/viewer-issues#83: Add TODO/assert for deciding when to allow candidate future extensions on PBR terrain 2024-03-20 13:36:20 -07:00
Henri Beauchamp 8eb2d17c77 Fix LLGLTFMaterial hashing
This PR fixes the non-working material hashing for LLGLTFMaterial instances.

There are several issues in the current code, stemming to the fact that the hashing is performed on the block of the member variables:

1.- There are padding bytes between member variables, even after rearranging them to avoid most of the padding; in particular, the std::array's size is not a multiple of 4 bytes (64 bits), and most compilers will pad them to the next 4-byte aligment as a result. Note that C++ standards do not impose the zeroing of padding bytes on construction of a class instance, with only a couple exceptions (such as explicit zero-initialization). Those bytes MUST therefore be zeroed by us on construction.
2.- The TextureTransform strutcure getPacked() method did not touch some of the packed bytes, and as a result could *potentially* cause an issue for hashing when applied to a transform of another material instance.
3.- With the recent addition of the local textures tracking map, the said map cannot be hashed as a block of memory (map pairs will typically be allocated on the heap or on the stack, not in the memory block used by member variables).

This PR solves all these issues and offers proper hashing of LLGLTFMaterial instances.
2023-12-06 03:42:09 +02:00
Andrey Kleshchev 0d8893822d SL-20523 Local textures not updating on PBR Materials #5 2023-11-06 18:29:42 +02:00
Andrey Kleshchev 52c60ab3fd SL-20523 Local textures not updating on PBR Materials #4 2023-11-06 18:29:42 +02:00
Andrey Kleshchev 3a5b678eba SL-20523 Local textures not updating on PBR Materials #3 2023-11-06 18:29:42 +02:00
Andrey Kleshchev 596a63051e SL-20523 Local textures not updating on PBR Materials #2 2023-11-06 18:29:42 +02:00
Andrey Kleshchev dc63dfc0dd SL-20523 Local textures not updating on PBR Materials #1
Update editor in which texture changed to local
2023-11-06 18:29:42 +02:00
Brad Linden 26163e2154 Fix DRTVWR-559 std::array usage in llrender and llprimitive after merge 2023-10-25 16:44:14 -07:00
Cosmic Linden d22ea319a5 SL-20225: LLGLTFMaterial code sync 2023-10-09 16:05:58 -07:00
RunitaiLinden 455bbcf742 SL-20229 Add GenericStreamingMessage and use it to receive GLTF material overrides 2023-08-29 16:42:55 -05:00
Brad Linden 6a812fa1ba Improved fix for SL-19675 crash. How about just don't refer to data when you don't need it 2023-05-03 13:30:33 -07:00
Cosmic Linden 005a5fa207 SL-19606: Fix missing GLTF texture transforms in PBR alpha mask/alpha blend shadows 2023-04-21 15:10:05 -07:00
Andrey Kleshchev d423263d54 SL-19169 Local material updates aren't applied with non-default transforms 2023-03-23 06:15:09 +02:00
Dave Parks e23b3972a0 DRTVWR-559 Fix for bad hashing of materials breaking render batches and who knows what else. 2023-03-22 18:25:47 -05:00
Dave Parks bc7856098f SL-19281 Unify handling of haze and gamma between fullbright and not and move haze back to sRGB color space to stay consistent with sky colors. Also fix broken "roughness" stuck at 0.2. 2023-03-02 16:36:03 -06:00
Cosmic Linden b27c41578b SL-19279: LLGLSLShader::bindXXX is not free. Pack the uniforms 2023-02-27 15:57:45 -08:00
Cosmic Linden df440f3f33 SL-19121: Address review comments from SL-19080 phase 2 2023-02-15 09:42:35 -08:00
cosmic-linden ba7a333969
Merge pull request #73 from secondlife/SL-19080
SL-19080: GLTF Material asset consistency: Part 2: Update viewer GLTF Material asset upload to v1.1
2023-02-14 11:40:32 -08:00
Cosmic Linden a56385345f SL-19080: Address clang-provided errors 2023-02-09 16:13:57 -08:00
Cosmic Linden d6841c0798 SL-19080: Update GLTF Material asset upload to v1.1, with stricter GLTF compliance and removal of unsupported features 2023-02-09 15:05:19 -08:00
Dave Parks 93b1da52f5 SL-18908 Make media texture override base color and emissive texture on PBR materials when present. 2023-02-02 14:35:09 -06:00
Cosmic Linden 693925ef23 SL-18820: Fix applying material clearing transform overrides. Loosen some asserts to allow non-default transform overrides. 2023-01-10 17:09:30 -08:00
Cosmic Linden 4fa77b6f72 SL-18820: Update LLGLTFMaterial: Add setBaseMaterial() and equality comparison 2023-01-09 14:13:09 -08:00
Cosmic Linden e4dd9c1e64 SL-18634: Fix GLTF material texture transform not serializing when texture ID is null 2022-11-14 14:57:22 -08:00
Sabrina Shanman 4aaa484195 Revert "SL-18523: When editing an object's material override, use the object's material override as a base, rather than its render material (pull request #1190)" 2022-11-09 00:16:41 +00:00
Cosmic Linden cba87c62cc SL-18523: When editing an object's material override, use the object's material override as a base, rather than its render material 2022-11-08 11:55:45 -08:00
Cosmic Linden 9e7b725c15 SL-18485: Render GLTF materials with extension KHR_texture_transform with approprate texture transforms 2022-11-02 12:55:18 -07:00
Dave Parks c3f94ab9a1 SL-18520 Use GLTF material.extras to pass flags for enabling overriding alpha mode and double sided to default 2022-11-02 12:14:56 -05:00
Dave Parks a4ad75e93c SL-18520 WIP - Use off-by-epsilon and special UUID identifier hacks to allow overriding to default values. 2022-11-01 15:17:22 -05:00
Dave Parks 75e743be2f SL-18442 Port of Caladbolg's fix for emissive overrides not taking. Remove unused function. 2022-10-31 15:58:20 -05:00
Cosmic Linden 5364da4d8e SL-18411: GLTF material transform serialization, plus fix improper indexing not matching GLTF spec 2022-10-27 13:19:19 -07:00
Cosmic Linden 7231e0b3dd SL-18411: Copy over LLGLTFMaterial changes (most notably various getters/setters and texture transform stub) 2022-10-20 11:33:25 -07:00
Dave Parks 8741c05cc1 SL-18105 Hook up TE override material to render pipe by way of render material. 2022-10-19 17:23:54 -05:00
Dave Parks de4c018499 SL-18105 Hook up render pipe directly to LLTextureEntry::mGLTFMaterial and add LLViewerFetchedTextures to LLFetchedGLTFMaterial. Lower reflection probe resolution to 128x128 per side. 2022-10-19 14:41:17 -05:00
Brad Kittenbrink 44687a7862 WIP for SL-17697 live editing now computes diffs of changed material properties in tinygltf schema json 2022-10-17 15:48:49 -07:00