Hello Guest

Author Topic: Clipping a series of sprites to a rectangular area  (Read 3085 times)

GreenflyStudios

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 3
    • View Profile
Clipping a series of sprites to a rectangular area
« on: August 01, 2014, 11:24:21 pm »
Hi all,

Help would be greatly appreciated with this. I have the following (rough) window with a series of sprites running through at the bottom (the train):


What I would like to do is clip the train so that it only appears within the red outlined window. Anything outside of this window is rendered transparent. Is this possible to do? I've looked around and the clipping only seems to apply to a singular sprite, not a series of them nor a rectangular mask of the window/contents.

Any help is greatly appreciated!

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Clipping a series of sprites to a rectangular area
« Reply #1 on: August 02, 2014, 11:01:17 am »
Look at the tk2d UI clipping examples. The UIMask will work fine there (as long as it uses the normal ui shaders).