Alpha Masking in TGB
by Jan Napitupulu · in Torque Game Builder · 09/28/2010 (10:39 am) · 3 replies
Hi there,
i know this topic has been discussed several times within the forum, but unfortunately I couldn't find anything suitable for my problem, which is:
I have two textures (of same size). One has a solid texture (with no alpha) and the other one defines a certain shape (e.g. a circle) by a solid color (with alpha outside of the shape). I want to merge the two texures so that the shape has the texture on it and outside of the shape becomes transparent.
I know that there is no native support for alpha masking in TGB, so how can I handle this issue? I have the TGB Pro license, so I have access to the source. After a little bit of research, OpenGL multitexturing appears to be the solution for my problem, but in a lack of OpenGL experience I have no clue where to step into the source to make the changes needed.
Can anybody give me some hints, tutorials or even better, some code snippets where and how to start?
i know this topic has been discussed several times within the forum, but unfortunately I couldn't find anything suitable for my problem, which is:
I have two textures (of same size). One has a solid texture (with no alpha) and the other one defines a certain shape (e.g. a circle) by a solid color (with alpha outside of the shape). I want to merge the two texures so that the shape has the texture on it and outside of the shape becomes transparent.
I know that there is no native support for alpha masking in TGB, so how can I handle this issue? I have the TGB Pro license, so I have access to the source. After a little bit of research, OpenGL multitexturing appears to be the solution for my problem, but in a lack of OpenGL experience I have no clue where to step into the source to make the changes needed.
Can anybody give me some hints, tutorials or even better, some code snippets where and how to start?
Associate William Lee Sims
Machine Code Games