View Full Version : Advice needed - regular texturing vs. pixel shader
08-17-2011, 06:50 AM
I need to texture around 100-200 polygons with 10-15 different not large textures (around 100x100 pixels)
I wonder should I do it in regular way or to do it with shaders? Does it makes noticable difference in quality or performance?
08-17-2011, 07:36 AM
I don't think it really matters; you won't really notice a hughe difference between the two implementing a like for like algorithum.
What GFX cards are you aiming this for? GL 2.x/3.x
Since all textures are the same size, you could go for a shader approach and bind a single 'texture 2D array', with each slice being one of those 100x100 textures. This would be the most efficient way I suspect. You can't do that with FF pipe line.
08-17-2011, 07:39 AM
If you render all your polygons as triangles, and use texture arrays as I suggested, the whole lot can be drawn with a single draw call and no texture bind swapping. Doesn't get more efficient than that.
08-17-2011, 07:44 AM
Thank you so much. I will go with your suggestion.
My application requires cards with GL 3.x
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.