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/glsl330/gbuffer.vs
Normal file
24
Examples/resources/shaders/glsl330/gbuffer.vs
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
#version 330 core
|
||||
layout (location = 0) in vec3 vertexPosition;
|
||||
layout (location = 1) in vec2 vertexTexCoord;
|
||||
layout (location = 2) in vec3 vertexNormal;
|
||||
|
||||
out vec3 fragPosition;
|
||||
out vec2 fragTexCoord;
|
||||
out vec3 fragNormal;
|
||||
|
||||
uniform mat4 matModel;
|
||||
uniform mat4 matView;
|
||||
uniform mat4 matProjection;
|
||||
|
||||
void main()
|
||||
{
|
||||
vec4 worldPos = matModel*vec4(vertexPosition, 1.0);
|
||||
fragPosition = worldPos.xyz;
|
||||
fragTexCoord = vertexTexCoord;
|
||||
|
||||
mat3 normalMatrix = transpose(inverse(mat3(matModel)));
|
||||
fragNormal = normalMatrix*vertexNormal;
|
||||
|
||||
gl_Position = matProjection*matView*worldPos;
|
||||
}
|
||||
Loading…
Reference in a new issue