Jump to content
  • Advertisement
Sign in to follow this  
Brad789

OpenGL Texture border performance on some ati cards

This topic is 3051 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'm writing a terrain rendering library that currently uses OpenGL as it's rendering api. I'm testing it on a Radeon x700 and a Radeon HD 4200 integrated chip. When I use texture borders(which eliminates some artifacts between adjacent tiles in the map) the rendering seems to drop into software rendering mode and it runs at < 1 fps. Without the border the program runs at ~150 fps. I use 32 bit RGBA textures that are mipmaped, and linear interpolation between mip maps. I use GL_CLAMP_TO_EDGE for texture wrapping. Is it expected that both these chips don't render well with texture borders? I'm using the latest version of drivers on the x700, and drives that came with the motherboard for the 4200(it's not mine, a friends computer). If these chips don't handle the texture borders well I can make some changes to account for that, I'm just wondering if it's one of my settings that's causing problems. Oh and also I'm using 512x512 textures with and without a texture border, so with a texture border they are 514x514. Thanks for any help

Share this post


Link to post
Share on other sites
Advertisement
Texture border are deprecated, and have been removed from OpenGL 3.x. It is to be expected that the feature is not hardware accelerated anymore on current and future GPUs, even on a GL 2.x compatibility profile. You should drop texture borders in favour of manual texture coordinate adjustments.

Share this post


Link to post
Share on other sites
Quote:
Original post by ncsu121978
non-power of 2 textures will KILL performance on some cards...as you see in your case

This has absolutely nothing to do with the OPs problem. A 514x514 texture including borders is not an NPOT texture. It's a power of two texture with a border, which is a completely different thing.

That said, actual NPOT textures are very well supported on all current GPUs from ATI and NVidia and won't negatively affect performance. For tile based games, rectangle textures are also an option, which offer non-power of two sizes, and are widely supported even on old hardware.

Share this post


Link to post
Share on other sites
Quote:
Original post by Yann L
Texture border are deprecated, and have been removed from OpenGL 3.x. It is to be expected that the feature is not hardware accelerated anymore on current and future GPUs, even on a GL 2.x compatibility profile. You should drop texture borders in favour of manual texture coordinate adjustments.


Deprecated, yes. But previously existing drivers rewritten to remove already hardware accelerated codepaths? I doubt this so I'm surprised at the result. Are you quite literally just commenting out the code setting the border size and changing the texture wrapping? Nothing else is changing in the app?

Share this post


Link to post
Share on other sites
GL3.2 spec, page 339:

Quote:

Appendix E.2 -remove TEXTURE_BORDER_COLOR and CLAMP_TO_BORDER
mode from the deprecated featurelist; they were put in by accident (bug
3750).


Share this post


Link to post
Share on other sites
Quote:
Original post by idinev
GL3.2 spec, page 339:

Quote:

Appendix E.2 -remove TEXTURE_BORDER_COLOR and CLAMP_TO_BORDER
mode from the deprecated featurelist; they were put in by accident (bug
3750).

Hmm, they seem to change their minds every two minutes. Still wonder why they want to keep this useless junk.

Share this post


Link to post
Share on other sites
In conclusion...

I tried NPOT textures but I had about a 20% drop in frame rates, which isn't horrible but I think instead of using the NPOT textures I'll try using 510x510 textures with a 1 pixel border(but not say I'm using a border) then modify the texture coordinates appropriately. I had figured there would be a better way to use power of 2 tiles + a border since most terrain editing applications output power of 2 textures. Maybe other people aren't as obsessed with avoiding edge artifacts(which aren't too bad) as I am. Thanks to all for your feedback.

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!