Updated raylib default shader (markdown)

master
Ray 5 years ago
parent
commit
0808a0d38b
1 changed files with 10 additions and 0 deletions
  1. +10
    -0
      raylib-default-shader.md

+ 10
- 0
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`).

Loading…
Cancel
Save