I have the following sprite shader which uses a second image to use as a mask, for rounding Facebook profile pics etc.
// constant values sent through from AGK code.
uniform sampler2D texture0;
uniform sampler2D texture1;
// Anything that the vertex shader passes as output needs to
// be defined here as input. The vertex shader is passing the
// texture coordinate, so it is defined again here.
varying vec2 uvVarying;
//varying vec2 uv1Varying;
varying mediump vec4 colorVarying;
void main()
{
// copy the textures coords
vec2 texCoord0 = uvVarying;
vec2 texCoord1 = uvVarying;
vec4 colorResult0 = texture2D(texture0, texCoord0);
vec4 colorResult1 = texture2D(texture1, texCoord1);
gl_FragColor =vec4( colorResult0.r, colorResult0.g, colorResult0.b, colorResult1.a )*colorVarying ;
}
The issue is it no longer works with SetSpriteScissors, and I need this as it scrolling within a UI box. Does anyone know how to add the scissor functionality into the sprite shader?
Thanks.