View Full Version : Multitexture Formulas
Hi, I'm trying to blend two textures together using multitexturing. The GL_ADD and GL_MODULATE formulas aren't what I want.
GL_ADD is Cv = Cf + Cs
GL_MODULATE is Cv = Cf*Cs...
Is there a way to get
Cv = Cf + Cs*Z, where Z is some constant? Perhaps by using the GL_ARB_texture_env_combine extension?
11-09-2003, 04:37 PM
Try on this site to download the multitexturing demo. http://myopendemo.hypermart.net/opengl3.htm
thanks, but that sample on that site is just a barebones multitexture sample, which i can already do. also, in that code, he never sets his texture environments (glTextEnv)... so it's only using the defaults (GL_MODULATE). it goes into nothing about how the textures are mixed.
i think i've found what i wanted by searching these forums though :D. an old ATI MulText program that uses the texture_combine extension....
i know you can change the primary colors using glColor3ub b4 your vertices, but how do you change the "Texture Constant Color" in code?
11-10-2003, 08:36 AM
I've found the spec to be a good place to start for info like this.
To answer your latest question, check out the GL_TEXTURE_ENV_COLOR parameter to glTexEnv*.
Hope that helps.
cool, thanks alot yakuza, that helped http://www.opengl.org/discussion_boards/ubb/smile.gif. somehow that constant passed me by when reading the standard. and in in the ATI MulTex program, when it spits out the code, doesn't add that line of code for you.
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.