2D question, and DirectX 10 point sprites

Started by
1 comment, last by BEHOLDER192875 17 years, 2 months ago
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?
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.
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.

This topic is closed to new replies.

Advertisement