Commit Graph

628 Commits (283fe216dcc8c9ee1c814b69e774fdec428bc1f0)

Author SHA1 Message Date
Chris Galvan 9a32d433f4 Changed to use the lookup table directly than have a helper method
Signed-off-by: Chris Galvan <chgalvan@amazon.com>
4 years ago
Chris Galvan 12d5a304b5 Improved performance of UNORM_SRGB pixel retrieval by switching to a pre-computed lookup table
Signed-off-by: Chris Galvan <chgalvan@amazon.com>
4 years ago
Chris Galvan 8cf29ebc25 Added support for several UNORM_SRGB formats
Signed-off-by: Chris Galvan <chgalvan@amazon.com>
4 years ago
Chris Galvan b334b1ad98
Merge pull request #7590 from aws-lumberyard-dev/cgalvan/AllowOnlySupportedFormatsForImageGradientStreamingAsset
Only allow streaming image assets with supported pixel formats to be selected for an image gradient
4 years ago
Chris Galvan 9cd84b6b2d Only allow streaming image assets with supported pixel formats to be selected for an image gradient
Signed-off-by: Chris Galvan <chgalvan@amazon.com>
4 years ago
santorac b829c08f75 Fixed build error. Added error message if material type file JSON import fails.
Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
4 years ago
santorac 49ca8d332e Merge remote-tracking branch 'upstream/development' into Atom/santorac/RemixableMaterialTypes4_Layering
Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
4 years ago
santorac b67862a133 Minor updates from code review feedback.
Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
4 years ago
moraaar 7150a28ed6
Mesh Component: Add button to the Mesh Asset field to open mesh FBX settings (#7547)
This is an UX improvement for Mesh Component as the user can quickly access FBX settings of the mesh to modify it if they so desire.

Video
https://user-images.githubusercontent.com/27999040/153414278-f7996b9a-8a28-49d4-92a8-daeb9924b148.mp4

Signed-off-by: moraaar moraaar@amazon.com
4 years ago
dmcdiarmid-ly 257f3cb1ce
Merge pull request #7541 from aws-lumberyard-dev/Atom/dmcdiar/ATOM-17288
Application MSAA state
4 years ago
santorac 6b047fd89f Addressed code review feedback, minor updates.
Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
4 years ago
dmcdiarmid-ly 9d6062d96f Added an RPISystemInterface method to set the application-wide MSAA state
The Editor will now properly apply the MSAA state from MainRenderPipeline.azasset
Corrected a race condition with the cubemap baking pipeline

Signed-off-by: dmcdiarmid-ly <63674186+dmcdiarmid-ly@users.noreply.github.com>
4 years ago
santorac 0ecf41f6bc Merge remote-tracking branch 'upstream/development' into Atom/santorac/RemixableMaterialTypes4_Layering
Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
4 years ago
santorac 8fbd2aaaf5 Tied up a few loose ends to support deeply nested property groups.
Simplified the call back for MaterialTypeSourceData::EnumeratePropertyGroups while also providing more data.
Made the Material Inspector join nested property group display names to be like "Layer 1 | Base Color", since the leaf property groups are shown as a flat list in the inspector.
Fixed CreateMaterialAssetFromSourceData to include the imported json files in the list of sourceDependencies. This triggers the Material Editor to hot-reload when one of these json files changes.
Updated a few places that were still assuming only one level of property group.
Updated EditorMaterialComponentInspector to apply the per-property-group material functors, before it was still only applying the top-level onces.
Moved some accessor function implementations to the cpp files, per feedback on another already-merged PR.

Testing:
Made changes to MinimalMultilayerPbr (in AtomSampleViewer) to use nested property groups, and saw the correct behavior in the Material Editor's property inspector.
Used MaterialComponent's property inspector to edit a StandardPbr material instance. Confrimed that functors were correctly controlling property visibility by enabling and disabling things like emissive and clear coat.
Used MaterialComponent's property inspector to edit a MinimalMultilayerPbr material instance. Saw all the expected groups and properties show up. Confirmed that per-group functors were correctly controlling property visibility.
Used MaterialComponent's property inspector to export a material instance and confirmed the .material file included the expected properties.

Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
4 years ago
Chris Galvan 2f3c4d37df Improved image gradient GetValue(s) performance by using cached image data
Signed-off-by: Chris Galvan <chgalvan@amazon.com>
4 years ago
Chris Galvan 39777e7afb
Merge pull request #7406 from aws-lumberyard-dev/cgalvan/ImageGradientStreamingImageSupport
Updated the image gradient component to use a streaming image asset
4 years ago
santorac 8eafb7e057 Merge branch 'Atom/santorac/RemixableMaterialTypes4_FlatMaterialFiles' into Atom/santorac/RemixableMaterialTypes4_Layering
Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
4 years ago
santorac 74f6d1ec74 Cleanup up and resolving conflicts after the latest merge.
Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
4 years ago
santorac 1a10369adb Merge branch 'development' into Atom/santorac/RemixableMaterialTypes4_Layering
There were conflicts in MaterialDocument.cpp which I had resolve by just taking development. This will not compile. I will make additional fixes in another commit.

Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
4 years ago
santorac ddab03d678 Reponse to code review feedback. The main change is making GetPropertyValues return by const ref.
Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
4 years ago
Chris Galvan 640093fe63 Merge branch 'development' of https://github.com/o3de/o3de into cgalvan/ImageGradientStreamingImageSupport 4 years ago
santorac b05d4bdf36 Merge remote-tracking branch 'upstream/development' into Atom/santorac/RemixableMaterialTypes4_FlatMaterialFiles
Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
4 years ago
santorac 1daa9fbbed Changed the .material file format to use a flat list for material property values, instead of a tree structure.
This is needed to support deeply nested material property groups, it just makes the serialization code a lot simpler than trying to support nested groups in the .material file. It also makes the file more readable and easier to search all files for particular properties.
I also updated MaterialSourceData to hide the property values behind a clean API.

Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
4 years ago
Qing Tao 1e11df5d92
ATOM-17264 ASV: StreamingImageTest crashes (#7415)
Signed-off-by: Qing Tao <55564570+VickyAtAZ@users.noreply.github.com>
4 years ago
antonmic 4216e4cfed
Added support for hardware queue class on passes (#7339)
* Added support for hardware queue class on passes. Compute pass data and copy pass data can now specify to run on their appropriate queue.

Signed-off-by: antonmic <56370189+antonmic@users.noreply.github.com>

* addressed PR feedaback

Signed-off-by: antonmic <56370189+antonmic@users.noreply.github.com>

* fixing python test failures on AR

Signed-off-by: antonmic <56370189+antonmic@users.noreply.github.com>
4 years ago
Qing Tao 01892914ea
Atom/qingtao/atom 16135 (#7334)
* Changes to AttachmentImage related classes to have better support using render target as texture.
- Updated AttachmentImageAsset to support an unique name which can be used as AttachmentId.
- Functions in ImageSystemInterface to find an AttachmentImage by its unique name.
- Added InsertChild function to ParentPass class so it can insert a child pass at any location.
- Change to ImageAttachmentPreviewPass so it can preview cached pass attachment even the source pass was disabled.

Signed-off-by: Qing Tao <55564570+VickyAtAZ@users.noreply.github.com>
4 years ago
santorac 4bb93e4c94 Removed unnecessary MaterialSourceData::Property class.
This wrapper used to be needed in order to bind the custom JsonMaterialPropertyValueSerializer back when property values were represented by AZStd::any. Now that property values have a custom MaterialPropertyValue type, the wrapper class is no longer needed.

Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
4 years ago
Chris Galvan 6322dd5397 Updated the image gradient component to use a streaming image asset
Signed-off-by: Chris Galvan <chgalvan@amazon.com>
4 years ago
santorac 466e388f60 Fixed a unit test that broke in my last commit.
Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
4 years ago
antonmic 611598cd5d
Merge pull request #7340 from aws-lumberyard-dev/Atom/antonmic/RenderPipelineTick
Changed how pass system controls pipeline tick rate
4 years ago
Jeremy Ong 5c2ce583cd
Merge pull request #7356 from aws-lumberyard-dev/Atom/ShaderDefinitions
Add "Definitions" field to shader asset
4 years ago
moudgils 608411ab99
Metal pso caching support via MTLBinaryArchive (#7212)
* PipelineLibrary (PSO Caching) support for Metal

- API changes to handle Metal drivers implictly doing save/load of PipelineLibrary data
- Fixed up code related to Metal device selection
- PipelineLibrary support for Mac and ios

Signed-off-by: moudgils <moudgils@amazon.com>

* Fix compile errors for Dx12, Vulkan backend + Unit tests

Signed-off-by: moudgils <47460854+moudgils@users.noreply.github.com>

* Fixed errors related to M1 GPU

Signed-off-by: moudgils <moudgils@amazon.com>

* Fix a minor 'tab' validation issue

Signed-off-by: moudgils <moudgils@amazon.com>

* Addressed feedback

Signed-off-by: moudgils <moudgils@amazon.com>

* Minor feedback

Signed-off-by: moudgils <moudgils@amazon.com>

* Added a few asserts

Signed-off-by: moudgils <47460854+moudgils@users.noreply.github.com>

* Fix a typo

Signed-off-by: moudgils <moudgils@amazon.com>
4 years ago
Qing Tao 584f9abf16
Add new function to DynamicDrawInterface to support submiting cached DrawPacket (#7337)
New function:
void AddDrawPacket(Scene* scene, ConstPtr<RHI::DrawPacket> drawPacket)
Deprecated function (still supported) :
void AddDrawPacket(Scene* scene, AZStd::unique_ptr<const RHI::DrawPacket> drawPacket)

Signed-off-by: Qing Tao <55564570+VickyAtAZ@users.noreply.github.com>
4 years ago
antonmic 50f34cf445 Changed how pass system controls pipeline tick rate
Signed-off-by: antonmic <56370189+antonmic@users.noreply.github.com>
4 years ago
Jeremy Ong 743ade1765 Add "Definitions" field to shader asset
Shaders can now specify a top-level field "Definitions" which
accepts an array of string values. Each string will be appended
to the set of preprocessor definitions defined globally and forwarded
to the MCPP preprocessor on shader build. The shader-reload soak test
was modified to accept a new shader to test this feature in the ASV.

Signed-off-by: Jeremy Ong <jcong@amazon.com>
4 years ago
santorac a7bdb05d66 Tied up some loose ends with nested property group support.
Fixed the MaterialBuilder to report source dependencies on imported JSON files, so the material type will rebuild when you edit an imported file that contains shared property data.
Fixed a spot in LuaMaterialFunctorSourceData where it was only applying the old "prefix" feature and not the new name context.
Updated a couple built-in material functors to take advantage of the name context (they were using RuntimeContext::GetShaderResourceGroupLayout instead of the RuntimeContext::FindShaderInputConstantIndex wrapper utility function).
Fixed an issue with EnumeratePropertyGroups where it wasn't passing the right name context, so Material Editor wasn't able to load some material types.
Reordered the parameters in the MaterialTypeSourceData enumerate callback functions, I felt this order was more natural.

Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
4 years ago
santorac 2c59f1b8a4 Added support for deeply nested material property groups.
The main addition here is the MaterialNameContext class which represents the concept of a namespace for properties, shader options, and SRG fields. This concept was already somewhat supported in LuaMaterialFunctor through bespoke "prefix" fields, but I have generalized it be available for all material functors. Note that I have not yet updated the other material functor types to ensure they take advantage of this feature, that will be in another commit.

Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
4 years ago
santorac b1cc469914 Merge branch 'Atom/santorac/ShaderOptionValueUtils' into Atom/santorac/RemixableMaterialTypes4_Layering
Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
4 years ago
santorac 5ecc5b7edb Merge branch 'development' into Atom/santorac/RemixableMaterialTypes4_Layering
Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
4 years ago
santorac 3441c02637 Minor cleanup of some shader option related unit tests.
Added new utility functions for easily creating the value set for a ShaderOptionDescriptor.
Made ShaderOptionDescriptor default value optional, picking the first available value as the default ... by default.

Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
4 years ago
santorac a352807c87 Renamed MaterialFunctor code to use propertyId instead of propertyName, because 'name' is us for the short name of a property and 'ID' is for the full name including groups.
Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
4 years ago
Chris Galvan 63ce88a3ce
Merge pull request #7246 from aws-lumberyard-dev/cgalvan/AddedComponentSupportToRPIUtils
Extended sub image pixel API to support component indexing.
4 years ago
santorac 1190772845 Merge remote-tracking branch 'upstream/development' into Atom/santorac/RemixableMaterialTypes3
Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
4 years ago
santorac 90e34e8649 Fixed a couple places where we had variables called 'propertyNameContext' instead of 'propertyIdContext' which was inconsistent
Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
4 years ago
santorac d9c646062b Instrumented support for the JSON importer for material type files.
I also noticed that JsonFileLoadContext was no longer used (see https://github.com/o3de/o3de/pull/7010) so I was able to remove all that code.

Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
4 years ago
Chris Galvan fba7d73c57 Extended sub image pixel API to support component indexing.
Signed-off-by: Chris Galvan <chgalvan@amazon.com>
4 years ago
Jackerty e03d9eefd9
Moves Culling.cpp::ProcessWorklist debug variables under preprocessing (#7043)
Function Culling.cpp::ProcessWorklist has couple variable which are unsused when compiling profile causing
a -Werror compile error. Fixes is to move variables and code increment them under debugging ifdef.

Signed-off-by: Jackerty <contact.jackerty@gmail.com>
4 years ago
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>
4 years ago
santorac c2e220ce49 Renamed property 'set' to property 'group' for consistency with the prior naming.
Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
4 years ago
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>
4 years ago