View Full Version : To Texture Or Not To Texture?

10-17-2012, 02:38 AM
Hi All,

I have a repeatable texture which looks like (this is just naff copy)...


I need to fill an area of the screen with this pattern but before I implement this using the texture I wanted to find out peoples opinions on drawing this manually and whether it is worth it?

E.g. draw the yellow quad base, then 4 triangles in corners and one rotated quad centrally.

If manually drawing the above pattern means a smaller overhead + faster rendering then I think I will go the manual route. I'm just not sure what is best practice?

carsten neumann
10-17-2012, 08:18 AM
Is that really the performance bottleneck of your application, is it worth optimizing? FWIW my guess would be the texture is faster, but that is just a guess and since GPU performance is a complicated beast that depends on many factors (memory bandwidth, shader/computation complexity, state changes, driver calls, etc.) the only way to be sure is to test it. That kind of effort is normally only justified for the stuff that provably (i.e. through profiling) is the bottleneck of the application.

One advantage (unrelated to performance) of drawing this "by hand" is that it will magnify properly, with the texture you will start to see texels at some point. Of course that only matters if you ever move the camera closer to this pattern.