Вершинный шейдер теней направленного источника

This commit is contained in:
parent 9d0de5ce0f
commit 8160e6bb34
1 changed files with 17 additions and 0 deletions

17
shaders/sun_shadow.vert Normal file
View File

@ -0,0 +1,17 @@
#version 420 core
layout (location = 0) in vec3 pos;
uniform mat4 model;
layout(std140, binding = 3) uniform Sun
{
vec3 direction;
vec3 color;
mat4 vp;
} sun;
void main()
{
gl_Position = sun.vp * model * vec4(pos, 1.0);
}