Commit Graph

28 Commits (4721ef829835e1d15e413c41cc410ccfa5200ed8)

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
Esteban Papp a35464ca08 more fixes
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
4 years ago
Esteban Papp 90cad016de Gems/Atom
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
4 years ago
pappeste b3e895d10c fixed AtomLyIntegration
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
4 years ago
antonmic d693ee5dd3 merging latest
Signed-off-by: antonmic <56370189+antonmic@users.noreply.github.com>
4 years ago
antonmic 72f808876c Improvements to pass statistics and SRG debugability
Signed-off-by: antonmic <56370189+antonmic@users.noreply.github.com>
4 years ago
Danilo Aimini 512fbbe6b2
Adjust debug text sizing for Vegetation Debugger in viewport. (#2183)
Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.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 0b3dab1cf8 Use DPI scaling for viewport info padding
Signed-off-by: nvsickle <nvsickle@amazon.com>
5 years ago
nvsickle 21dbe8b48f Address review feedback
Signed-off-by: nvsickle <nvsickle@amazon.com>
5 years ago
nvsickle 9e4d6a1d85 Scale the viewport debug info overlay by the DPI scale factor
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
Tom Hulton-Harrop 980da1b56a
Update border padding for viewport debug text (#1514) (LYN-4389) 5 years ago
Qing Tao 81c2bf54d3
ATOM-15842 Update the fps calculation for editor (#1500) 5 years ago
Steve Pham 70042fcdcd
O3DE Copyright Updates for Linux Foundation (#1504) 5 years ago
Nicholas Van Sickle 087677b326
Fix several viewport issues (#1045)
* Fix some FOV calculation viewport issues:
-Avoid calculating FOV if we've got an invalid viewport
-Don't override game mode FOV, let the active camera components manage it instead

* Fix viewport font positioning

This updates code in a few places to respect an API change/fix made to AtomFont - also switched the default value of m_virtual800x600ScreenSize to false as it's really behavior you want to opt into

* Don't activate CameraComponentController when in the Editor / not in game mode
5 years ago
Esteban Papp ff9a052ce6
Merge pull request #1011 from aws-lumberyard-dev/ly-as-sdk/LYN-2948
Integration of the LY as an SDK work
5 years ago
moudgils b80e5c3e1f
Merge pull request #1029 from aws-lumberyard-dev/FixIosApp
Fix ios app
5 years ago
moudgils 2b35ed1d7f Fixes to get monolithic builds working for ios 5 years ago
pappeste 8b9f5230f6 Merge branch 'main' into ly-as-sdk/LYN-2948 5 years ago
Qing Tao 85222130d4
LYN-4007 Editor crashes when entering the Game Mode with two Box Shape entities with Game View enabled (#974)
The crash was caused by using gpu query across command lists.
5 years ago
phistere 3bc5ecd9d9 Fixes a divide by zero in Atom FPS Display 5 years ago
nvsickle 1426052a5f Address a bit more review feedback
-Use aznumeric_cast for enum <-> int casts
-Short circuit logic a bit more nicely
5 years ago
nvsickle a8b29bf603 Remove memory info from the overlay for now (depended on the now-dead CryMemoryManager) 5 years ago
nvsickle 8fd5c30e13 Address some build/review feedback 5 years ago
nvsickle 84216f0479 Add API for ViewportInfoDisplayState, add some minor RHI integration 5 years ago
nvsickle 6fcd5c7817 Restore Viewport debug text
Adds the AtomViewportDisplayInfo Gem which renders debug text to the default viewport context depending on the value of r_DisplayInfo.
The gem is flagged as a dependency of AtomBridge, so all Atom projects will consume it by default.
5 years ago