Commit Graph

1006 Commits (bc2589f3e8c13cb293963a1c7aa3610dcaf7b924)

Author SHA1 Message Date
Jeremy Ong bc2589f3e8
Merge pull request #7529 from yaakuro/yaakuro-development-patch-7
Remove redundant ProgramVariant tag because it got deprecated.
4 years ago
Qing Tao 846e2736a5
[new] ATOM-17253 Using AtomTressFX gem as an example to inject hair passes to main pipeline at run-time (#7661)
* Change AtomTressFX passes to write to exsiting DepthLinear buffer instead of creating a new one as output.

Signed-off-by: Qing Tao <55564570+VickyAtAZ@users.noreply.github.com>

* Added new api in RPI to apply render pipeline changes from FP

Signed-off-by: Qing Tao <55564570+VickyAtAZ@users.noreply.github.com>

* Update AtomTressFX gem to create hair parent pass at runtime

Signed-off-by: Qing Tao <55564570+VickyAtAZ@users.noreply.github.com>

* Change Scene::ApplyRenderPipelineChange() to TryApplyRenderPIpelineChanges().
Have TryApplyRenderPIpelineChanges() called automatically when a render pipeline is added to a Scene.
Re-apply the render pipeline change when RenderPipeline got recreated (Pass hot-reloading support)
Add AddPassBefore() and AddPassAfter() function to RenderPIpeline class.

Signed-off-by: Qing Tao <55564570+VickyAtAZ@users.noreply.github.com>
4 years ago
santorac 235613710f
Merge pull request #7537 from aws-lumberyard-dev/Atom/santorac/RemixableMaterialTypes4_Layering
Added Support For Factoring-Out Material Property Groups
4 years ago
lumberyard-employee-dm d7ee248df5
Range adaptor support (#7388)
* Updated the SFINAE checks in concepts.h and range.h

To use conjunction and disjunction for short-circuiting behavior.

Replaced AZStd::optional implementation with std::optional alias

Added range adaptor support and the following views: ref_view,
owning_view

Added bitwise or(|) overload for chaining range adaptor closures together

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

* Adding indirectly invocable concepts.

These concepts are used to determine whether a callable can be invoked
with a dereferenced iterator instance.

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

* Add implementation of range relational function objects

Add implementation of range min max functions which uses the range
relation function objects(ranges::less, ranges::equal_to, etc...)

This is needed to implement ranges::zip_view

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

* Adding interface for zip_view which compiles successfully

The implementation for the zip view functions still need to be filled.

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

* Adding function definitions for zip_view classes.

Adding empty header of subrange.h for the ranges::subrange class

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

* Adding additional view implementations.

The following range and view classes have been added: empty_view,
single_view and subrange.

Moved the AZ_NO_UNIQUE_ADDRESS macro to PlatformDef.h to allow other
code to specify the [[no_unique_address]] attribute.

Added additional test for view structures.

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

* Adding missing includes for non-unity builds

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

* Workaround for NDK21 clang 9.0.9 compile issue.

The AZStd::ranges::zip_view::iterator::iter_swap friend function is in the
AZStd::ranges namespace, while the customization point object of
`AZStd::ranges::customization_point_object::iter_swap` is in the regular
namespace of `AZStd::ranges` and the inline namespace of
`customization_point`.

This issue is fixed in NDK23, but as Jenkins uses NDK21 at the time, the
entire zip_view implementation has moved to inline namespace of
`zip_view_internal`

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

* Added iterator algorithm requiremetn concepts

Fixed the ambiguity in the ranges::iter_swap exchange overload to
exclude itself as a candidate if the iterator reference types are
swappable with each other.

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

* Adding type alias for borrowed_subrange_t

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

* Fixed convertible to ref_view check in the ranges::all
customization_point

Updated SFINAE detection of whether AZStd::to_address is invocable

Moved the

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

* Fixed private variable access in ranges::subrange get specialization.

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

* Removing ranges::view constraint from the ranges::views::single
customization_point.

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

* Adding C++23 range overload for string_view.

It is detailed in the [C++draft strings](https://eel.is/c++draft/strings#lib:basic_string_view,constructor____) section

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

* Adding implementations of ranges, find, search, mismatch and equal
functions.

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

* Adding implementation of ranges split_view along with test.

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

* Adding const overloads to SceneAPI ProxyPointer container

The Proxy Pointer class operator* and operator-> was unable to be
invoked with a const instance before. Now it returns a const view of the
pointer it contains.
This allows it to be invoked in `AZStd::to_address` as part of an SINAE
context for the contiguous_iterator concept

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

* Refactored the to_address implementation to better work with SFINAE.

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

* Adding general non-unity build fixes

This is unrelated to the RangeAdaptor changes.

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

* Allow range algorithms to be used with rvalue ranges

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

* Workaround MSVC Internal Compiler erroy by removing enable_if
condition in the operator bool of the view_interface class.

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

* Corrected the non_propagating_cache helper class to have public
functions

Fixed the order of creating the perfect forwarding call wrapper for an
outer closure around another closure.

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

* Specialized the borrowed_range and view concepts

For the AZ PathView class, since it is a immutable view around a path.

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

* Removed inline namespace around the zip_view class.

It was needed to workaround a clang 10 or below issue where a friend
function in a namespace and a variable within underneath an inline
namespace within the function namespace would cause an improper symbol
redefinition.

The workaround is to create a placeholder namespace containing the
inline namespace and then bring that placeholder namespace into the
parent scope.

https://bugs.llvm.org/show_bug.cgi?id=37556

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

* Adding implementation of the elemetns_view and join_view classes

It is up to date with the standard as of the current draft:
https://eel.is/c++draft/ranges.

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

* Separated definitions of concepts out of concepts.h

This allows the ranges::iter_swap and ranges::swap customization point to be moved
outside of the concepts folder and into the ranges folder.

The concepts.h header previously had to define those objects to avoid
circular dependencies.

Added the work around for ranges::iter_swap and ranges::iter_move
customization_point causing an improper symbol redefinition in clang 10
or below: https://bugs.llvm.org/show_bug.cgi?id=37556

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

* Alias more std:: names into the AZStd namespace.

Removed our custom implementation of toaddress.

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

* Adding more range view test.

The join_view and elements_view classes now have UnitTest.

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

* Adding deduction guides for AZStd associative containers

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

* Moved zip_view::sentinel iterator accessor function to zip_view.inl

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

* Fixed variable shadowing issues with clang 12+

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@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
dmcdiarmid-ly 257f3cb1ce
Merge pull request #7541 from aws-lumberyard-dev/Atom/dmcdiar/ATOM-17288
Application MSAA state
4 years ago
dmcdiarmid-ly 3ad7888107 Checked the device raytracing feature flag before initializing the visualization raytracing objects
Signed-off-by: dmcdiarmid-ly <63674186+dmcdiarmid-ly@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
Yaakuro 4852cb0d60 Remove redundant ProgramVariant feature because it got deprecated.
Signed-off-by: Yaakuro <y1@codeposer.net>
4 years ago
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
4 years ago
santorac 1894cd60c7 Merge remote-tracking branch 'upstream/development' into Atom/santorac/RemixableMaterialTypes4_FlatMaterialFiles
Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
4 years ago
Jeremy Ong 5f914e8e1a Add README to describe upcoming material type changes
Signed-off-by: Jeremy Ong <jcong@amazon.com>
4 years ago
Jeremy Ong faa65bca1b Refactor shader definitions to be more consistent with other shaders
Signed-off-by: Jeremy Ong <jcong@amazon.com>
4 years ago
Jeremy Ong 86d8ececfb Resolve incorrect SHADOWS definitions
Signed-off-by: Jeremy Ong <jcong@amazon.com>
4 years ago
Jeremy Ong 9ed9bcbb2f Fix incorrect include header casing
Signed-off-by: Jeremy Ong <jcong@amazon.com>
4 years ago
Jeremy Ong 4bcc83e7ac Address PR feedback, ensure all ASV tests pass
Signed-off-by: Jeremy Ong <jcong@amazon.com>
4 years ago
Jeremy Ong 7aace39c2f Consolidate alpha retrieval and clip
Signed-off-by: Jeremy Ong <jcong@amazon.com>
4 years ago
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>
4 years ago
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>
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 bdeb08f352 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 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 a6fde12fd3 Merge remote-tracking branch 'upstream/development' into Atom/santorac/RemixableMaterialTypes4_FlatMaterialFiles
Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
4 years ago
Santi Paprika fe163bc930 Merge remote-tracking branch 'upstream/development' into thin-transmission 4 years ago
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>
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
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.
4 years ago
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>
4 years ago
Santi Paprika 6e21d63943 Merge remote-tracking branch 'upstream/development' into thin-transmission
Signed-off-by: Santi Paprika <santi.gonzalez.cs@gmail.com>
4 years ago
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>
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
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>
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
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>
4 years ago
Santi Paprika 1087e45ce3 Fix typo (https://github.com/o3de/o3de/pull/6428#discussion_r797667772)
Signed-off-by: Santi Paprika <santi.gonzalez.cs@gmail.com>
4 years ago
Santi Paprika 1c47d719c8 Merge remote-tracking branch 'upstream/development' into thin-transmission 4 years ago
antonmic 7534193234 merging dev for good luck after failed AR
Signed-off-by: antonmic <56370189+antonmic@users.noreply.github.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 d6c419d630
Merge pull request #7250 from aws-lumberyard-dev/Atom/santorac/RemixableMaterialTypes3_UpdatedStandardPbr
Updated StandardPbr.materialtype to follow the new file material type format
4 years ago
antonmic ba76d304dc merging latest dev
Signed-off-by: antonmic <56370189+antonmic@users.noreply.github.com>
4 years ago
santorac 8042a6e97a Merge branch 'development' into Atom/santorac/RemixableMaterialTypes3_UpdatedStandardPbr
Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
4 years ago
antonmic 5b9bc3b479 address PR feedback
Signed-off-by: antonmic <56370189+antonmic@users.noreply.github.com>
4 years ago
dmcdiarmid-ly 7413842227
Merge pull request #7275 from aws-lumberyard-dev/Atom/dmcdiar/ATOM-13886
DiffuseProbeGrid Visualization
4 years ago
Steve Pham 71cc3a2568
Remove -Wno-comment warning suppression
Signed-off-by: Steve Pham <82231385+spham-amzn@users.noreply.github.com>
4 years ago
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>
4 years ago
dmcdiarmid-ly 5c3d5a290a Minor changes
Signed-off-by: dmcdiarmid-ly <63674186+dmcdiarmid-ly@users.noreply.github.com>
4 years ago