What is missing in this project to be able to use the multi-texture feature?
I prepared a small project:
MultiTextureSprite.zip (31.2 KB)
I have a sprite with material that has 3 samplers:
Atlases are prepared according to documentation, e.g. rename patterns are provided:
And a very simple Fragment Program:
varying mediump vec2 var_texcoord0;
uniform lowp sampler2D albedo;
uniform lowp sampler2D normalmap;
uniform lowp sampler2D heightmap;
uniform lowp vec4 tint;
void main()
{
// Pre-multiply alpha since all runtime textures already are
lowp vec4 tint_pm = vec4(tint.xyz * tint.w, tint.w);
lowp vec4 albedo_color = texture2D(albedo, var_texcoord0.xy);
lowp vec4 normal_color = texture2D(normalmap, var_texcoord0.xy);
lowp vec4 height_color = texture2D(heightmap, var_texcoord0.xy);
normal_color.x = 1.0;
normal_color.y = 1.0;
normal_color.z = 1.0;
height_color.x = 1.0;
height_color.y = 1.0;
height_color.z = 1.0;
gl_FragColor = albedo_color * normal_color * height_color * tint_pm;
}
But nothing is visible in the main.collection nor when running it: