Skip to main content
GameDev.net gamedev.net
๐Ÿ”’ Locked

How does alpha blending work?

Started by ph33r Nov 27, 2003 at 8:43 PM 0 replies 1.4k views
Original Post
ph33r
ph33r
I''m writing my own software renderer currently and I''m stuck on alpha blending. I''m going to start by telling you what I can do, I can render a textured triangle with color modulated vertices. That is I can set the color of each vertex to RGB and it will blend the three vertices and texture beautifully. The formula I use is RGBn = (R1*R2, G1*G2, B1*B2) Though I''m stuck on how alpha blending works, how do I implement it?
ph33r
ph33r
Found the algorithm

For those that are curious

Destination = alpha * Source + (1-alpha) * Source2

Topic Locked

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

Sign in to reply to this topic.