14 lines
319 B
Plaintext
14 lines
319 B
Plaintext
attribute vec3 vPosition;
|
|
|
|
uniform mat4 ProjectionMatrix;
|
|
uniform mat3 ModelRotateMatrix;
|
|
uniform vec3 ModelTranslateVector;
|
|
|
|
varying vec3 dir;
|
|
|
|
void main(){
|
|
vec4 realVertexPos = vec4(ModelRotateMatrix * vPosition.xyz + ModelTranslateVector, 1.0);
|
|
gl_Position = ProjectionMatrix * realVertexPos;
|
|
|
|
dir = -vPosition;
|
|
} |