Skip to content

Light Management and Lag Compensation#330

Merged
freezy merged 58 commits into
masterfrom
fix/various
Oct 17, 2021
Merged

Light Management and Lag Compensation#330
freezy merged 58 commits into
masterfrom
fix/various

Conversation

@freezy
Copy link
Copy Markdown
Owner

@freezy freezy commented Oct 16, 2021

This PR revamps the lamp manager to support GI lights and light groups. It also introduces lag compensation through what we call dynamic wires.

Lamps

Most of the work on lamps is related to GI. We now pull them from PinMAME, and you can set them up correctly in the lamp manager. Still untested are RGB lamps.

t2-gi.mp4

Dynamic Wires

It's best to read the documentation here.

t2-lag2.mp4

The video show the latency from PinMAME that is now by-passed by the dynamic wire.

Patching

I've started porting T2 to VPE. While all changes can be made in the editor, I currently prefer doing them in a patcher script, so I can easily adapt and don't need to deal with a Unity scene for the changelog. For that a few more APIs were added to patcher and the abstraction layers for materials and lights. Also, the T2 patcher is kind of big now. ;)

@freezy freezy self-assigned this Oct 16, 2021
@codecov
Copy link
Copy Markdown

codecov Bot commented Oct 16, 2021

Codecov Report

Merging #330 (fbb0bb0) into master (335c63c) will increase coverage by 0.28%.
The diff coverage is 79.41%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #330      +/-   ##
==========================================
+ Coverage   83.14%   83.43%   +0.28%     
==========================================
  Files         124      125       +1     
  Lines        6718     6736      +18     
==========================================
+ Hits         5586     5620      +34     
+ Misses       1132     1116      -16     
Impacted Files Coverage Δ
VisualPinball.Engine/Math/Color.cs 83.33% <ø> (ø)
VisualPinball.Engine/VPT/Light/Light.cs 58.82% <33.33%> (+5.88%) ⬆️
...Pinball.Engine/Game/Engines/GamelogicEngineLamp.cs 68.75% <68.75%> (+10.41%) ⬆️
...Pinball.Engine/Game/Engines/GamelogicEngineCoil.cs 64.28% <100.00%> (+5.95%) ⬆️
...nball.Engine/Game/Engines/GamelogicEngineSwitch.cs 100.00% <100.00%> (ø)
...Pinball.Engine/Game/Engines/GamelogicEngineWire.cs 100.00% <100.00%> (ø)
VisualPinball.Engine/VPT/Material.cs 92.53% <100.00%> (+12.23%) ⬆️
VisualPinball.Engine/VPT/PbrMaterial.cs 65.15% <100.00%> (+1.08%) ⬆️
...sualPinball.Engine/VPT/Table/TableMeshGenerator.cs 90.90% <100.00%> (ø)
VisualPinball.Engine/VPT/Item.cs 71.42% <0.00%> (-14.29%) ⬇️
... and 4 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d88ed05...fbb0bb0. Read the comment docs.

@freezy freezy merged commit a7bec34 into master Oct 17, 2021
@freezy freezy deleted the fix/various branch October 17, 2021 22:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants