I am making a 2D game using OpenGL ES 2.0 (libgdx), where the world will wrap-around itself on Y-axis.

Apart from implementing the "modulo" method in my rendering code, I'm wondering whether it's possible to render such a world using only shaders?

How would I go about handling the edge case in GLSL?

EDIT: Basically, I want to move this part of the code to the GPU, if possible.

| improve this question | | | | |
  • 2
    \$\begingroup\$ Have you seen this question? It's for 3D, but the principle is the same. \$\endgroup\$ – MichaelHouse Oct 26 '13 at 15:21

Your Answer

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

Browse other questions tagged or ask your own question.