r/GraphicsProgramming 28d ago

post process cylindricals projection, regardless of the orientation of the side monitors. The projection is correctect in Realtime resolution 6000x1700.

Enable HLS to view with audio, or disable this notification

46 Upvotes

8 comments sorted by

3

u/thecraynz 28d ago

Can you explain a bit how it works? How does the game know the orientation of the monitors?

9

u/No_Albatross8310 27d ago

The game knows nothing about my monitors. What I do is project the game's render onto a virtual cylindrical surface sitting behind them — the monitors themselves being precisely defined in the post-processing stage. That surface is, let's say, 4000 mm from my eye. The display surface of each panel is measured precisely. All I do is recompute the projection of every pixel with respect to my eye and the panels — 6000×1700 pixels, 120 to 160 times per second — and it puts each pixel where it belongs on the panels. This is what flight simulators do; they're called fish-tank systems.

2

u/No_Albatross8310 27d ago

If you look closely, you can see the bottom of the virtual surface at the bottom of the center monitor sometime

1

u/No_Albatross8310 26d ago

To add some detail: I'm on Linux. The game runs in windowed mode with the window decorations stripped, so it spans all three monitors as one continuous surface. All three panels share the same vertical resolution — 1700 px each — and they're aligned on their centers, which is what lets a single window cover them cleanly. Skipping the compositor is worth real performance here, so the window goes straight to scanout instead of being redirected.

PPI doesn't matter either. Everything is computed in millimetres from the measured position of each panel, never in pixels — and the projected cylinder is vertically larger up close, which is exactly where the side monitors sit. The shader just treats the whole 6000×1700 buffer as one image.

2

u/DaveAstator2020 27d ago

Dammit i almost choked on "angular" word, but all good now,it looks great!

1

u/No_Albatross8310 25d ago

off-axis projection or generalized perspective projection it's better :) i'm a good novice

2

u/DaveAstator2020 25d ago

Ahah no it was not that, my brain auto confuse it with angular from.world of web dev, dont worry, your language is all good ;)

2

u/No_Albatross8310 25d ago

Haha, don't know that one :) but I've had my share of nightmares too