engine/assets/shaders/shadow.glsl

29 lines
501 B
GLSL

#include "camera.glsl"
// Shadows use a different format, so don't use draw_cmds_data.glsl
layout(std430, binding = 3) readonly buffer DrawCmdDatasShadow {
// Access by gl_DrawID
mat4 transforms[];
};
// Input, output blocks
#if VERTEX_SHADER
layout(location = 0) in vec3 aPos;
void main() {
mat4 model = transforms[gl_DrawID];
gl_Position = projection * view * model * vec4(aPos.xyz, 1.0);
}
#endif // VERTEX_SHADER
#if FRAGMENT_SHADER
void main() {
}
#endif // FRAGMNET_SHADER