Commit Graph

992 Commits

Author SHA1 Message Date
santorac 3f32669883 Merge pull request #7449 from aws-lumberyard-dev/Atom/santorac/RemixableMaterialTypes4_FlatMaterialFiles
Changed the Material File Format to Use a Flat Property List
2022-02-08 16:19:55 -08:00
santorac 1894cd60c7 Merge remote-tracking branch 'upstream/development' into Atom/santorac/RemixableMaterialTypes4_FlatMaterialFiles
Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
2022-02-08 14:07:32 -08:00
Jeremy Ong 5f914e8e1a Add README to describe upcoming material type changes
Signed-off-by: Jeremy Ong <jcong@amazon.com>
2022-02-08 14:55:50 -07:00
Jeremy Ong faa65bca1b Refactor shader definitions to be more consistent with other shaders
Signed-off-by: Jeremy Ong <jcong@amazon.com>
2022-02-08 14:55:48 -07:00
Jeremy Ong 86d8ececfb Resolve incorrect SHADOWS definitions
Signed-off-by: Jeremy Ong <jcong@amazon.com>
2022-02-08 14:55:46 -07:00
Jeremy Ong 9ed9bcbb2f Fix incorrect include header casing
Signed-off-by: Jeremy Ong <jcong@amazon.com>
2022-02-08 14:55:44 -07:00
Jeremy Ong 4bcc83e7ac Address PR feedback, ensure all ASV tests pass
Signed-off-by: Jeremy Ong <jcong@amazon.com>
2022-02-08 14:55:42 -07:00
Jeremy Ong 7aace39c2f Consolidate alpha retrieval and clip
Signed-off-by: Jeremy Ong <jcong@amazon.com>
2022-02-08 14:55:41 -07:00
Jeremy Ong 61f915366a Shader refactor (no functional changes)
The purpose of this shader refactor is to split various material type
shaders into disparate pieces:

1. The original material type shaders now include an external file with
   the actual shader entry points and structure of the algorithm (e.g.
   depth pass, shadow pass, forward pass) but continue to specify the
   SRGs used
2. Common functionality used across multiple shaders was consolidated
   into routines implemented in the MaterialFunctions folder
   (Materials/Types/MaterialFunctions)
3. The implementation shaders rely on common routines to be
   included/imported prior to inclusion, and by design, make no
   references to any Draw, Object, or Material SRG.

This refactor only includes the Standard and Enhanced material types,
and is, for the most part, a non-functional change. However, the Surface
definition needed to be augmented to include information needed by
lighting later. Modifying the Surface structure enables the lighting
loops to avoid any references to the Material SRG. This completes the
decoupling needed to support future Material canvas work, as well as a
future Material pipeline abstraction (where by the implementation
shaders can be injected by the user, customized per platform, and in
general, are simply decoupled from the materials themselves).

Signed-off-by: Jeremy Ong <jcong@amazon.com>
2022-02-08 14:55:39 -07:00
rgba16f 742ea34d44 Add a function to get the internal data for a disk light from it's feature processor (#7450)
* Add a function to get the internal data for a disk light from it's feature processor

Signed-off-by: rgba16f <82187279+rgba16f@users.noreply.github.com>

* Address PR comments. Fixed assert message, made function const.

Signed-off-by: rgba16f <82187279+rgba16f@users.noreply.github.com>
2022-02-08 15:24:37 -06:00
santorac a6fde12fd3 Merge remote-tracking branch 'upstream/development' into Atom/santorac/RemixableMaterialTypes4_FlatMaterialFiles
Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
2022-02-07 10:04:02 -08:00
Santi Paprika fe163bc930 Merge remote-tracking branch 'upstream/development' into thin-transmission 2022-02-05 13:30:17 +01:00
antonmic 5baf7d5147 removing compute queue flag from SSAO since it's causing crashes for some people
Signed-off-by: antonmic <56370189+antonmic@users.noreply.github.com>
2022-02-04 12:46:42 -08:00
santorac b05d4bdf36 Merge remote-tracking branch 'upstream/development' into Atom/santorac/RemixableMaterialTypes4_FlatMaterialFiles
Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
2022-02-04 12:08:28 -08:00
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>
2022-02-04 12:04:50 -08:00
Ken Pruiksma ff4412db7c Calculating uv transforms for terrain detail materials (#7375)
Calculating uv transforms for terrain detail materials

This adds support for uv transforms in terrain detail materials. To support this work, the code for generating a matrix from material properties was pulled out of the material functor and put into a new MaterialUtils file in Atom Utils.
2022-02-04 11:01:47 -06:00
Santi Paprika c173fd9357 Remove division by constant in distance attenuation for DirectionalLight (https://github.com/o3de/o3de/pull/6428#discussion_r799216516)
Signed-off-by: Santi Paprika <santi.gonzalez.cs@gmail.com>
2022-02-04 17:34:39 +01:00
Santi Paprika 6e21d63943 Merge remote-tracking branch 'upstream/development' into thin-transmission
Signed-off-by: Santi Paprika <santi.gonzalez.cs@gmail.com>
2022-02-04 12:36:31 +01:00
Santi Paprika 024933d4a1 Improve descriptions and comments (https://github.com/o3de/o3de/pull/6428#discussion_r799207891, https://github.com/o3de/o3de/pull/6428#discussion_r799213620)
Signed-off-by: Santi Paprika <santi.gonzalez.cs@gmail.com>
2022-02-04 12:15:45 +01:00
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>
2022-02-03 16:37:42 -08:00
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>
2022-02-03 14:58:58 -08:00
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>
2022-02-03 14:58:03 -08:00
Tommy Walton 837d4fde3e Create a debug material type for displaying per-vertex data (#7220)
* Create a debug material type for displaying per-vertex data

Signed-off-by: Tommy Walton <waltont@amazon.com>

* PR feedback. Added color display mode, multiple uv-set support, split tangent/bitangent options into two separate enums, and added a functor for showing only the applicable properties in the UI depending on which vertex stream and uv set are selected.

Signed-off-by: Tommy Walton <waltont@amazon.com>
2022-02-03 11:00:52 -08:00
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>
2022-02-02 10:50:37 -08:00
Santi Paprika 9c60bd008c Enable human skin profile via preprocessor define (https://github.com/o3de/o3de/pull/6428#discussion_r797699927)
Signed-off-by: Santi Paprika <santi.gonzalez.cs@gmail.com>
2022-02-02 18:47:11 +01:00
Santi Paprika 1087e45ce3 Fix typo (https://github.com/o3de/o3de/pull/6428#discussion_r797667772)
Signed-off-by: Santi Paprika <santi.gonzalez.cs@gmail.com>
2022-02-02 18:42:29 +01:00
Santi Paprika 1c47d719c8 Merge remote-tracking branch 'upstream/development' into thin-transmission 2022-02-02 16:15:00 +01:00
antonmic 7534193234 merging dev for good luck after failed AR
Signed-off-by: antonmic <56370189+antonmic@users.noreply.github.com>
2022-02-01 22:50:38 -08:00
santorac d6c419d630 Merge pull request #7250 from aws-lumberyard-dev/Atom/santorac/RemixableMaterialTypes3_UpdatedStandardPbr
Updated StandardPbr.materialtype to follow the new file material type format
2022-02-01 19:08:35 -08:00
antonmic ba76d304dc merging latest dev
Signed-off-by: antonmic <56370189+antonmic@users.noreply.github.com>
2022-02-01 16:54:00 -08:00
santorac 8042a6e97a Merge branch 'development' into Atom/santorac/RemixableMaterialTypes3_UpdatedStandardPbr
Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
2022-02-01 16:39:20 -08:00
antonmic 5b9bc3b479 address PR feedback
Signed-off-by: antonmic <56370189+antonmic@users.noreply.github.com>
2022-02-01 16:08:10 -08:00
dmcdiarmid-ly 7413842227 Merge pull request #7275 from aws-lumberyard-dev/Atom/dmcdiar/ATOM-13886
DiffuseProbeGrid Visualization
2022-02-01 14:47:01 -07:00
Steve Pham 71cc3a2568 Remove -Wno-comment warning suppression
Signed-off-by: Steve Pham <82231385+spham-amzn@users.noreply.github.com>
2022-02-01 09:04:32 -08:00
AMZN-nggieber f5fcab75d6 Display Gem Icons in Gem Catalog (#7294)
Signed-off-by: nggieber <52797929+AMZN-nggieber@users.noreply.github.com>

Co-authored-by: Alex Peterson <26804013+AMZN-alexpete@users.noreply.github.com>
2022-01-31 17:06:06 -08:00
dmcdiarmid-ly 5c3d5a290a Minor changes
Signed-off-by: dmcdiarmid-ly <63674186+dmcdiarmid-ly@users.noreply.github.com>
2022-01-31 12:51:41 -07:00
santorac 1190772845 Merge remote-tracking branch 'upstream/development' into Atom/santorac/RemixableMaterialTypes3
Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
2022-01-31 09:21:18 -08:00
antonmic 9f0b6d65f4 merging latest dev
Signed-off-by: antonmic <56370189+antonmic@users.noreply.github.com>
2022-01-29 22:29:02 -08:00
dmcdiarmid-ly ec76a4d647 Always relocate probes after the texture is cleared
Signed-off-by: dmcdiarmid-ly <63674186+dmcdiarmid-ly@users.noreply.github.com>
2022-01-29 20:59:22 -07:00
dmcdiarmid-ly 5f7a30f8da Added DiffuseProbeGrid Visualization passes, shaders, and editor controls.
Changed the DiffuseGI passes to override IsEnabled() instead of exiting early from FrameBeginInternal.

Signed-off-by: dmcdiarmid-ly <63674186+dmcdiarmid-ly@users.noreply.github.com>
2022-01-29 19:37:46 -07:00
santorac e173840bab Moved the StandardPbr property groups around to be in their original order.
Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
2022-01-28 09:40:33 -08:00
santorac c3363fc22e Updating StandardPbr.materialtype to follow the new file format. In this commit all I did was combine the "groups" metadata together with the property lists. The groups will now show up in the wrong order in the Material Editor, because that was based on the "groups" list that no longer exists. I wanted to keep the giant list of properties in the same order for an easier diff review. In the next commit, I'll move the property groups around to be in the same order as before.
Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
2022-01-28 09:36:09 -08:00
Thomas Poulet 3a0edd2dd1 Move reflection probe fp file and fix missings in cmake file list (#7189)
Signed-off-by: Bindless-Chicken <1039134+Bindless-Chicken@users.noreply.github.com>
2022-01-28 10:30:30 -06:00
santorac b9a80dee32 Fixed newline at end of file.
Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
2022-01-27 14:17:09 -08:00
santorac 5e2bf1a468 Reverted changes to most of the material type files. I'll update those in a separate PR.
Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
2022-01-27 14:14: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
mrieggeramzn 50982b8283 Exposing / Unifying the rasterstate depth bias values for all the shadowmap shaders (#7150)
Signed-off-by: mrieggeramzn <mriegger@amazon.com>
2022-01-26 16:04:12 -08: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
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 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