Multitexture units and lighting
Hey there!
Anybody know if there is any way to apply different
material properties (using glMaterialf() or similar) for different texture units when using multitexturing?
example:
I have 2 textures which are drawn using "GL_TEXTURE0_ARB" & "GL_TEXTURE1_ARB" and I want one to have an ambient of "0,0,0.5" and the other "1, 0.5, 0" for example.
Now is there any way of doing this in one pass?
Thanks
/Fredrik Olsson
I have been waiting for someone more knowledgeable than I but unless you had a card with more than one full pipeline onboard I don''t think so. Materials are not handled in the raster phase so I doubt you get two lighting environments. I could be wrong though but since no one has replied odds are I am right.
The fanatic is incorruptible: if he kills for an idea, he can just as well get himself killed for one; in either case, tyrant or martyr, he is a monster.
--EM Cioran
Opere Citato
The fanatic is incorruptible: if he kills for an idea, he can just as well get himself killed for one; in either case, tyrant or martyr, he is a monster.
--EM Cioran
Opere Citato
It''s not possible. As GKW said, you would need multiple pipelines. The material properties (-> lighting) is applied at a different stage than the texture fragment combining.
use the combineARB extension
if u want the lighting use PRIMARY_COLOR_ARB this can be used on wither textureunit 0 or 1
sorry ignore this post i misread the question
though now i think about it perhaps u could use PRIMARY_COLOR_ARB on one unit and CONSTANT_ARB on the other then again perhaps not perhaps nvcombine4 or definitly register combiners will be able to do what u want
http://members.xoom.com/myBollux
Edited by - zedzeek on September 20, 2001 5:07:28 PM
if u want the lighting use PRIMARY_COLOR_ARB this can be used on wither textureunit 0 or 1
sorry ignore this post i misread the question
though now i think about it perhaps u could use PRIMARY_COLOR_ARB on one unit and CONSTANT_ARB on the other then again perhaps not perhaps nvcombine4 or definitly register combiners will be able to do what u want
http://members.xoom.com/myBollux
Edited by - zedzeek on September 20, 2001 5:07:28 PM
Thanks for your replies!
I have a another question about multitexturing:
If you combine two textures (on an two-textureunits-board)using "GL_MODULATE" or some other operator as argument to "glTexEnv", how do u do this in two single passes?
You could use blend to add textures, but modulate multiplies the colors,,....
I have a another question about multitexturing:
If you combine two textures (on an two-textureunits-board)using "GL_MODULATE" or some other operator as argument to "glTexEnv", how do u do this in two single passes?
You could use blend to add textures, but modulate multiplies the colors,,....
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement