Commit Graph

671 Commits

Author SHA1 Message Date
santorac fa037d5d7d Updated MaterialSourceData::CreateMaterialAssetFromSourceData to use MaterialUtils::LoadMaterialTypeSourceData which calls ConvertToNewDataFormat(). This was needed by Material Editor to succesfully load old-format material types.
Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
2022-01-27 16:49:17 -08:00
santorac c2e220ce49 Renamed property 'set' to property 'group' for consistency with the prior naming.
Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
2022-01-27 16:11:26 -08:00
santorac 1de540ae3f Updated code to use span instead of array_view as this was replaced on the development branch.
Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
2022-01-27 14:48:50 -08:00
santorac 906db920d0 Merge remote-tracking branch 'upstream/development' into Atom/santorac/RemixableMaterialTypes3
Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
2022-01-27 12:58:22 -08:00
santorac a4346de658 Code cleanup. New comments. Added some non-const find functions to MaterialTypeSourceData. Fixed places where I forgot to change m_name to GetName().
Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
2022-01-26 23:54:25 -08:00
santorac e0cee13747 Code cleanup.
Made PropertyDefinition::m_name private.
Moved code around for a cleaner diff in MaterialTypeSourceData.h.
Added API comments.

Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
2022-01-26 18:10:02 -08:00
Chris Galvan f368997deb Modified the passing of span in test
Signed-off-by: Chris Galvan <chgalvan@amazon.com>
2022-01-26 19:06:57 -06:00
santorac 68e4970a2d Reverted the new Tokenize function I added, and used TokenizeVisitor instead.
Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
2022-01-26 16:47:10 -08:00
Chris Galvan f3fa731fef Merge branch 'development' of https://github.com/o3de/o3de into cgalvan/DraftStreamingImageAssetPixelAPI 2022-01-26 16:46:58 -06:00
lumberyard-employee-dm b9824ed172 Updated all array_view uses with the C++20 span. (#7157)
* Updated all array_view uses with the C++20 span.

The updates were done in the following order
1. `AZStd::array_view<([^>].+)\* ?>`  -> `AZStd::span<\1 const>`
2. `AZStd::array_view<(?:const )(.+)>` -> `AZStd::span<const \1>`
3. `AZStd::array_view` -> `AZStd::span`

Removed the implementation of array_view.

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Added missing whitespace between `const` and the typename for spans.

Updated the ShaderTest comparison of the ShaderResourceGroupLayout span
to compare the sizes as well

Updated comments on some of the methods that stated that they return "an
array" to mention they return "a span".

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
2022-01-26 16:15:47 -06:00
Chris Galvan 0550167f9f Updated API to return false if there is any issue retrieving the data
Signed-off-by: Chris Galvan <chgalvan@amazon.com>
2022-01-26 16:09:03 -06:00
Chris Galvan 670777f0f2 Moved the pixel value retrieval APIs from StreamingImageAsset to RPIUtils
Signed-off-by: Chris Galvan <chgalvan@amazon.com>
2022-01-26 15:25:47 -06:00
santorac aeb43c4012 Fixed up a few small things to get Material Editor working again.
Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
2022-01-26 13:04:28 -08:00
santorac 9b8bebbd70 Bumped the MaterialBuilder version number.
Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
2022-01-26 12:21:43 -08:00
santorac 4312c636af Got the RPI unit tests building and working again after merge. There were some incorrectly resolved conflicts that I had to re-resolve, especially in MaterialTypeSourceData::CreateMaterialTypeAsset.
I removed support for property rename version updates in MaterialTypeSourceData (i.e. ApplyPropertyRenames) because MaterialSourceData serialization no longer loads material property definitions from the .materialtype file, per a recent change on the development branch. The unit tests were broken and it wasn't worth updating them since we don't need this functionality anymore. Material property renames and other version updates are now exclusively applied by the MaterialAsset class.

Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
2022-01-26 12:19:49 -08:00
Chris Galvan 921c1e2201 Modified GetSubImagePixelValues API to be exclusive with bottom right coordinate, and documented as such
Signed-off-by: Chris Galvan <chgalvan@amazon.com>
2022-01-26 11:15:37 -06:00
Chris Galvan aa025a5e7d Updated unit tests per PR feedback
Signed-off-by: Chris Galvan <chgalvan@amazon.com>
2022-01-26 10:48:08 -06:00
Chris Galvan 93261022f1 Merge branch 'development' of https://github.com/o3de/o3de into cgalvan/DraftStreamingImageAssetPixelAPI 2022-01-26 10:20:35 -06:00
Chris Galvan 7ef9a01d24 Fixed compile issue on Linux
Signed-off-by: Chris Galvan <chgalvan@amazon.com>
2022-01-26 10:16:31 -06:00
Esteban Papp 6fad254b59 Merge branch 'development' into optimization/unused_files
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

# Conflicts:
#	Code/Editor/IEditorImpl.cpp
#	Code/Editor/IEditorImpl.h
#	Gems/LmbrCentral/Code/Tests/lmbrcentral_editor_tests_files.cmake
2022-01-25 15:40:30 -08:00
santorac b5c7869f14 Merge branch 'development' into Atom/santorac/RemixableMaterialTypes3
There were lots of material system conflicts that had to be resolved. I expect the build is broken at this commit, and I'll fix it in followup commits.

Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
2022-01-25 14:47:24 -08:00
Chris Galvan efd2e41b05 Added unit test for single pixel and pixel regions API usage
Signed-off-by: Chris Galvan <chgalvan@amazon.com>
2022-01-25 10:22:39 -06:00
Chris Galvan f3120ca780 Made some float constants more explicit and updated the pixel index calculation logic to be more concise
Signed-off-by: Chris Galvan <chgalvan@amazon.com>
2022-01-25 09:58:00 -06:00
Chris Galvan 54893da550 Merge branch 'development' of https://github.com/o3de/o3de into cgalvan/DraftStreamingImageAssetPixelAPI 2022-01-24 16:18:38 -06:00
santorac fec2b889a3 Merge remote-tracking branch 'upstream/development' into Atom/santorac/RemixableMaterialTypes2_FIX2
Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
2022-01-24 10:54:03 -08:00
Chris Galvan 8d0dce2613 Merge pull request #7101 from siretty/fix_build_linux_clang_13
Fix Build on Linux with Clang 13 with Debug, Profile and Release Configuration
2022-01-24 12:24:33 -06:00
Chris Galvan a0594aac9c Merge branch 'development' of https://github.com/o3de/o3de into cgalvan/DraftStreamingImageAssetPixelAPI 2022-01-24 11:48:44 -06:00
Chris Galvan 71640c1c82 Merge pull request #6376 from nemerle/compiletime_filerequest_code2
Compile time reduction - FileRequest & related changes
2022-01-24 11:43:27 -06:00
Daniel Edwards 0a5f472f43 Clang 13: Fix build errors ...
... due to local variables only being written to (but never read).

Signed-off-by: Daniel Edwards <dev@danieledwards.de>
2022-01-23 22:29:03 +01:00
Chris Galvan c13622c5af Handled special case logic for SNORM minimum value conversion
Signed-off-by: Chris Galvan <chgalvan@amazon.com>
2022-01-21 16:07:27 -06:00
Chris Galvan 1e591ab019 Removed const_cast now that we've switched from array_view to span
Signed-off-by: Chris Galvan <chgalvan@amazon.com>
2022-01-21 15:32:30 -06:00
Chris Galvan c02061e88d Merge branch 'development' of https://github.com/o3de/o3de into cgalvan/DraftStreamingImageAssetPixelAPI 2022-01-21 14:46:11 -06:00
santorac b9ba9f5ca8 Got RPI unit tests building and passing again.
Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
2022-01-20 16:11:31 -08:00
santorac 534843df0f Added MaterialPropertyId::GetStringView() utility function.
Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
2022-01-20 15:43:56 -08:00
santorac 8d5a53ab93 Minor changes per code review feedback. Added explicit keyword. Renmoved unnecessary local variable.
Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
2022-01-20 15:43:45 -08:00
santorac 02acf2f65e Updated MaterialPropertyId class in preparation for nested material property sets.
Here the class has been generalized for a list of group names and a final property name, rather than assuming a single group containing the property. This included removing the unused GetPropertyName and GetGroupName functions. All that's really need from this class is conversion to a full property ID string.

Testing:
New unit test.
Reprocessed all core material types and StandardPBR test materials used in Atom Sample Viewer's material screenshot test.
Atom Sample Viewer material screenshot test script.

Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
2022-01-20 15:43:22 -08:00
Esteban Papp b3ba73db3b Removing unneded include form multiple files
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
2022-01-20 15:30:50 -08:00
dmcdiarmid-ly 5ed7e91a62 Merge pull request #7022 from aws-lumberyard-dev/Atom/dmcdiar/ATOM-17127
NumRaysPerProbe DiffuseProbeGrid setting
2022-01-20 16:14:53 -07:00
Chris Galvan c090ad6a56 Account for the pixel size when computing the image data index
Signed-off-by: Chris Galvan <chgalvan@amazon.com>
2022-01-20 16:10:42 -06:00
santorac 74c6fa5f94 Merge pull request #7010 from aws-lumberyard-dev/Atom/santorac/MaterialAssetDeferredBaking3
Fixed Material Builder To Avoid Reading Material Type Source File
2022-01-20 13:25:15 -08:00
Steve Pham 59e43813f0 GCC Support for Linux
Updates and fixes to support GCC for Linux

Signed-off-by: Steve Pham <82231385+spham-amzn@users.noreply.github.com>

Co-authored-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
2022-01-20 13:00:02 -08:00
Chris Galvan cdcf8defd0 Added special case support for R8_SNORM, R16_SNORM, and R16_FLOAT
Signed-off-by: Chris Galvan <chgalvan@amazon.com>
2022-01-20 13:53:51 -06:00
santorac f4befb2242 Removed some dead code.
Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
2022-01-20 11:39:28 -08:00
santorac 730daae1e6 Added code comments.
Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
2022-01-20 09:33:21 -08:00
Chris Galvan 0bd2083c48 Replaced array_view usage with span
Signed-off-by: Chris Galvan <chgalvan@amazon.com>
2022-01-20 10:35:22 -06:00
dmcdiarmid-ly c27f73c66b Added a NumRaysPerProbe DiffuseProbeGrid setting
Added supervariants to the precompiled DiffuseProbeGrid shaders for the NumRaysPerProbe values

Signed-off-by: dmcdiarmid-ly <63674186+dmcdiarmid-ly@users.noreply.github.com>
2022-01-19 20:17:15 -07:00
Chris Galvan b6b8b464d0 Use AZStd::array instead of AZStd::vector when retrieving a single pixel
Signed-off-by: Chris Galvan <chgalvan@amazon.com>
2022-01-19 16:53:59 -06:00
Chris Galvan 87651fa810 Merge branch 'development' of https://github.com/o3de/o3de into cgalvan/DraftStreamingImageAssetPixelAPI 2022-01-19 15:21:26 -06:00
santorac fbe17b0022 Merge remote-tracking branch 'upstream/development' into Atom/santorac/MaterialAssetDeferredBaking3 2022-01-19 12:30:58 -08:00
santorac b61238e50c Minor fixes to whitespace and comments.
Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
2022-01-19 12:30:51 -08:00