12:04 PM - 02/27/2001 by
Thomas Pabst

Above you see a typical example for EMBM.
Here's a list of the rather simple texture blending instructions:
| Texture Blending Instruction | Parameters | Explanation |
|---|---|---|
| add | dest, src1, src2 | dest = src1 + sr2 |
| sub | dest, src1, src2 | dest = src1 - src2 |
| dp3 | dest, src1, src2 | dest = ( src1.x * src2.x + src1.y * src2.y ...) |
| lrp | dest, factor, src1, src2 | dest = (factor)src1 + ( 1-factor)src2 |
| mul | dest, src0, src1 | dest = src0 * src1 |
| mad | dest, src0, src1, src2 | dest = ( src0 + src1 * src2 ) |
| mov | dest, src | dest = src |
| cnd | dest, r0.a, src1, src2 | if ( r0.a > 0.5 ) { dest = src1; } else { dest = src2; } |
The pixel shader supports argument and instruction modifiers as well, to make life easier for programmers:
| Modifier | Explanation |
|---|---|
| r0.a | Alpha Replicate |
| 1 - r0 | Invert |
| -r0 | Negate |
| r0_bias | Bias - subtract 0.5 |
| r1+bx2 | Signed Scale - 2 * ( x - 0.5f ) |
| _x2 | double result |
| _x4 | quadruple result |
| _d2 | halve result |
| _sat | clamp < 0 to 0 and < 1 to 1 |
So far about the dry theory of pixel shader programming. Let's get to something more interesting.
Topics being discussed on the forums
- Laptop for Multimedia Course, High end 3D Modeling/Rendering [Laptops & Notebooks]
- New setup: will it run Crysis on very high? [Games General]
- Conexant High Definition Audio Win7 Gateway Laptop [CPU & Components]
- New i5 build, stock cooler @ 100% with high temps... [Overclocking]
- High temps with i7 920 not OC [Overclocking]
Questions? Ask Tom's community!
Sponsored links
Related forums topics
- Core i 7 Price on the market US,UKAustralia
- Q9550 v Q6700
- Will HKMG make AMD superior?
- I7 and X58 on newegg.co Just got mine!!!
- Bios Temperature reading
- First CPU OC (n00b) Corrections and questions
- Overclocking E7200
- q6600 overclocked vs qxxxx vs i7
- Heat Sink Orientation - most efficient
- OC e5200
- Motherboard + Memory for overclocking Q6600
- Question abt the Evga 780i Motherboard
- Dell XPS 710 RAM speeds (I know...don't laugh..)
- 4GB in 32-Bit O/S
Best offers
|
Radeon HD 5770 Video Card (1GB,... | $179.99 Newegg.com More info |
|
Radeon HD 4890 Video Card (1GB,... | $189.99 Newegg.com More info |
|
Radeon HD 4890 Cyclone OC Video Card... | $209.99 Directron More info |
|
GeForce 9800 GTX Video Card (512MB,... | $200.00 ServerSupply.com More info |
|
GeForce GTX 260 Video Card (896MB,... | $209.99 Best Buy More info |
Popular Searches
Partners
The Games selection
crazy :
PC Breakdown
What is worst than a Fatal Error occuring during a game you did not save? Unleash your rage at your PC in this game. Blow it to pieces, it feels so...
|
violent :
More Mindless Violence
Basic shooting game, but still so powerful! Use the mouse to take aim and shoot at the little beasties before they get to you. Use Space to reload....
|
Ads





