Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 2 of 2

Thread: Multiple Texture Arrays

  1. #1
    Intern Contributor
    Join Date
    May 2008
    Posts
    86

    Multiple Texture Arrays

    Suppose a shader uses multiple texture arrays and needs different slices from all of them. What's the best way to hand the slice info to the shader? Do you just use multiple texture coordinates?

    Thanks.

  2. #2
    Advanced Member Frequent Contributor
    Join Date
    Dec 2007
    Location
    Hungary
    Posts
    941
    If your textures would otherwise use the same S and T coordinates just the layer index is different then you could pass multiple layer indices instead of one to the shader. Replicating also the S and T coordinates makes sense only if you need different S and T coordinates in case of the different texture arrays (and, of course, those cannot be computed at runtime).
    Disclaimer: This is my personal profile. Whatever I write here is my personal opinion and none of my statements or speculations are anyhow related to my employer and as such should not be treated as accurate or valid and in no case should those be considered to represent the opinions of my employer.
    Technical Blog: http://www.rastergrid.com/blog/

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •