Sign in to follow this  

Sprites: Quad verses Over-sized Tri

This topic is 4274 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

So, I was thinking one day and realized that we are using two triangles (a quad) to render a flat surface. Why wouldn't we just use one oversized triangle? Example: Is it harder for the GPU to render 2 triangles, or one triangle thats 1.5 times the size of the combined area of the 2 triangles...

Share this post


Link to post
Share on other sites
How do you expect to not draw the other parts of the triangle? Any solution would likely require much more processing power than just drawing two triangles.

Also, point sprites offer a much better option for these cases.

Share this post


Link to post
Share on other sites
I think you'll find that with any kind of 2d work you'll be much more limited by fill rate than geometry thoughput (so the triangle method would be a bad idea).

Don't take my word for it though, benchmark it. [grin]

Share this post


Link to post
Share on other sites
You'd need to enable Alpha Testing, as a minimum. This would have an impact on all pixels' render speed.

Also, I remember reading somewhere that only CLAMP, MIRROR, and WRAP actually work in full speed, and that the other types suffer some speed impact.

As a final note, micro-optimization is tha evil.

Quote:
Original post by OrangyTang
I think you'll find that with any kind of 2d work you'll be much more limited by fill rate than geometry thoughput (so the triangle method would be a bad idea).

Don't take my word for it though, benchmark it. [grin]

I think this would highly depend on how big the sections you draw are. If you need to draw in 2x2 pixel areas, you probably won't be fill-rate limited.

Share this post


Link to post
Share on other sites

This topic is 4274 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.

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