#### Archived

This topic is now archived and is closed to further replies.

# Texture-blending operations.

This topic is 5857 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hi there, Are there any intuitive explanations for what the different texture-blending operations do? For example, what is the difference between using D3DTOP_MODULATE & D3DTOP_ADD? The first of these multiplies the two arguments together whilst the second just adds them but do these operations have a higher level, graphics specific meaning? Cheers, BD.

##### Share on other sites
quote:
them but do these operations have a higher level, graphics specific meaning?

Not really. Just think of anything in the colour channel as (conceptually) being like a 3D vector with components (r,g,b aka x,y,z) which range from 0 to 1 and get clamped after any operation (1+1=1, 0-1=0). The alpha channel is the same except its a scalar.

What might be thought of as higher level meanings is seeing the operations as just maths operators in an equation - that''s how you find interesting ways to reorganise operations to make more effective use of blend operations you have available and how things like DOT3 bump mapping starts to make sense.

The best way to learn this stuff is to use something which lets you play around with the blends such as ATIs Multex, nVidias BlendView or the tool in the DX SDK. Also get used to writing out any operations you want on a pixel as an equation:

OUTrgb = (TEXTURErgb * DIFFUSErgb) + ENVMAPrgb

[* above is a componentwise vector multiply]

Using simple maths rules such as commutativity and bracket precedence etc you can reorganise stuff easily.

--
Simon O''Connor
Creative Asylum Ltd
www.creative-asylum.com

##### Share on other sites
I don''t have the book with me, but the Focus on: 2D in Direct3D covers everyone in good detail. Just thought you should know.

Much greatness is achieved thru perseverance and faith.

##### Share on other sites
Thanks for the replies.

That book ''Focus On 2D in Direct3D'' looks quite comprehensive.

Pity I vowed to stop buying big expensive computer books.

BD.

##### Share on other sites
O.K. I tried running Nvidia's Blend View and it just quits and shows a message box which says...

DirectX Error: Can't create DDraw during enumeration!.
Error: DDERR_CANTCREATEDC

Apparently this program is for DirectX7. I tried installing this but it said I didn't need to because its earlier than the version already installed.

Any ideas? This program looks super cool.

BD.

[edited by - Barn Door on November 4, 2002 9:01:14 PM]

##### Share on other sites
The version of BlendView I have didn''t come with an installer IIRC. Though it may be an ancient one (v0.90). Although it is from the DX7 days, most of the fixed function pixel blending pipe hasn''t changed in newer versions.

Just tried it on my work machine (P4, Win2k, GeForce2 Ultra, DirectX 8.1) and it worked fine.

It''s probably worth contacting one of the nVidia devrel people (Doug, Cem etc) - they''re usually quite helpful with things like this.

--
Simon O''Connor
Creative Asylum Ltd
www.creative-asylum.com

1. 1
Rutin
41
2. 2
3. 3
4. 4
5. 5

• 16
• 18
• 12
• 14
• 9
• ### Forum Statistics

• Total Topics
633362
• Total Posts
3011527
• ### Who's Online (See full list)

There are no registered users currently online

×