Add example code
This commit is contained in:
parent
e2da32e2da
commit
3f6e12ee04
1 changed files with 55530 additions and 2 deletions
26
MyGame/example-raylib/resources/shaders/glsl120/base.vs
Normal file
26
MyGame/example-raylib/resources/shaders/glsl120/base.vs
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
#version 120
|
||||
|
||||
// Input vertex attributes
|
||||
attribute vec3 vertexPosition;
|
||||
attribute vec2 vertexTexCoord;
|
||||
attribute vec3 vertexNormal;
|
||||
attribute vec4 vertexColor;
|
||||
|
||||
// Input uniform values
|
||||
uniform mat4 mvp;
|
||||
|
||||
// Output vertex attributes (to fragment shader)
|
||||
varying vec2 fragTexCoord;
|
||||
varying vec4 fragColor;
|
||||
|
||||
// NOTE: Add here your custom variables
|
||||
|
||||
void main()
|
||||
{
|
||||
// Send vertex attributes to fragment shader
|
||||
fragTexCoord = vertexTexCoord;
|
||||
fragColor = vertexColor;
|
||||
|
||||
// Calculate final vertex position
|
||||
gl_Position = mvp*vec4(vertexPosition, 1.0);
|
||||
}
|
||||
Loading…
Reference in a new issue