Aqil Ahmad
5fe152cfea
Fix #4195 : Preserve transforms when switching PBR materials ( #4725 )
...
Fixes texture transforms being reset when switching from Blinn-Phong to PBR materials and between PBR. Previously, custom scale, offset, and rotation settings would be lost, making it tedious to switch between PBR materials.
2025-10-06 16:52:33 +03:00
Ansariel
9fdca96f8b
Re-enable compiler warnings C4244 and C4396 except for lltracerecording.h and llunittype.h for now
2024-07-08 20:27:14 +02:00
Brad Linden
7c42711ca3
Merge remote-tracking branch 'origin/DRTVWR-600-maint-A' into project/gltf_development
2024-06-10 16:22:12 -07:00
Andrey Lihatskiy
c95b4bf3ea
Post-merge - trim trailing whitespace
2024-06-10 20:45:59 +03:00
Cosmic Linden
6de0086ae9
secondlife/viewer#1475 : Add PBR terrain repeats editing
2024-06-07 18:14:32 -07:00
Ansariel
b42f9d836b
Re-enable a lot of compiler warnings for MSVC and address the C4267 "possible loss of precision" warnings
2024-06-01 15:49:26 +02:00
Cosmic Linden
9441608623
secondlife/viewer#907 : Local PBR terrain texture transforms
2024-05-10 17:42:54 -07:00
Andrey Lihatskiy
e2de27c84e
Merge branch 'main' into DRTVWR-600-maint-A
...
# Conflicts:
# indra/newview/llmaterialeditor.cpp
2024-01-08 23:38:28 +02: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
RunitaiLinden
361efcb926
Merge remote-tracking branch 'remotes/origin/DRTVWR-559' into DRTVWR-596
2023-11-15 10:32:18 -06:00
RunitaiLinden
0edb7cad6b
SL-20340 Fix for off-by-epsilon hack falling off when serializing overrides as LLSD. ( #513 )
2023-11-14 13:33:11 -06:00
RunitaiLinden
843866d193
Drtvwr 596 11/8/2023 ( #501 )
...
* SL-20570 Fix for lossy (and square) normal maps when importing GLTF materials.
* SL-20582 Fix for overriding to alpha mode blend not working. Incidental decruft of dead code (thanks, Rye!)
2023-11-13 13:12:48 -06:00
RunitaiLinden
e7b71cd8a1
SL-20582 Fix for overriding to alpha mode blend not working. Incidental decruft of dead code (thanks, Rye!)
2023-11-08 11:50:46 -06:00
Andrey Kleshchev
cc089d88ad
SL-20523 Ensure override gets updated before render material
2023-11-06 18:29:42 +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
Cosmic Linden
d22ea319a5
SL-20225: LLGLTFMaterial code sync
2023-10-09 16:05:58 -07:00
RunitaiLinden
813acc39fe
SL-20325 Fix for double sided not working.
2023-09-22 14:23:07 -05:00
RunitaiLinden
455bbcf742
SL-20229 Add GenericStreamingMessage and use it to receive GLTF material overrides
2023-08-29 16:42:55 -05: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
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
Cosmic Linden
b27c41578b
SL-19279: LLGLSLShader::bindXXX is not free. Pack the uniforms
2023-02-27 15:57:45 -08:00
Cosmic Linden
6494eed242
SL-19228: Fix GLTF texture transform rotation and add UV debug (PBR only). See textureUtilV.glsl for UV coordinate comments
2023-02-23 14:28:42 -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
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
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
Andrey Kleshchev
366efa4384
SL-18741 Add gltf to bulk uploads on mac
...
And cleaned up dupplicate mScale code
2023-01-06 17:32:50 +02: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
Dave Parks
fe2a07a80f
SL-18616 Fix for dropping mOverrideAlphaMode on copy
2022-11-11 14:34:57 -06: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
Sabrina Shanman
81011a318e
Merged in SL-18485 (pull request #1183 )
...
SL-18485: Render GLTF materials with extension KHR_texture_transform with approprate texture transforms
2022-11-02 20:10:04 +00:00
Dave Parks
3e7e146be6
SL-18520 Fix for mac build.
2022-11-02 14:58:24 -05: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
9f21fba6d9
SL-18513 Put profile markers around GLTF code.
2022-11-01 08:31:01 -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
Andrey Kleshchev
b1f529082b
SL-18446 Fix emissive tint
2022-10-31 20:42:47 +02: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
Dave Parks
fd751f4e99
SL-18105 Add remaining parameters to applyOverride
2022-10-20 17:45:03 -05: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
Dave Parks
f6762c3de5
SL-18105 Add to/from json capability to LLGLTFMaterial
2022-10-14 17:35:48 -05:00