Modern Apps git
git clone https://git.maproj.org/Modern-Apps.git
translate ▾

Modern-Apps.git / games / voxels / src / main / rust / shaders / shadow.vert

shadow.vert23 lines · 502 BRaw
1#version 450
2// Depth-only pass: rasterize terrain from the sun's point of view into the shadow map.
3layout(location=0) in vec3 inPos;
4
5layout(binding=0) uniform Ubo {
6 mat4 viewProj;
7 vec3 sunDir;
8 float time;
9 vec3 fogColor;
10 float fogDensity;
11 vec4 playerPos;
12 float dayFactor;
13 mat4 invViewProj;
14 vec3 sunColor;
15 float cloudShadow;
16 vec3 ambientColor;
17 float _pad2;
18 mat4 lightViewProj;
19};
20
21void main() {
22 gl_Position = lightViewProj * vec4(inPos, 1.0);
23}