Oliver Cooper
Oliver Cooper

Reputation: 845

Global OpenGL Texture

I want to have a global gradient that goes all the way across the window but it only appears in certain objects with OpenGL. It's a bit like using a 'Clipping Mask' in Photoshop, here is an example on what I am trying to achieve.

(by the way I am doing this with LWJGL in Java, but that shouldn't affect to much.)

Image example

Upvotes: 1

Views: 151

Answers (1)

Kos
Kos

Reputation: 72261

Have the texture coordinates aligned with the screen coordinates of your objects. That will cause the texture to be mapped as you want to.

Upvotes: 2

Related Questions