12 lines
441 B
Bash
12 lines
441 B
Bash
uniform mat4 uMVPMatrix; //总变换矩阵
|
|
uniform mat4 uMMatrix; //变换矩阵
|
|
uniform vec3 uCamera; //摄像机位置
|
|
attribute vec3 aPosition; //顶点位置
|
|
attribute vec2 aTexCoor; //顶点纹理坐标
|
|
varying vec2 vTextureCoord;
|
|
void main()
|
|
{
|
|
gl_Position = uMVPMatrix * vec4(aPosition,1); //根据总变换矩阵计算此次绘制此顶点位置
|
|
//将顶点的纹理坐标传给片元着色器
|
|
vTextureCoord=aTexCoor;
|
|
} |