raylib/examples/resources/shaders/glsl330/base.vs

26 lines
544 B
Plaintext
Raw Normal View History

2015-09-02 02:06:55 +03:00
#version 330
2016-04-07 13:32:32 +03:00
// Input vertex attributes
2015-09-02 02:06:55 +03:00
in vec3 vertexPosition;
in vec2 vertexTexCoord;
in vec3 vertexNormal;
in vec4 vertexColor;
2015-09-02 02:06:55 +03:00
2016-04-07 13:32:32 +03:00
// Input uniform values
2016-01-13 19:13:28 +03:00
uniform mat4 mvpMatrix;
2016-04-07 13:32:32 +03:00
// Output vertex attributes (to fragment shader)
out vec2 fragTexCoord;
out vec4 fragColor;
2015-09-02 02:06:55 +03:00
// NOTE: Add here your custom variables
void main()
{
2016-04-07 13:32:32 +03:00
// Send vertex attributes to fragment shader
fragTexCoord = vertexTexCoord;
2016-04-07 13:32:32 +03:00
fragColor = vertexColor;
2016-04-07 13:32:32 +03:00
// Calculate final vertex position
2016-01-13 19:13:28 +03:00
gl_Position = mvpMatrix*vec4(vertexPosition, 1.0);
}