phaser
Version:
A fast, free and fun HTML5 Game Framework for Desktop and Mobile web browsers from the team at Phaser Studio Inc.
21 lines (20 loc) • 740 B
JavaScript
module.exports = [
'#define SHADER_NAME PHASER_MESH_VS',
'precision mediump 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 ()',
'{',
' vTextureCoord = aTextureCoord;',
' vPosition = vec3(uModelMatrix * vec4(aVertexPosition, 1.0));',
' vNormal = vec3(uNormalMatrix * vec4(aVertexNormal, 1.0));',
' gl_Position = uViewProjectionMatrix * uModelMatrix * vec4(aVertexPosition, 1.0);',
'}',
].join('\n');