23 lines
583 B
Plaintext
23 lines
583 B
Plaintext
attribute vec3 vPosition;
|
|
attribute vec3 vColor;
|
|
attribute vec3 vNormal;
|
|
attribute vec2 vTexCoord; // <-- Обычные UV (если используются)
|
|
|
|
varying vec3 color;
|
|
varying vec3 normal;
|
|
|
|
varying vec2 TexCoord; // <-- Передаем UV
|
|
|
|
uniform mat4 ProjectionModelViewMatrix;
|
|
uniform mat4 ModelViewMatrix;
|
|
uniform vec3 uLightDirection;
|
|
|
|
void main()
|
|
{
|
|
gl_Position = ProjectionModelViewMatrix * vec4(vPosition.xyz, 1.0);
|
|
|
|
normal = normalize((ModelViewMatrix * vec4(vNormal, 0.0)).xyz);
|
|
|
|
color = vColor;
|
|
TexCoord = vTexCoord;
|
|
} |