* ATOM-16489 Add find passes functions for Scene or RenderPipeline in PassSystemInterface
Introduced new PassSystemInterface::ForEachPass() funtion to replace PassSystemInterface::FindPasses(), PassSystemInterface::GetPassesByTemplateName and ParentPass::FindPassByNameRecursive() functions.
Update all the places which were using those three functions.
The new pass finding filter support any combination of pass name, pass template name, pass class type, pass hirechary, owner scene, owner render pipeline.
Update unit tests.
Signed-off-by: Qing Tao <qingtao@amazon.com>
* Implement sync interval and refresh rate API for RenderViewportWidget
Signed-off-by: nvsickle <nvsickle@amazon.com>
* Measure actual frame timings in the viewport info overlay.
Takes the median of the sum of (frame end - frame begin) to provide more a more representative view of when frames begin and end.
Note: Until VSync is internally supported by the event loop, this will produce nearly identical frame timings as the frame will spend as much time as needed synchronously waiting on a vblank.
Signed-off-by: nvsickle <nvsickle@amazon.com>
* Make frame timing per-pipeline, wire up refresh rate info to ViewportContext
Signed-off-by: nvsickle <nvsickle@amazon.com>
* POC: Frame limit pipeline rendering
Signed-off-by: nvsickle <nvsickle@amazon.com>
* Switch Editor tick to every 0ms to allow better tick accumulation behavior
Signed-off-by: nvsickle <nvsickle@amazon.com>
* Move RPISystemComponent to the tick bus, remove tick accumulation logic
Signed-off-by: nvsickle <nvsickle@amazon.com>
* Add `AddToRenderTickAtInterval` to RenderPipeline API
This allows a pipeline to update at a set cadence, instead of rendering every frame or being directly told when to tick.
Signed-off-by: nvsickle <nvsickle@amazon.com>
* Make ViewportContext enforce a target framerate
-Adds GetFpsLimit/SetFpsLimit for actively limiting FPS
-Calculates a render tick interval based on vsync and the vps limit and updates the current pipeline
Signed-off-by: nvsickle <nvsickle@amazon.com>
* Add r_fps_limit and ed_inactive_viewport_fps_limit cvars
Signed-off-by: nvsickle <nvsickle@amazon.com>
* Quick null check from a crash I bumped into
Signed-off-by: nvsickle <nvsickle@amazon.com>
* Fix off-by-one on FPS calculation (shouldn't include the not-yet-rendered frame)
Signed-off-by: nvsickle <nvsickle@amazon.com>
* Clarify frame time begin initialization
Signed-off-by: nvsickle <nvsickle@amazon.com>
* Fix TrackView export.
Signed-off-by: nvsickle <nvsickle@amazon.com>
* Address some reviewer feedback, revert RPISystem API change, fix CPU profiler.
Signed-off-by: nvsickle <nvsickle@amazon.com>
* Add g_simulation_tick_rate
Signed-off-by: nvsickle <nvsickle@amazon.com>
* Address review feedback, make frame limit updates event driven
Signed-off-by: nvsickle <nvsickle@amazon.com>
* Remove timestamp update from ComponentApplication::Tick
Signed-off-by: nvsickle <nvsickle@amazon.com>
* ATOM-15939 Add support to capture attachment for ParentPass
- Moved the attachment read back support to Pass class so it supports both ParentPass and RenderPass.
- Added support to output input or output state of an InputOutput attachment.
- Enabled showing ParentPass attachments in PassTree tool.
Signed-off-by: Tao <qingtao@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>
First version of temporal antialiasing and contrast adaptive sharpening for GA. Works well in most cases but still has a few issues that will need additional time. This is only the passes and shaders with no exposure to the editor. TAA and CAS can be turned on by enabling their respective passes in the pipeline.
All of the code has been previously reviewed in smaller PRs into the taa_staging branch:
aws-lumberyard-dev#29
aws-lumberyard-dev#53
aws-lumberyard-dev#73
aws-lumberyard-dev#79
aws-lumberyard-dev#84
Main issues:
- Bloom doesn't play nice with TAA and seems to greatly amplify any flickering
- AuxGeom jitters with the camera, so TAA doesn't currently work well in editor
- Transparencies don't have correct motion vectors. History rectification keeps this from looking too bad, but could still be improved
- There is still more that could be done to inhibit flickering, usually from specular aliasing
- Motion vectors aren't correct on POM unless PDO is turned on, which can result in some blurring during motion.
- SSAO can contribute to flickering in its default half res configuration. Changing this to full res mitigates the problem.
Squashed merge of the following:
* [ATOM-13987] Initial checkin of Taa pass.
* TAA pass setup WIP. (does not work yet due to pass configuration issues).
* Taa WIP - Camera motion vectors fixed and hooked up. TAA does simple reprojection and rejection based on depth.
* Small update to use lerp and add some comments.
* Fix issue with attachments not being set up on bindings at initialization. Fixing issue with half-pixel offsets in TAA shader
* - Motion vector passes now use the same output with mesh motion vectors overwriting camera motion vectors.
- Taa pass now works with multiple pipelines.
- Cleaned up TAA shader a bit.
* Fixes from PR review.
* Adding check for multiple attachments of the same name with different resources in Pass::ImportAttachments().
* Adding camera jitter with configurable position count. Updated TAA to blend in tonemapped space.
* Fixes from PR review. Fixing camera motion vectors for background (infinite distance)
* Updates to taa shader from PR review
* Adding a rcp input color size.
* Fix comment on PassAttachment::Update()
* Updates for PR review.
* Fixing missing const on the FrameAttachment* in Pass's call to FindAttachment()
* Taa WIP - Adding filtering to both the current pixel and history. Adding rectification based on variance clipping. Adding some basic anti-flickering. Removing rejection based on depth.
* Updates from PR code review. Mostly better commenting and naming.
* Adding contrast adaptive sharpening based on AMD FidelityFX CAS to help with the softness added by TAA.
* Changing to using luminance for sharpening instead of just green. Added some comments.
* Moving Taa's NaN check to a better location. Disabling TAA and sharpening in prep for check in.
* Updates from PR feedback.
- Added pause/resume button to ImGui Profiler to pause/resume profiling
- Added showing pass execution timeline
- Change TimestampResult to include both begin tick and duration tick. Update some function names of TimestampResult.
- Update some functions names in Pass.
- Stop showing accumulated time for ParentPass.
- Fixed a crash issue with ImGuiManager which doesn't have default font.