bbdf871a13
* 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>