How to implement this?

Hi
I need to code such thing: there is a wide ribbon that moves top-down, there is an interactive background under it. I’d like that there where a horizontal stripe in the top and bottom of the screen, where thar ribbon would be invisible, so I could see background.
Damn, sounds rough :slight_smile: Can’t find words to describe it ;]

Intriguing! But I must confess that I don’t fully understand what you’re attempting. Is there something you can compare it to, that’s similar to your situation? :slight_smile:

All I can think of is some sort of alpha-blending thing, or something.

Do it all in a 2D orthogonal view, use some depth and some blending: draw the background first, then your ribbon (supposedly textured) and finally your stripes.

Hope that helps.

First draw your background. Then you can use the scissor test to define a rectangle where the drawing should happen, outside the rectangle nothing will be drawn.

This way you can “cut” your ribbon (whatever that is :wink: ) so that in the top and bottom part of the screen you still see the background. If you need more complex shapes than a screen space rectangle, you should use the stencil test.

I’m not sure I correctly understood what you’re trying to do :rolleyes:

Scissor! Of course.
That will do fine.
Thanks a lot!
With best regards. Daniel.