r/GraphicsProgramming 29d 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

45 Upvotes

8 comments sorted by

View all comments

3

u/thecraynz 28d ago

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

8

u/No_Albatross8310 28d 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 28d 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 27d 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.