* 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>
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>
* ATOM-16747 RPISystemInterface::GetDefaultScene returns the scene created by PreviewRenderer but not the Main Scene
Deprecate GetDefaultScene() function.
Update all the places which use GetDefaultScene to use Scene::GetFeatureProcessorFromEntityId or GetMainScene.
Tested with Editor, UI Editor, Material Editor, game launcher.
Signed-off-by: Qing Tao <55564570+VickyAtAZ@users.noreply.github.com>
* Atom Timer fix - changed milliseconds to seconds
- Tested on both fog and EyeAdaptation animations - both are the only affected and were broken before
- This is a small fix for pull #3969 that replaced the timer mechanism: https://github.com/o3de/o3de/pull/3969
Signed-off-by: Adi-Amazon <barlev@amazon.com>
* Atom Timer fix - using seconds to begin with and removing obsolete variable
Signed-off-by: Adi-Amazon <barlev@amazon.com>
The timestamp was simply converted from GetTimeAtCurrentTick to a float. Since this value is backed by QueryPerformanceCounter which is 0 at boot, you could see broken animations on the GPU when your system has been on for a long time. So I simplified the RPI's time API (removed unused code), and subtracted the application start time each frame before converting the time value to a float.
Also moved FindShaderInputConstantIndex("m_time") to be called only once, instead of every frame.
Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
- Added new interface type AZ::Debug::Profiler to externally register profiler systems
- Modified the Atom CPU profiler to register as an AzCore profiler
-- This allows full engine markers to be visualized in the associated ImGui tool
- Converted all AZ_ATOM_PROFILE_* macros to use AZ_PROFILE_* macros instead
Signed-off-by: AMZN-ScottR 24445312+AMZN-ScottR@users.noreply.github.com
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>
* ATOM-16237 Using setting registry to RPI system settings
Changes include:
- Remove RHISystemDesriptor since the pre-registered draw list tag is not needed.
- Remove EitorContext which was for system component settings.
- Add atom_rpi.setreg file
- Add getting RPISystemDescriptor from setting registry.
Signed-off-by: qingtao <qingtao@amazon.com>
NOTE: The memory driller is still intact for now to avoid needing to
modify allocators, but the frame/cpu portions of driller and the
standalone executable are now gone.
Signed-off-by: Jeremy Ong <jcong@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>
* 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>
- Added a pause button in imgui cpu profiler.
- Added a capture button to save cpu profiling data to a data file.
- Added some profile marks in both RPI and RHI.
ATOM-15728 Shader Hot Reload Fails in Debug Build
The main change was to add OnAssetReady handlers to each of the asset classes. See comments in ShaderAsset::OnAssetReady for a detailed explanation. In short, OnAssetReloaded gets missed while assets are being reloaded at the same time on multiple threads, but OnAssetReady is always called whenever connecting to the AssetBus because of its AssetConnectionPolicy.
The above change required the addition of a new AssetInitBus to call the PostLoadInit() functions. Because OnAssetReady connects to buses that are not mutex-protected, they have to be connected on the main thread. AssetInitBus::PostLoadInit is called every frame in RPISystem::SimulationTick. All Atom's asset handlers that need to do post-load initialization must connect to the AssetInitBus, and the asset will disconnect itself after initialization is complete.
We also need the Shader class to handle OnShaderAssetReinitialized to properly handle the shader reload.
With these changes I can click back and forth between "Blending On" and "Blending Off" many times (like 20 times) without issue.
* [ATOM-15472] Shader Build Pipeline: Remove Deprecated Files And Functions That
Predate The Shader Supervariants
These are the essential impactful changes as a result of deprecating the
ShaderResourceGroupAsset.
* Addressed feedback by @moudgils. Better comments in header files.
* More updates related with deprecation of ShaderResourceGroupAsset
* Deleted the temporary version 2 classes.
* Updated version of the shader asset builders.
* Updated version of all the shader related classes impacted
by the Supervariant concept and deprecation of ShaderResourceGroupAsset
* Changes to *.pass and DGI, Reflections and RayTracing.
* changes to material related assets
* changes to core lights
* Changes to auxgeom/dynamic draw.
* changes to decals, lyshine, imguipass
* changes to RPI Pass classes
* Shader for SceneSrg, ViewSrg and ForwardPass Srgs.
* changes to mesh, skinned mesh, Morphtarget.
* Fixes to RayTracingPass.cpp & now allow empty srg in shaders.
* Updated Atom_RPI.Tests
* Simplified InstanceDatabase by removing AddHandler
------------------------------------------------------------------------------------
* Updated DiffuseGI precompiled shaders.
Added RayTracingSceneSrg and RayTracingMaterialSrg shader asset.
Updated ShaderAssetCreator::Clone to handle the supervariant when processing root variants.
Co-authored-by: Doug McDiarmid <dmcdiar@amazon.com>
------------------------------------------------------------------------------------
* Changed semantics for some PassSrg to SRG_PerPass_WithFallback.
AuxGeom/FixedShapeProcessor.cpp requires SRG_PerDraw on ObjectSrg.
Removed names of SceneSrg and ViewSrg from RPISystemDescriptor.cpp
* Moved ShaderLib/Atom/Features/DummyEntryFunctions.azsli
To Gems/Atom/RPI/Assets/ShaderLib/Atom/RPI/DummyEntryFunctions.azsli
Removed redundant checking for finalization in
ShaderResourceGroupLayout.cpp
* Fixed race condition bug for Shader::FindOrCreate.
InstanceDatabase<>::CreateInstance() needs to be atomic
for instance creation and initialization.
Added optional InstanceHandler::CreateFunctionWithParams to accomodate
to the needs of Instances that need more than an asset reference
to be able to be created an initialzed.
Removed ShaderResourceGroup::FindOrCreate() only ::Create is available
now.
* Renamed scene_and_view_srgs.* as SceneAndViewSrgs.*
Changed GetAzslFileOfOrigin for GetUniqueId
* Fixed unit tests.
* Reverted the serialization name of m_uniqueId back to
"m_azslFileOfOrigin" so precompiled shaders don't fail
in layout comparison.
* Fixed AtomCore.Tests
Removed non-applicable test. InstanceDatabase.AddHandler() is not
available anymore.
* The Null rhi is re-enabled for shader compilation.
Signed-off-by: garrieta <garrieta@amazon.com>
* ATOM-4661 Improvement with pass templates registration from data
- Update PassLibrary so it can load pass templates from more than one files and report duplicate pass templates.
- Added load templates events to pass system so the handlers from any gems can load their own pass templates.
- Added PassSystemInterface::OnReadyLoadTemplatesEvent::Handler in FeatureCommon gem's CommonSystemeComponet to load the PassTemplates.azasset in featureCommon gem.
- Misc: moved BindlessPrototypeSrg.asli from RPI to ASV project; fixed an assert issue when exit ASV
* Atom/qingtao/lyn 3436 (#558)
* LYN-3436 AutomatedTesting.GameLauncher crashes at launch if assets are not all processed
Change RPISystem so that the application would exit if the RPI system couldn't load critical assets.
Added code to avoid the GetLayout crash when layout for each platforms were not ready.
Added LoadCriticalAsset function to force compile and load critical assets.
Added default value to viewport size for ViewportContext.
* Change RPISystem asset initialization order so it returns earlier when those critical assets are not ready