初次提交
This commit is contained in:
10
第3章 OpenGL ES 2.0概览/Sample3_1/assets/vertex.sh
Normal file
10
第3章 OpenGL ES 2.0概览/Sample3_1/assets/vertex.sh
Normal file
@@ -0,0 +1,10 @@
|
||||
uniform mat4 uMVPMatrix; //总变换矩阵
|
||||
attribute vec3 aPosition; //顶点位置
|
||||
attribute vec4 aColor; //顶点颜色
|
||||
varying vec4 vColor; //用于传递给片元着色器的变量
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = uMVPMatrix * vec4(aPosition,1); //根据总变换矩阵计算此次绘制此顶点位置
|
||||
vColor = aColor;//将接收的颜色传递给片元着色器
|
||||
}
|
||||
Reference in New Issue
Block a user