0
votes

I`m trying to get a map editor to work. My idea was to create a texture array for blending multiple terrain textures. One single texture channel (r for example) is bound to a terrains texture alpha.

The question is: Is it possible to create kinda Buffer that can be read like a texture sampler and store as many channels as i need ? For example :

texture2D(buffer, uv)[0].rgb

Is this too far-fetched ?

This would be faster than create 7 textures and send them to the glsl shader.

1

1 Answers

0
votes

You can use a texture array and access the individual textures using texture2D with 3rd coordinate specifying the layer.