* Added buffer for material properties of detail mateirals, storing them in a multi-indexed data vector. Updated shader with relevant struct and buffer, but the buffer will need to be moved out of the mateiral SRG to work.
Signed-off-by: Ken Pruiksma <pruiksma@amazon.com>
* Added buffer for material properties of detail mateirals, storing them in a multi-indexed data vector. Updated shader with relevant struct and buffer, but the buffer will need to be moved out of the mateiral SRG to work.
Signed-off-by: Ken Pruiksma <pruiksma@amazon.com>
* Added buffer for material properties of detail mateirals, storing them in a multi-indexed data vector. Updated shader with relevant struct and buffer, but the buffer will need to be moved out of the mateiral SRG to work.
Signed-off-by: Ken Pruiksma <pruiksma@amazon.com>
* - Moved settings related to the detail material to a partial view srg owned by the terrain gem.
- Added support for base color in detail materials.
- Hooked up basic base color rendering of detail materials.
- Corrected the way the material data was stored.
- Added ref counting for detail materials so they can be released when no longer used.
Signed-off-by: Ken Pruiksma <pruiksma@amazon.com>
* Added buffer for material properties of detail mateirals, storing them in a multi-indexed data vector. Updated shader with relevant struct and buffer, but the buffer will need to be moved out of the mateiral SRG to work.
Signed-off-by: Ken Pruiksma <pruiksma@amazon.com>
* - Moved settings related to the detail material to a partial view srg owned by the terrain gem.
- Added support for base color in detail materials.
- Hooked up basic base color rendering of detail materials.
- Corrected the way the material data was stored.
- Added ref counting for detail materials so they can be released when no longer used.
Signed-off-by: Ken Pruiksma <pruiksma@amazon.com>
* Detail materials now put textures into bindless array that's accessed in the shader. Shader now pulls all the detail materal information for a single mateiral but does no blending.
Signed-off-by: Ken Pruiksma <pruiksma@amazon.com>
* Correcting rebase merge problem.
Signed-off-by: Ken Pruiksma <pruiksma@amazon.com>
* Fix detail roughness fade out with distance.
Signed-off-by: Ken Pruiksma <pruiksma@amazon.com>
* Adding tests for new MultiIndexedDataVector functions
Signed-off-by: Ken Pruiksma <pruiksma@amazon.com>
* Updates to move bindless array to separate SRG
- Exposed BindSrg() in renderpass so it's possible to add additional SRGs to a pass
- Created a TerrainSrg for use by the terrain forward shader
- Moved the bindless array out of the partial view SRG to the TerrainSrg
Signed-off-by: Ken Pruiksma <pruiksma@amazon.com>
* Moved more properties out of the view srg to the terrain srg.
Signed-off-by: Ken Pruiksma <pruiksma@amazon.com>
* Spelling fixes
Signed-off-by: Ken Pruiksma <pruiksma@amazon.com>
* Fixing bug where the roughness min/max value were inverted. Also fixed bug where bad data would show for areas where there was no macro material.
Signed-off-by: Ken Pruiksma <pruiksma@amazon.com>
* Detail material blending WIP. Mostly working, but small seams between each materila id pixel.
Signed-off-by: Ken Pruiksma <pruiksma@amazon.com>
* Switching to using Load() for the detail material IDs and calculating the positions manually since Gather()'s precsion leaves seams along the edges.
Signed-off-by: Ken Pruiksma <pruiksma@amazon.com>
* Updates from PR review
Signed-off-by: Ken Pruiksma <pruiksma@amazon.com>
* Fixing case issues and updating function name due to a recent fix.
Signed-off-by: Ken Pruiksma <pruiksma@amazon.com>
* Switching to using SampleGrad() instead of Sample() for detail textures to fix a bug where the incorrect mip level was chosen around the seams of the detail material id texture.
Signed-off-by: Ken Pruiksma <pruiksma@amazon.com>
* Remove unneeded sampler and some debug settings in the shader. Condensing some duplicate code
Signed-off-by: Ken Pruiksma <pruiksma@amazon.com>
* Updates from PR review and some minor improvements
Signed-off-by: Ken Pruiksma <pruiksma@amazon.com>
* Updated with PR feedback. Fixed a fairly significant bug with blending. Also contains a few minor fixes, simplifications, and comments for clarity.
Signed-off-by: Ken Pruiksma <pruiksma@amazon.com>
* Update weight adjustment equation to trust the compiler less
Signed-off-by: Ken Pruiksma <pruiksma@amazon.com>
* fix bug
Signed-off-by: Ken Pruiksma <pruiksma@amazon.com>
* Fixing bug in terrain normal factor. Adjusting normal calculation to avoid the need for an identity transform.
Signed-off-by: Ken Pruiksma <pruiksma@amazon.com>
* Removing unused fields from the material SRG. Adding basecolor back in in the material type. Updating the default terrain material to not use fields that no longer exist.
Signed-off-by: Ken Pruiksma <pruiksma@amazon.com>
* Unify resource mapping json schema across cpp and python usage
Signed-off-by: onecent1101 <liug@amazon.com>
* Update based on feedback
Signed-off-by: onecent1101 <liug@amazon.com>
* Add empty line at end of file
Signed-off-by: onecent1101 <liug@amazon.com>
AZStd::fixed_vector had all its functions marked with constexpr, but this requires all member variables to be fully initialized. This meant that the internal array used to store elements always has to be fully initialized. This was done for trivial classes but not for non-trivial classes. As a result trivial classes always did a memset (or more optimized versions for smaller buffers) while the non-trivial version couldn't actually be stored in a constexpr variable. Since AZStd::fixed_vector is meant to be dynamic the choice was made to remove the constexpr from all non-static member functions in favor of avoiding the overhead of memset, which profiling showed was a considerable overhead depending on the reserved size. If a truly constexpr array is needed than AZStd::array is a better choice as that's designed to not by dynamic.
Signed-off-by: AMZN-koppersr <82230785+AMZN-koppersr@users.noreply.github.com>
* Removed "chatty" profile markers.
These three markers were making terrain refreshes take ~200% longer in profile builds.
Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>
* Terrain surface data wasn't updating its AABB correctly.
The code was making an invalid assumption that changes to the world bounds would result in an invalid dirtyRegion. It actually gets a valid region encapsulating the old and new bounds. The fix is an additional check to see if the terrain bounds changed.
Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>
* Addressed previous PR feedback that terrainSystem ought to be a local variable in each test.
Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>
* fix for how viewport icons highlight when sticky select is disabled
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* naming - update highlight to accent
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
Dialog stack wasn't deleting the morph target widgets after reinitializing the window which ended up in duplicated morph targets
Signed-off-by: Benjamin Jillich <jillich@amazon.com>
* Fix retry of failures from catch block
Signed-off-by: Shirang Jia <shiranj@amazon.com>
* Make the build unstable when AP load fails
Signed-off-by: Shirang Jia <shiranj@amazon.com>
* Remove test codes
Signed-off-by: Shirang Jia <shiranj@amazon.com>
* Reading 3rdparty from manifest if it exists, removnig the need to pass it across the board, updated jenkins paths so 3rdparty is put into the workspace
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
* Removes unneded space
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
* Changes how we get the NDK folder
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
* needs delayed expansion
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
* Ninja is in the path, is not needed for Android
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>