can you mix different sized textures?

Started by
12 comments, last by GameDev.net 19 years, 4 months ago
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?

Life's like a Hydra... cut off one problem just to have two more popping out.
Leader and Coder: Project Epsylon | Drag[en]gine Game Engine

Advertisement
Yes.
If at first you don't succeed, redefine success.
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.
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.
You should never let your fears become the boundaries of your dreams.
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.
If at first you don't succeed, redefine success.
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)

Life's like a Hydra... cut off one problem just to have two more popping out.
Leader and Coder: Project Epsylon | Drag[en]gine Game Engine

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
Quote:Original post by _DarkWIng_
I don't think GPU reuses coordinates.


Gpu don't but you can in shader :-)
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?
If at first you don't succeed, redefine success.
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.
You should never let your fears become the boundaries of your dreams.

This topic is closed to new replies.

Advertisement