UNPKG

@phaserjs/phaser

Version:
29 lines (20 loc) 633 B
export const AMBIENT_LIGHT_VERT = ` #define SHADER_NAME AMBIENT_LIGHT_VERT precision highp float; attribute vec3 aVertexPosition; attribute vec3 aVertexNormal; attribute vec2 aTextureCoord; uniform mat4 uViewProjectionMatrix; uniform mat4 uModelMatrix; uniform mat4 uNormalMatrix; varying vec2 vTextureCoord; varying vec3 vNormal; varying vec3 vPosition; void main(void) { vTextureCoord = aTextureCoord; vPosition = vec3(uModelMatrix * vec4(aVertexPosition, 1.0)); vNormal = vec3(uNormalMatrix * vec4(aVertexNormal, 1.0)); gl_Position = uViewProjectionMatrix * uModelMatrix * vec4(aVertexPosition, 1.0); } `;