
19. Massive Number of Shadow-Casting Lights with Layered Rendering 269
#version 420 core
layout (location = 0) in vec3 inVertexPosition;
layout (location = 1) in ivec4 inBoneIndex;
layout (location = 2) in vec4 inBoneWeight;
#ifdef LAYERED
layout (location = 0) out vec4 vertexPosition;
#endif
layout (std140 , binding = 1) uniform boneTransform {
mat3 BoneMatrix[64];
} BoneTransform;
#ifndef LAYERED
layout (std140 , binding = 0) uniform lightTransform {
mat4 VPMatrix ;
} LightTransform;
out gl_PerVertex {
vec4 gl_Position;
};
#endif
void main (void ){
vec3 vertex = (BoneTransform.BoneMatrix[inBoneIndex.x] * inVertexPosition) * ←
inBoneWeight.x;
if (inBoneIndex.y ...