Hello! This is the first time I’m attempting to create a shader of my own.
I want a shader similar to particle/additive, but black regions must remain dark. With addivite they become gray. With multiply, white does nothing and black darkens the color. Thus, I guess the expression I need to implement is this one:
color * texture + color
That way, if the texture is black, I have the original color. It the texture is completely white, I have color * 2 and thus a brigher pixel.
Could someone please help me with this? I guess the code is pretty similar to the particle/additive shader…
Have you tried the additive-multiply shader (at the bottom of the list) and found the effect is not what you want?
Unless I’m doing something wrong (the texture consists on a radial gradient from white (center) to black, with blackness defining also transparency) the additive-multiply shader also makes black pixels gray…
That’s the wrong shader. Try just additive and not additive-multiply. With an additive shader black shouldn’t show up at all.
aNTeNNa trEE: Additive turns black pixels into grey when something is added.
Daniel Brauer: Probable, but in which context? Color is not available per se. Are you talking about a constant color (which would not work) or the texture’s color?