Jump to content
  • Advertisement
Sign in to follow this  
Daivuk

OpenGL Tricky question avec Texture LOD

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

Hi :) I have LODs on my models, and my artist told me he planed to create different size of the texture for the model. I told him that opengl do a Mipmaping anyway, but i'm not sure about the performances. I know that each time you make glBindTexture it have to move it into the VRAM, so bigger the texture is, more GPU time you take. So if my far LOD have a smaller texture, it can be faster at rendering, or there is no diff? I'm a little confused about this. Thank you!

Share this post


Link to post
Share on other sites
Advertisement
Yes, OpenGL does mipmapping for you with gluBuild2DMipmaps. You can do it by yourself as well, using glTexImage2D, but I don't think there's much benefit.

The performance might increase if there are alot of texture reads. You might save some memory as well, since it only needs to keep the smaller texture in graphics card memory when it's far away.

Share this post


Link to post
Share on other sites
Quote:
Original post by James Trotter
The performance might increase if there are alot of texture reads. You might save some memory as well, since it only needs to keep the smaller texture in graphics card memory when it's far away.


No, thats not really how it works.

A texture will maintain all the image data in memory, its the section of the texture data it samples which changes. The reason it helps performance is the smaller texture data fits into the texture cache better thus the hardware has to touch memory less, which when compared to the cache is very slow.

Share this post


Link to post
Share on other sites
Ok thanks, so in clear :

I have to do what the artist told me : making a different texture for different LOD of the models?

Anyway I will make hard test on it :P

Share this post


Link to post
Share on other sites
Quote:
Original post by James Trotter
You can do it by yourself as well, using glTexImage2D, but I don't think there's much benefit.
The standard approach in commercial PC titles nowadays is to generate the mipmaps offline, have an artist touch them up by hand, and then store the entire thing into a single DDS file.

Share this post


Link to post
Share on other sites
Quote:
Original post by Promit
Quote:
Original post by James Trotter
You can do it by yourself as well, using glTexImage2D, but I don't think there's much benefit.
The standard approach in commercial PC titles nowadays is to generate the mipmaps offline, have an artist touch them up by hand, and then store the entire thing into a single DDS file.


Ah, I didn't know.

And thanks phantom for correcting that.

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!