mirror of
https://github.com/raysan5/raylib.git
synced 2026-02-05 21:59:18 -05:00
Updated raylib default shader (markdown)
@ -23,6 +23,10 @@ in vec4 vertexColor; // Vertex input attribute: color
|
|||||||
out vec2 fragTexCoord; // To-fragment attribute: texture coordinate
|
out vec2 fragTexCoord; // To-fragment attribute: texture coordinate
|
||||||
out vec4 fragColor; // To-fragment attribute: color
|
out vec4 fragColor; // To-fragment attribute: color
|
||||||
```
|
```
|
||||||
|
_All_
|
||||||
|
```glsl
|
||||||
|
uniform mat4 mvp; // Model-View-Projection matrix
|
||||||
|
```
|
||||||
|
|
||||||
## default fragment shader input/output parameters
|
## default fragment shader input/output parameters
|
||||||
|
|
||||||
@ -44,4 +48,10 @@ in vec4 fragColor; // Fragment input attribute: color
|
|||||||
out vec4 finalColor; // Fragment output: 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`).
|
NOTE: On _OPENGL_ES2 and OPENGL_21_ we use the default built-in fragment output `gl_FragColor` (same as the explicitly defined `finalColor`).
|
||||||
|
|||||||
Reference in New Issue
Block a user