Sign in to follow this  
soconne

is this type of blending possible ?

Recommended Posts

I have tried using different texture combiner settings to achieve the blending I need but none of them work correctly. What I would like to do is combine the color from a texture with the incoming lighting value and have the following results: light=0 + texture => black light=128 + texture => normal texture light=255 + texture => white Basically if I use GL_ADD_SIGNED then I get what I need except that when light=0 the output color is not black. GL_MODULATE will give me black when light=0 but not white when light=255. Is there a way to get around this WITHOUT using shaders?

Share this post


Link to post
Share on other sites
light=0 + texture => black
light=128 + texture => normal texture
light=255 + texture => white

dont know if its possible

note use (0->1) instead of (0->255) for simplicity
times light that by 2 thus values reside in (0->2)
color = light * texture
thus 0 == black
thus 0.5 == the texture
thus 1 = texture*2(not white)

i suppose if u wanted from 0.5->1.0 == fade from texture->fade then u could do
(light-0.5)*2.0
with various nums
(0.5-0.5)*2.0 = 0.0;
(0.75-0.5)*2.0 = 0.5;
(1.0-0.5)*2.0 = 1.0;
and just add that result to the texture

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this