Commit Graph

25 Commits (08e020f2b169b4577d01a1be0c37b4ccb2b42d4f)

Author SHA1 Message Date
nvsickle bcfe3d3878 Revert "Refresh rate driven rendering tick logic (#3375)"
This reverts commit db63dcbcd9.

Signed-off-by: nvsickle <nvsickle@amazon.com>
4 years ago
Nicholas Van Sickle db63dcbcd9
Refresh rate driven rendering tick logic (#3375)
* 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>
4 years ago
Steve Pham 38261d0800
Shorten copyright headers by splitting into 2 lines (#2213)
* Updated all copyright headers to split the longer original copyright line into 2 shorter lines

Signed-off-by: Steve Pham <spham@amazon.com>
4 years ago
nvsickle 21dbe8b48f Address review feedback
Signed-off-by: nvsickle <nvsickle@amazon.com>
5 years ago
nvsickle dd20a598b2 Add DPI scaling to IMGUI
Signed-off-by: nvsickle <nvsickle@amazon.com>
5 years ago
nvsickle 6b76eceb1f Add GetDpiScaleFactor to native window API
-This includes implementations of the API for the Editor and Windows, all other platforms will have a 1.0 scale for now

Signed-off-by: nvsickle <nvsickle@amazon.com>
5 years ago
Steve Pham b4a2edec6a
Final update copyright headers to reference license files at the repo root (#1693)
* 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>
5 years ago
Steve Pham 70042fcdcd
O3DE Copyright Updates for Linux Foundation (#1504) 5 years ago
Nicholas Van Sickle d1863c6c5b
Restore Editor viewport icon rendering (#879)
This introduces an EditorViewportIconDisplayInterface that will eventually be used to outright remove CIconManager, it provides a simple interface for loading 2D image assets and rendering them on-screen. It also introduces AtomBridge::PerViewportDynamicDraw for getting a dynamic draw instance on a per-viewport basis
5 years ago
nvsickle 559798251d Merge remote-tracking branch 'upstream/main' into nvsickle/DebugInfoDisplay 5 years ago
Tom Hulton-Harrop f9fb61cc5d
Fix issue with viewport interaction ordering and viewport matrix changed handler (#695)
* fix for ctrl+mouse-wheel to cycle transform modes in the viewport

* ensure correct callback function is invoked

* remove redundant check in CameraInput
5 years ago
Tom Hulton-Harrop b5e5a3bfee
More camera fixes for the new CameraInput system (#667)
* use new ViewportContext interface to set camera transform on load

* WIP fixes for camera viewport handler callbacks

* disable synchonization with old camera when new camera system is enabled

* further updates to camera-input

* ensure event is signalled when camera transform is set

* updates to ModernViewportCameraController

* fix for right click menu appearing with camera

* updates following review feedback

* convert std:: usage to AZStd::
5 years ago
Vicky 01b2798fe1
Integrate from 1.0 to main: LYN-3436 AutomatedTesting.GameLauncher crashes at launch if assets are not all processed (#612)
* 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
5 years ago
nvsickle dca2294b36 Move GetCameraTransform into RPI::View. 5 years ago
mbalfour 251929d071 Two misc bugfixes:
1) RayTracing will sometimes crash by dereferencing a null ptr.  This guards against it.
2) ViewportContext was missing some BusConnect / BusDisconnect calls.
5 years ago
nvsickle 12468fd81a Fix spacing from merge 5 years ago
nvsickle 9e6244dc99 Fix game mode camera components not working in-Editor
Ensures RPI::View updates always make it back to the ViewportContext, even if you talk directly to the View
5 years ago
rgba16f 0bf7c29506 Fix GameLauncher Imgui DebugConsole so that it renders 5 years ago
nvsickle ba5e0170a2 Fix ImGui rendering in-Editor
-Ensure ViewportContext rendertick notifications always fire
-Use viewport size to determine ImGui resolution, ensure OnViewportSizeChanged is always up-to-date for the default viewport context
5 years ago
Alex Peterson 921eb742d4
Merge branch 'main' into github/staging 5 years ago
nvsickle 1dabb39b98 Migrate fixes from CodeCommit branch 5 years ago
alexpete 1044dc3da1 Integrating github/staging through commit ab87ed9 5 years ago
alexpete c2cbd430fe Integrating up through commit 90f050496 5 years ago
alexpete 75dc720198 Integrating latest 47acbe8 5 years ago
alexpete a10351f38d Initial commit 5 years ago