Additional resources from the Raylib repo.
This commit is contained in:
parent
6c94ffb0cc
commit
ce3a7da69b
150 changed files with 41499 additions and 0 deletions
24
Examples/resources/shaders/glsl120/voxel_lighting.vs
Normal file
24
Examples/resources/shaders/glsl120/voxel_lighting.vs
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
#version 120
|
||||
// Input vertex attributes
|
||||
attribute vec3 vertexPosition;
|
||||
attribute vec3 vertexNormal;
|
||||
attribute vec4 vertexColor;
|
||||
|
||||
// Uniforms
|
||||
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);
|
||||
}
|
||||
Loading…
Reference in a new issue