Jump to content
  • Advertisement
Sign in to follow this  

2D question, and DirectX 10 point sprites

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

If you intended to correct an error in the post then please contact us.

Recommended Posts

I found that in DirectX 9 if you use an already transformed vertice that no other transformations matter, ie. projection, world, view. At the moment I have all my vertices software processed into the correct position and size for any resolution. What I am wondering is how I can use those transformations to hardware process my vertices? And... Does DirectX 10 do rotations for point sprites?

Share this post


Link to post
Share on other sites
Advertisement
I'm not sure what you mean in the first paragraph. Are you trying to create a particle system? Doing a 2D game? In the general 3D context it just doesn't make sense. If you're doing a lot of transformation of the same simple geometry, you might want to look at instancing (check out http://www.humus.ca/index.php?page=3D&ID=52, for example).

As for DX10, it doesn't have point sprites. You can implement them using geometry shaders, and you'd then be able to rotate them to your heart's content.

Share this post


Link to post
Share on other sites
I am working on a 2D game, but I am doing this for each vertice that represents each sprite:

(Just an example)
posX = (float)pos_x*posRatioX;
posY = (float)pos_y*posRatioY;

These position ratios determine the correct location for each vertice of the sprite, but the problem is that I am using the CPU and not the GPU for this. It would be much faster to implement matrices for the GPU to support the same functionality.

As a side note...

I am not looking for instancing as each sprite is unique in location, and I have already implemented texture similarity rendering. Using pretransformed vertices automatically suggests to the GPU to not do anything whatsoever to the vertice during the rendering process.

I was wondering if anyone knew of a way to show 2D images in a sprite like state while being able to use the Projection, View, and World transformations for these sprites.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!