Original Post
I've been spending that last few days getting familiar with the multitexture pipelines of OpenGL and DirectX. For what I wanted to try, it seemed OpenGL was able to handle it much easier, and I just want to make sure I'm not making DirectX more complicated than it needs to be (it already is, but still...) What I'm doing is replicating the terrain splatting in this article: http://www.gamedev.net/reference/articles/article2238.asp. I'm not really replicating the entire problem, I just want to get the first result (grass with a dirt pattern on it). All I did was grab the dirt picture, alpha map and grass picture off the page. I want to take the grass and add the dirt to it using the alpha map. I've been successful in both OpenGL and DirectX and got identical results, but look at the differences between the two: OpenGL: Please note that the textures I place at each step are independent of the operations I perform at each step (OpenGL allows you to access any texture in the pipeline at any step). Texture 0: grass. GL_DECAL, pass it on Texture 1: alpha map. Perform GL_INTERPOLATE using alpha map's alpha and the two textures' colors Texture 2: dirt. Modulate with the vertices on the polygon to apply lighting. DirectX: (DirectX is more limited in that you can only access the most recent result and the texture at the current step) Texture 0: grass. Retrieve color value. Ignore alpha. Texture 1: alpha map. Retrieve color value from result and alpha from this texture. Texture 2: dirt texture. Perform a BLENDCURRENTALPHA using the colors from the result and current texture Texture 3: nothing - just a placeholder to allow another operation. Modulate result with polygon's vertices for lighting. Does this look right? Is there an easier way to do this (in fewer steps?). Does DirectX provide a way to access any texture in the pipeline from any step? And yes, I know about the pixel shaders. Why didn't I just use that? Because I'm not there yet! Thanks for any help or insight. [Edited by - Waverider on March 21, 2007 3:44:46 PM]