9
\$\begingroup\$

I'm trying to implement the Voronoi Splitscreen effect that Squirrel Eiserloh described at GDC 2016, and I'm having trouble figuring out how to 'clip' the rendered scene for one player along a diagonal line or polygonal shape.

Screenshot from the GDC talk, illustrating the polygonal split screen view

So how can I draw the scene inside set of points or a shape other than rectangle?

\$\endgroup\$
2
  • 1
    \$\begingroup\$ I'm also interested in this topic. I haven't yet tracked down a full answer, though you may be interested in the paper Fair Voronoi Split-Screen for N-Player Games and this implementation on shadertoy.com. \$\endgroup\$
    – HanClinto
    Dec 29 '19 at 22:29
  • \$\begingroup\$ Have you looked into stencil shaders? \$\endgroup\$
    – Adam B
    Feb 10 '20 at 20:12
1
\$\begingroup\$

The best way I found to do this is to draw each view to a surface, and cover the area of the surface that isn't the view with a black polygon. Then draw all your view surfaces additively to an otherwise black view port. It's not cheap, but it works well enough. It comes with the added advantage that decorating the borders or moving and rotating the split at runtime is trivial, as is smoothly unsplitting/resplitting the view.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.