I am not sure if this is a bug...
I have search for this on google and nothing seems out of place.
The problem is, when assigning multiple image into shader, the second image is the same as the first, despite using "SetSpriteAdditionalImage()".
main.agc:
CreateSprite(1,1)
SetSpriteAdditionalImage(1,2,1)
SetSpriteShader(1, 1)
sprite.ps:
#ifdef GL_ES
#ifdef GL_FRAGMENT_PRECISION_HIGH
precision highp float;
#else
precision mediump float;
#endif
#endif
uniform sampler2D imageMain;
uniform sampler2D imageMask;
varying vec4 colorVarying;
varying vec2 uvVarying;
void main()
{
gl_FragColor.rgb = texture2D(imageMain, uvVarying).rgb;
gl_FragColor.a = texture2D(imageMask, uvVarying).a;
}
Thank you for taking a look at this post!