GL Light and multitexturing

Started by
2 comments, last by Hanibal_smith 21 years, 11 months ago
I''ve written a simple program that does alphablending via ARB_multitexture. It works correctly, but I when i enable light only one texture is corrected (unlighted...) my code looks like : texture0 combine RGB func : modulate sourceRGB 0 : texture operandRGB 0 : src_color combine alpha func : replace sourceAlpha 0 : texture operandAlpha 0 : src_alpha texture1 combine RGB func : interpolate sourceRGB 0 : texture operandRGB 0 : src_color sourceRGB 1 : previous operandRGB 1 : src color sourceRGB 2 : previous operandRGB 2 : src_alpha when i enable light on such a scene only texture0 receive light. How could I make that texture1 receive it too ? (and all this in one pass...)
Advertisement
Maybe didn''t made myself clear ?
want sample code ?
please help, i''m really stuck ! ;P
Make sure the normal is right

×ÓÔ»£ºÑ§¶øʱϰ֮²»Òà˵ºõ
×ÓÔ»£ºÑ§¶øʱϰ֮²»Òà˵ºõ
if it was a problem of normal to the face, texture0 shouldn''t be lighted correctly, but thanks anyway.
Any other suggestions pleaaase ?

This topic is closed to new replies.

Advertisement