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

Addative Blend

Started by AmidaBucu Dec 29, 2008 at 8:38 AM 1 replies 600+ views
Original Post
AmidaBucu
AmidaBucu
Hi there! I want to draw into a texture multiple times. So i have to use alpha blend in the shader technique definition:

AlphaBlendEnable=true;
SrcBlend=srcalpha;
DestBlend=invsrcColor;

It works, but I don't want blending works in that way. If I write that instead of the code above:

SrcBlend=1;
DestBlend=1;


Everything has become black :( I want the pixel colors to be added to each others, not to be blended.
KodeNerd
KodeNerd
Needing more information. Language? Library/engine?
------------George Gough
swiftcoder
swiftcoder
If we are talking about OpenGL-style blending, the equation used is: src*src_factor + dst*dst_factor

Therefore to obtain solely additive blending, one must set src_factor and dst_factor both to GL_ONE.
Tristam MacDonald. Ex-BigTech Software Engineer.ย Future farmer. [https://trist.am]

Topic Locked

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

Sign in to reply to this topic.