ATOM-16273 Compiling SceneSRG before updating it can cause a gpu crash
Changes include:
1. Removed Scene::SetShaderResourceGroupCallback() function and clean up code which use this function.
2. Moved SceneTimeSrg.azsli to RPI's DefaultSceneSrg folder and setup the constants in RPI::Scene
3. Add AZ::Event for Scene's update srg event which features and update scene srg at proper place
4. UpdateTransformServcie FP to use PrepareSceneSrg event handler.
5. Clean up shaders and srgs used in project templates.
Signed-off-by: Qing Tao <qingtao@amazon.com>
* Various terrain improvements:
- Height now stored in a R16_unorm to decrease the amount of memory / memory bandwidth needed for the height field
- Many simplifications to the feature processor
- Added a shader to render to the depth pre pass
- Pulled common functionality needed by depth and forward to a common include shader
- Forward shader now outputs to all the expected render targets
- Adjusted the way normals and lighting are being calculated
Signed-off-by: Ken Pruiksma <pruiksma@amazon.com>
* Adding missing shader files. Updated terrain shader to alter the color slightly with height.
Signed-off-by: Ken Pruiksma <pruiksma@amazon.com>
* Removed pixel shader code from terrain depth pass
Signed-off-by: Ken Pruiksma <pruiksma@amazon.com>
* Renamed the depth pass shaders to no longer indicate they include a pixel shader.
Signed-off-by: Ken Pruiksma <pruiksma@amazon.com>
* Removing unneeded code from TerrainCommon.azsli
Signed-off-by: Ken Pruiksma <pruiksma@amazon.com>
* Adjust the sharpness of TAA's Catmull-Rom filter based on local area luminance.
This helps prevent ringing artifacts in high contrast areas. Due to Catmull-Rom's use of negative weights, it's possible to have a very high value neighbor sample with a negative weight completely overwhelm the result leading to a negative output. This change reduces the sharpness of the catmull rom filter in high contrast areas so the negative weights contribute less to the final result.
Signed-off-by: Ken Pruiksma <pruiksma@amazon.com>
* PR review feedback fixes - more comments and updated the way the sharpness equation was written for clarity.
Signed-off-by: Ken Pruiksma <pruiksma@amazon.com>
* Various fixes for AtomStarterGame on ios
- Use low end pipeline on ioos by default for BoootStrapComponent
- Track the need to bind null heap within Argument buffers
- Only bind the null heap if its needed
- Track its usage for Vertex/Fragment stages
- Increase null dummy buffer to 1K to address GPU crash oon thee first frame
Signed-off-by: moudgils <moudgils@amazon.com>
* Moved PlatformLimits to setreg. Removed Device PostInit. Some clean up.
Signed-off-by: jiaweig <jiaweig@amazon.com>
* Move setreg loading the PlatformLimitsDescriptor super class.
Signed-off-by: jiaweig <jiaweig@amazon.com>
* Apply same implementation for fake device used in unit tests
Signed-off-by: jiaweig <jiaweig@amazon.com>
* Add implementation for Null renderer. Swap order for register RHI interface in initialization.
Signed-off-by: jiaweig <jiaweig@amazon.com>
* Move back setreg from PlatfromLimitsDescriptor to Device, due to Linux dependency issue.
Signed-off-by: jiaweig <jiaweig@amazon.com>
* Changed the function to take in RHI backend name
Signed-off-by: jiaweig <jiaweig@amazon.com>
* Fixed log2 shaper equations. Added bspline sampling for lut. Added options for custom log2 or linear lut with custom exposure ranges.
Signed-off-by: Ken Pruiksma <pruiksma@amazon.com>
* Added support for PQ shaper. Added shader option & cvar for lut sampling quality. Fixed issues in the blend lut shader that were causing considerable quality loss. No longer always changing to the log2 1000 nit shaper when blending luts - if the source luts all use the same shaper, keep using that shaper in the blended lut.
Signed-off-by: Ken Pruiksma <pruiksma@amazon.com>
* Fixed an integer -> float
Signed-off-by: Ken Pruiksma <pruiksma@amazon.com>
* Minor PR reveiw updates
Signed-off-by: Ken Pruiksma <pruiksma@amazon.com>
* [ATOm][RHI][Vulkan][Android] - Reorganize float2 data members to float to avoid Android Mali GPUdriver crashes
Signed-off-by: Peng <tonypeng@amazon.com>
* [ATOM][RHI][Vulkan][Android] - Added reason comment for modifying float2 in the shader
Signed-off-by: Peng <tonypeng@amazon.com>
* Re-add support for UI Elements that use Render Targets
* Move LyShine pass request from Atom's MainPipeline.pass to project's
* Make all dynamic draw contexts in LyShine draw to pass directly without the need of draw list tags
* Remove local RPI changes that are no longer needed
* Prevent crash if LyShine gem is enabled but its custom pass hasn't been added to the main render pipeline
* Revert to default UI pass if the LyShine pass has not been added to project's main render pipeline
Signed-off-by: abrmich <abrmich@amazon.com>
* Expose shadow bias to component & feature processors. Shadow bias now works more consistently with various near / far shadow planes and caster positions. Bias now also affects esm shadows which helps eliminate acne in certain situations.
Signed-off-by: Ken Pruiksma <pruiksma@amazon.com>
* Adding jira comment to light configuration serialization version. Improved comment on final adjustment to bias before its sent to the shader.
Signed-off-by: Ken Pruiksma <pruiksma@amazon.com>
* Hooking up bias to behavior context.
Signed-off-by: Ken Pruiksma <pruiksma@amazon.com>
* Enable Shader Compilation support for Linux
* Add azslc package 3P definition for download
* Add AzslcGeader.azsli nad PlatformHeader.hlsli for Linux/Null and Linux/Vulkan (Copy of Android/Vulkan)
* Enable trait PAL_TRAIT_BUILD_ATOM_ASSET_SHADER_SUPPORTED for Linux
* Add platform builder file dependencies
* Updated AZ_TRAIT_ATOM_SHADERBUILDER_AZSLC to use new 3P linux version of azslc
* Add AtomShaderCapabilities.json, PlatformLimits.azasset for Linux (Copy from Android)
* Fix paths/values for Vulkan_Traits_Linux.h
* Enable trait PAL_TRAIT_BUILD_ATOM_ASSET_SHADER_SUPPORTED for Linux
* Enabled AZ_TRAIT_ATOM_VULKAN_LAYER_LUNARG_STD_VALIDATION_SUPPORT for Linux/Vulkan
* Added AzslcHeader.azsli, PlatformHeader.hlsli dependencies for Linux/Null and Linux/Vulkan in the platform builders for windows and mac for consistency
Signed-off-by: spham-amzn <spham@amazon.com>
* Use SampleLevel instead of Sample to sample shadow maps.
This allows shadow code to be used from computer shaders which don't allow Sample. Shadow maps don't have LODs anyways
* Fix some very silly typos
* Switching to Buffer<float> instead of Buffer<float3> in the skinning shader because metal doesn't support float3 buffers
Signed-off-by: amzn-tommy <waltont@amazon.com>
* Adding a comment to LinearSkinningPassSRG pointing out that positions, normals, and bitangents are using float buffers to work on Metal
Signed-off-by: amzn-tommy <waltont@amazon.com>
* ly_test_tools: Add filebeat_client module from o3de-mars.
Slightly modified with default parameters and exceptions in order to act as an individual component.
Signed-off-by: Cynthia Lin <cyntlin@amazon.com>
* scripts: Remove timestamp_aggregator.py to prepare for moving into ASV automated test repository.
Signed-off-by: Cynthia Lin <cyntlin@amazon.com>
* Refactoring the LTC quad and polygon lights to clip the light to the normal hemisphere before applying the LTC matrix. This prevents specular light leaking from behind the surface. Diffuse and specular contribution are now calculated at the same time to avoid clipping the polygon twice. Added a cheaper diffuse integration function that's accurate enough for diffuse. Also added a commented out alternate specular integration for platforms with poor acos() accuracy.
Signed-off-by: Ken Pruiksma <pruiksma@amazon.com>
* PR review feedback - typo and some saturate() protection
Signed-off-by: Ken Pruiksma <pruiksma@amazon.com>
* Making branch more explicit from review feedback.
Signed-off-by: Ken Pruiksma <pruiksma@amazon.com>
* Final update copyright headers to reference license files at the repo root
Signed-off-by: spham <spham@amazon.com>
* Fix copyright validator unit tests to support the stale O3DE header scenario
Signed-off-by: spham <spham@amazon.com>