GLSL, Array of textures of differing size

后端 未结 2 1022
不思量自难忘°
不思量自难忘° 2020-12-13 22:04

When doing multitexturing in GLSL, is there anyway to have an indexable array of samplers where each texture is a different size? This syntax isn\'t valid:

u         


        
2条回答
  •  星月不相逢
    2020-12-13 22:36

    is there anyway to have an indexable array of samplers where each texture is a different size?

    Not yet. Maybe this gets added to a later OpenGL version down the road, but I doubt it.

    But then I can't iterate through them, which is a real pain in the ass. Is there a solution?

    As a workaround you could use Array Textures and use only subregions of each layer. Use a vec4 array to store the boudaries of each picture on each layer.

提交回复
热议问题