raylib/shaders/glsl100/base.vs

26 lines
580 B
Plaintext
Raw Normal View History

#version 100
2016-05-18 13:04:27 +03:00
// Input vertex attributes
attribute vec3 vertexPosition;
attribute vec2 vertexTexCoord;
attribute vec3 vertexNormal;
2016-05-18 13:04:27 +03:00
attribute vec4 vertexColor;
2016-05-18 13:04:27 +03:00
// Input uniform values
2016-01-13 19:13:28 +03:00
uniform mat4 mvpMatrix;
2016-05-18 13:04:27 +03:00
// Output vertex attributes (to fragment shader)
varying vec2 fragTexCoord;
varying vec4 fragColor;
// NOTE: Add here your custom variables
void main()
{
2016-05-18 13:04:27 +03:00
// Send vertex attributes to fragment shader
fragTexCoord = vertexTexCoord;
2016-05-18 13:04:27 +03:00
fragColor = vertexColor;
2016-05-18 13:04:27 +03:00
// Calculate final vertex position
2016-01-13 19:13:28 +03:00
gl_Position = mvpMatrix*vec4(vertexPosition, 1.0);
}