Offset position of shader stage

Discussion for Level editing, modeling, programming, or any of the other technical aspects of Quake
Post Reply
User avatar
Eraser
Posts: 19177
Joined: Fri Dec 01, 2000 8:00 am

Offset position of shader stage

Post by Eraser »

Is it possible to offset the x and y positions of a stage in a shader? I have a texture with an alpha channel and I want to project a rotating texture underneath it. However, the transparent area isn't centered on the texture, so the rotating texture needs to be offset as well so that the center of rotation is centered on the transparent area instead of the whole texture. Is this possible? I've looked through the shader manual and couldn't quickly find any solution for this.
User avatar
Theftbot
Posts: 483
Joined: Thu Oct 08, 2009 4:03 am

Re: Offset position of shader stage

Post by Theftbot »

tcmod_translate
Post Reply