Newer
Older
pixi.js / src / filters / displacement / displacement.vert
@Chad Engler Chad Engler on 26 Feb 2015 472 bytes move displacement filter to shader files
attribute vec2 aVertexPosition;
attribute vec2 aTextureCoord;
attribute vec4 aColor;

uniform mat3 projectionMatrix;
uniform mat3 otherMatrix;

varying vec2 vMapCoord;
varying vec2 vTextureCoord;
varying vec4 vColor;

void main(void)
{
   gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
   vTextureCoord = aTextureCoord;
   vMapCoord = ( otherMatrix * vec3( aTextureCoord, 1.0)  ).xy;
   vColor = vec4(aColor.rgb * aColor.a, aColor.a);
}