Skip to main content
GameDev.net gamedev.net
🔒 Locked

alpha with alpha?

Started by RPGman Aug 2, 2001 at 12:57 PM 3 replies 250+ views
Original Post
RPGman
RPGman
Is there any way to use a TGA w/ alpha channel, _AND_ be able to blend it without using sorting?
--------------------------------------------------------------If it sounds like a good idea, do it. It is much harder to get permission than it is to apologize.
CodeSmith
CodeSmith
RPGman, to awnser your question : no. At least in OpenGL the equasion for blending is basicially

Factor1 * SourceColor + Factor2 * DestColor

You prolly already knew that, but since the source/destination colors are dependended on to make the final color... the final color is dependent on those colors AND more specifically what order they were in... if you rendered back to front, your blending would look correct, and front to back (w depth buffering enabled) you wouldn''t get any transparency at all) It''s kinda complicated but to quickly awnser your question again no. I would reccomend re evaluating what you wanted to do, and then think of how to render them. Alot of transparency is just simple objects such as explosions or smoke, and if you just rendered those in a seperate pass you should be GTG. Ither way I hope it helps!

CodeSmith the Pixel Pusher
www.cs.trinity.edu/~csmith8
CodeSmith the Pixel PusherCodeSmith Webpage
RPGman
RPGman
i figured it wouldnt work, but i was hoping there was some sort of hack or something that someone knew.... anyway, thanks for the info...
--------------------------------------------------------------If it sounds like a good idea, do it. It is much harder to get permission than it is to apologize.
zedzeek
zedzeek
>>Is there any way to use a TGA w/ alpha channel, _AND_ be able to blend it without using sorting?<<

im not to sure what this means? sorting?

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.