From 5c8324d25f5f3500d5258f599afc710352611513 Mon Sep 17 00:00:00 2001 From: jussi Date: Thu, 16 Nov 2023 22:37:28 +0200 Subject: Lightmap 100 and 120 shaders. Snake and platformer example refining. --- examples/resources/shaders/glsl100/lightmap.vs | 31 ++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 examples/resources/shaders/glsl100/lightmap.vs (limited to 'examples/resources/shaders/glsl100/lightmap.vs') diff --git a/examples/resources/shaders/glsl100/lightmap.vs b/examples/resources/shaders/glsl100/lightmap.vs new file mode 100644 index 0000000..f5d87b3 --- /dev/null +++ b/examples/resources/shaders/glsl100/lightmap.vs @@ -0,0 +1,31 @@ +#version 100 + +// Input vertex attributes +attribute vec3 vertexPosition; +attribute vec2 vertexTexCoord; +attribute vec2 vertexTexCoord2; +attribute vec4 vertexColor; + +// Input uniform values +uniform mat4 mvp; +uniform mat4 matModel; + +// Output vertex attributes (to fragment shader) +varying vec3 fragPosition; +varying vec2 fragTexCoord; +varying vec2 fragTexCoord2; +varying vec4 fragColor; + +// NOTE: Add here your custom variables + +void main() +{ + // Send vertex attributes to fragment shader + fragPosition = vec3(matModel*vec4(vertexPosition, 1.0)); + fragTexCoord = vertexTexCoord; + fragTexCoord2 = vertexTexCoord2; + fragColor = vertexColor; + + // Calculate final vertex position + gl_Position = mvp*vec4(vertexPosition, 1.0); +} -- cgit v1.2.3