Sign in to follow this  

Multiple Textures on One Quad?

Recommended Posts

Hello everybody,


this is my first thread on this site so I'll try to keep it as concise as I can.


What I am trying to accomplish is to render more then texture( or sprite) to the same quad.

I have had limited success in this endeavor most likely due to me being new to DirectX

and Graphics in general.


I have tried making two vertex Buffers( One with smaller vertices) and having a draw call for each buffer to create a

page-flip like effect but the result was a flickering screen.


So then I tried to render a full rectangle over the originel quad while trying to make the image on the second

rectangle transparent to make it seem like their where mulitple sprites on one screen, this too resulted in a failure.



So my final question is what direction or concept should I tackle in order to accomplish mulitple DIFFERENT

textures Or sprites on one quad?


Should I make the image on the second rectangle transparent?


Any help would be appreciated smile.png




Share this post

Link to post
Share on other sites

Hi and welcome to the site!


Are you using shaders or the fixed function pipeline? Which version of DirectX? As a general rule, try to let people which language/library/API/platform you are working with before asking questions so they can help you better. See this sample, it may be what you need.

Share this post

Link to post
Share on other sites

You basically have two choices:

- Have your shader sample from the two different textures and combine them as it sees fit. If the different textures require different texture coordinates, then you'll need two separate texture coordinates in your vertices (i.e. TEXCOORD0, TEXCOORD1). 

- If you can achieve your dual texture effect as an alpha-blending operation (say all you're doing is adding the texture values together), then you can just make two draws of the same quad on top of each other with different textures.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this