From 0808a0d38b7b9a94f2d8c45ccd6474798f9a5920 Mon Sep 17 00:00:00 2001 From: Ray Date: Mon, 27 Jul 2020 12:38:59 +0200 Subject: [PATCH] Updated raylib default shader (markdown) --- raylib-default-shader.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/raylib-default-shader.md b/raylib-default-shader.md index 122ebd9..19926d9 100644 --- a/raylib-default-shader.md +++ b/raylib-default-shader.md @@ -23,6 +23,10 @@ in vec4 vertexColor; // Vertex input attribute: color out vec2 fragTexCoord; // To-fragment attribute: texture coordinate out vec4 fragColor; // To-fragment attribute: color ``` +_All_ +```glsl +uniform mat4 mvp; // Model-View-Projection matrix +``` ## default fragment shader input/output parameters @@ -44,4 +48,10 @@ in vec4 fragColor; // Fragment input attribute: color out vec4 finalColor; // Fragment output: color ``` +_All_ +```glsl +uniform sampler2D texture0; // Fragment input texture (always required, could be a white pixel) +uniform vec4 colDiffuse; // Fragment input color diffuse (multiplied by texture color) +``` + NOTE: On _OPENGL_ES2 and OPENGL_21_ we use the default built-in fragment output `gl_FragColor` (same as the explicitly defined `finalColor`).