mirror of
https://github.com/raysan5/raylib.git
synced 2026-02-06 06:09:17 -05:00
add missing shaders
This commit is contained in:
28
examples/models/resources/shaders/glsl100/voxel_lighting.vs
Normal file
28
examples/models/resources/shaders/glsl100/voxel_lighting.vs
Normal file
@ -0,0 +1,28 @@
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
#endif
|
||||
|
||||
// Input vertex attributes
|
||||
attribute vec3 vertexPosition;
|
||||
attribute vec3 vertexNormal;
|
||||
attribute vec4 vertexColor;
|
||||
// attribute vec2 vertexTexCoord;
|
||||
|
||||
// Input uniform values
|
||||
uniform mat4 mvp;
|
||||
uniform mat4 matModel;
|
||||
uniform mat4 matNormal;
|
||||
|
||||
// Output to fragment shader
|
||||
varying vec3 fragPosition;
|
||||
varying vec4 fragColor;
|
||||
varying vec3 fragNormal;
|
||||
|
||||
void main()
|
||||
{
|
||||
fragPosition = vec3(matModel * vec4(vertexPosition, 1.0));
|
||||
fragColor = vertexColor;
|
||||
fragNormal = normalize(vec3(matNormal * vec4(vertexNormal, 1.0)));
|
||||
|
||||
gl_Position = mvp * vec4(vertexPosition, 1.0);
|
||||
}
|
||||
Reference in New Issue
Block a user