diff --git a/src/core/renderers/webgl/filters/SpriteMaskFilter.frag b/src/core/renderers/webgl/filters/SpriteMaskFilter.frag deleted file mode 100644 index 223713a..0000000 --- a/src/core/renderers/webgl/filters/SpriteMaskFilter.frag +++ /dev/null @@ -1,21 +0,0 @@ -precision lowp float; - -varying vec2 vMaskCoord; -varying vec2 vTextureCoord; -varying vec4 vColor; - -uniform sampler2D uSampler; -uniform sampler2D mask; - -void main(void) -{ - -// check clip! this will stop the mask bleeding out from the edges - vec2 text = abs( vMaskCoord - 0.5 ); - text = step(0.5, text); - float clip = 1.0 - max(text.y, text.x); - vec4 original = texture2D(uSampler, vTextureCoord); - vec4 masky = texture2D(mask, vMaskCoord); - original *= (masky.r * masky.a * clip); - gl_FragColor = original; -} diff --git a/src/core/renderers/webgl/filters/SpriteMaskFilter.frag b/src/core/renderers/webgl/filters/SpriteMaskFilter.frag deleted file mode 100644 index 223713a..0000000 --- a/src/core/renderers/webgl/filters/SpriteMaskFilter.frag +++ /dev/null @@ -1,21 +0,0 @@ -precision lowp float; - -varying vec2 vMaskCoord; -varying vec2 vTextureCoord; -varying vec4 vColor; - -uniform sampler2D uSampler; -uniform sampler2D mask; - -void main(void) -{ - -// check clip! this will stop the mask bleeding out from the edges - vec2 text = abs( vMaskCoord - 0.5 ); - text = step(0.5, text); - float clip = 1.0 - max(text.y, text.x); - vec4 original = texture2D(uSampler, vTextureCoord); - vec4 masky = texture2D(mask, vMaskCoord); - original *= (masky.r * masky.a * clip); - gl_FragColor = original; -} diff --git a/src/core/renderers/webgl/filters/SpriteMaskFilter.vert b/src/core/renderers/webgl/filters/SpriteMaskFilter.vert deleted file mode 100644 index 5299c1f..0000000 --- a/src/core/renderers/webgl/filters/SpriteMaskFilter.vert +++ /dev/null @@ -1,18 +0,0 @@ -attribute vec2 aVertexPosition; -attribute vec2 aTextureCoord; -attribute vec4 aColor; - -uniform mat3 projectionMatrix; -uniform mat3 otherMatrix; - -varying vec2 vMaskCoord; -varying vec2 vTextureCoord; -varying vec4 vColor; - -void main(void) -{ - gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); - vTextureCoord = aTextureCoord; - vMaskCoord = ( otherMatrix * vec3( aTextureCoord, 1.0) ).xy; - vColor = vec4(aColor.rgb * aColor.a, aColor.a); -}