Do we have now or are we going to support the webgl (version 2 i think ) sampler2DArray.
I know we have the sampler2D[x] approach that actual take a array of separate babylon textures... But i think each texture STILL counts against the MAX_TEXTURE_IMAGE_UNITS and the new sampler2DArray approach counts against a MAX_COMBINED_TEXTURE_IMAGE_UNITS as well as the sampler2DArray
approach allow for tiling in your texture atlas... Here is sample WEBGL texture array code:
uniform sampler2DArray myTextureSampler;
in vec2 UV;
in int index;
out vec3 out_Color;
void main(void)
{
//Use the texture coordinates as usual but the different textures are indexed by the third component of a vec3
out_Color = texture2DArray(myTextureSampler, vec3(UV, index)).rgb;
}
Can we support this now... or in the near future ???
@Deltakosh @NasimiAsl @Sebavan @RaananW and anybody else