Skip to main content
gamedev.net
🔒 Locked

Blending...

Started by darkbyte 0 replies 250+ views
Original Post
darkbyte
darkbyte
Hello there I''ve followed NeHe''s tutorial about blending and everything is ok but I still don''t understand how the blending equation works and it''s pretty annoying that I cannot understand how to create different effects!... could someone give me just ONE example using the equation: RsSr+RdDr, GsSg+GdDg, BsSb+BdDb, AsSa+AdDa Thanks in advance, Joel.
_DarkWIng_
_DarkWIng_
void glBlendFunc( GLenum sfactor, GLenum dfactor )

final_color = sfactor * your_curent_color + dfactor * color_in_buffer

eg: you have drawn blue(0,0,1) background and are now blending red(1,0,0) quad over it with (one,one) blending

1 * (1,0,0) + 1 * (0,0,1) = (1,0,1)




You should never let your fears become the boundaries of your dreams.
You should never let your fears become the boundaries of your dreams.

Topic Locked

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

Sign in to reply to this topic.