PDA

View Full Version : Intensity problem with multi-texturing



pleopard
05-31-2002, 11:29 AM
I have encountered an intensity problem when using multi-texturing (glMultitextureARB) on a GF3 card and I hope someone here can offer some good advice on fixing it. I created a simple application to display a textured quad and wrapped the quad and its rendering modes up in a class. The rendering modes are SinglePass, MultiPass, and MultiTexture ... go figure what they do ...

The problem is that the multi-pass version shows up exactly like I wish while the multi-textured version does not. I have documented this problem in detail at the following URL. You can see snapshots of the three versions and download the project, source code, textures, and DLLs a this link if you are really interested in helping.

Any advice on how to brighten up the multi-textured version procedurally (no doctoring of the lightmap image) would be greatly appreciated.

Thanks in advance...
Paul
http://www.magnacom-inc.com/pleopard/Dev/MultiTexP1/Default.htm

j
05-31-2002, 09:05 PM
For your multipass version, the blending functions you have chosen work out to an equation of 2 * texture0 * texture1. The multitexture version is simply texture0 * texture1. To make them look the same, you can either choose a blending function for the multipass version that's equivalent to texture0 * texture1, or you could modify the multitexture version.

Changing the multipass version would be simpler - a blending function of glBlendFunc(GL_DST_COLOR, GL_ZERO) should work. Or you should be able to use the EXT_texture_env_combine or ARB_texture_env_combine extensions to create a blending function of 2 * texture0 * texture1 in your multitextured version.

j

pleopard
06-01-2002, 11:28 AM
My goal is more to make the multi-textured version appear as bright as the multipass version so changing the blending function of the multipass version isn't what I need. I will read up on the ARB_texture_env_combine extension and see if I can figure out how to do this. Thanks for the help.

pleopard
06-02-2002, 10:03 AM
Excellent, Excellent, thank you very much sir ...

This was the trick I needed ...

glActiveTextureARB(GL_TEXTURE1_ARB);
glBindTexture(GL_TEXTURE_2D,m_SecondaryTextureID);
glTexEnvi(GL_TEXTURE_ENV, GL_RGB_SCALE_ARB, 2);
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_ARB);