mirror of
https://github.com/photonstorm/phaser
synced 2025-01-10 12:18:51 +00:00
27 lines
589 B
GLSL
27 lines
589 B
GLSL
|
#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);
|
||
|
}
|