Jump to content
  • Advertisement
Sign in to follow this  
RPTD

can you mix different sized textures?

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

is it possible to do for example a texture of let's say 512x512 (color texture) and then for doing high-res stuff some 1024x1024 normal map or other fancy manipulation maps in one render pass? i ask this especially as i did not find out so far if this 'mixing' of different texture sizes is working flawlessly and if you can assume the consumer hardware does accept this too. are there cards that do not allow mixing textures with different sizes like that?

Share this post


Link to post
Share on other sites
Advertisement
Yes it is possible but, it's slower.
Because when you use the same texcoord for these texture.
The coord is between <0,1>x<0,1>, so they have to be calculated(calculating is done when you call tex2D(cg) or texture2D(glsl)...)twice, once for 512x512, and then for 1024x1024.

Share this post


Link to post
Share on other sites
Quote:
Original post by Cifko
it's slower.

Not really. I use this all the time but I never noticed even a small performance drop compatred to same-sized textures. I don't think GPU reuses coordinates.

Share this post


Link to post
Share on other sites
Quote:
Original post by _DarkWIng_
I don't think GPU reuses coordinates.


Agreed. With this in mind, I can't see how it can be slower. I also haven't noticed any speed deficit with using different sized textures.

Share this post


Link to post
Share on other sites
ok... then this should work.

still standing around the question if this is compatible across different cards or if i need if-path to deal with it beeing not possible.

(currently my engine doesn't allow diff sized textures but i though it might be helpfull perhaps)

Share this post


Link to post
Share on other sites
yes, its possible across different cards, you can use any size texture which is valid up to 2048*2048 on pretty much all cards and 4096*4069 on Nvidia hardware.

As for slowness, the only time I could see it slowing down would be if you were causing texture cache thrashing, and even then you'd have to be doing something pretty crazy to cause it to be bad enuff to have a noticeable effect on your app

Share this post


Link to post
Share on other sites
Quote:
Original post by _DarkWIng_
I don't think GPU reuses coordinates.


Gpu don't but you can in shader :-)

Share this post


Link to post
Share on other sites
Quote:
Original post by Cifko
Quote:
Original post by _DarkWIng_
I don't think GPU reuses coordinates.


Gpu don't but you can in shader :-)


Well, if the GPU doesn't, whats the point?

Share this post


Link to post
Share on other sites
Quote:
Original post by Cifko
Quote:
Original post by _DarkWIng_
I don't think GPU reuses coordinates.

Gpu don't but you can in shader :-)

I'm sorry but I really don't get your point.

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!