Any D3D experts here? (1 Viewer)

ajp8164

Portal Pro
January 9, 2008
575
1,166
Atlanta, GA
Home Country
United States of America United States of America
Hi all,

I'm looking for some help with D3D in order to implement some new capabilities for MP1 (targeted v1.3). Here's what I need to do:

>>> Render two (or more) primitives of different sizes and at different locations on the screen. All of the primitives rendered need to be blended with a separate diffuse texture in the same texture blend pipeline (using SetTextureStage()). Finally, all of this needs to blend with the background. Here's a diagram of what I mean (I understand that the diffuse image is only blended where it intersects with the primitives; I just drew it bigger to convey the idea).
Code:
               +--------------------+
               |                    |
               |    +----------+    |
               |    |          |<------  primitive 1 (x,y,u,v coordinates)
               |    +----------+    |
               |                    |
               |    +----------+    |
               |    |          |    |
               |    |          |<------  primitive 2 (x,y,u,v coordinates)
               |    |          |    |
               |    +----------+    |
               |                    |<-- diffuse (u,v coordinates only, an overlay, alpha blended with primitives)
               +--------------------+

          All alpha blended with the background

I have no problems doing this with one texture using DrawPrimitiveUP() using vertices and setting texture stages. I don't understand how I can use the set of vertices to DrawPrimitiveUP() to represent more than a single texture (to represent different geometries).

Any help greatly appreciated.
 

Users who are viewing this thread

Top Bottom