PDA

View Full Version : multitexture blending (texture environments?)



supagu
09-18-2004, 06:00 PM
im currently working on overhaul of my material texturing code, and was wondering when you set multiple textures for multitexturing, do you set operations for blending with the previous texture? can you even set blending options between textures?

i was looking at one tutorial and he had set no blend operations at all?

jwatte
09-18-2004, 06:56 PM
This probably should go to the beginner's forum.

Under fixed-function fragment processing, you get one TexEnv per texture. If you have later cards, you can also route different textures to different TexEnvs (using "crossbar" functionality).

supagu
09-18-2004, 11:49 PM
i was looking here:

http://tfpsly.planet-d.net/english/3d/multitexturing.html

it has a diagram showing texture units, i thought these were textures were loaded in to.

eg. tu0 = my first texture

but it looks as it its just something to perform some blend with a previous value?

looks like there are:
number of texture + 1 texture units?

jwatte
09-19-2004, 12:38 PM
The specification of texture samplers and texture environments (different things) is on page 152-159 (especially good is the diagram on page 159) of the version 1.4 specification (http://www.opengl.org/documentation/specs/version1.4/glspec14.pdf) .

If you need help parsing the specification language, I suggest you ask in the appropriate forum.

Also, your use of the word "blending" is somewhat confusing, as "blending" is commonly used to describe frame buffer operation, not texture environment operation. (See page 169 of the version 1.4 specification (http://www.opengl.org/documentation/specs/version1.4/glspec14.pdf) .)

Edit: clickable URLs.

supagu
09-21-2004, 03:24 AM
ah, so each texture unit can have its own texture environment which may or may not access other texture units?

so if i wanted to i could say bind 3 textures to units 0, 1 and 2 and give each a different texture environment, eg. i might set up a dot3 bump map evironment on texture unit 0, while on unit 1 might set the environment to simply blend with the other textures, then what would the outcome be?

supagu
09-22-2004, 02:47 AM
hrmm, cant seem to find any tuts/docs on the topic :-/