// **************************************************************************** // **** STRUCTS MUST BE PACKED IN OPTIMAL PACKING ORDER TO MATCH D STRUCTS **** // **************************************************************************** #define OIT_LAYERS 64 layout (set = 0, binding = 0) uniform GlobalUniforms { mat4 view_matrix; mat4 projection_matrix; mat4 projection_view; vec4 light_color; vec4 ambient_color; vec3 light_direction; vec2 res; } G; layout (set = 0, binding = 1) uniform ShaderUniforms { float placeholder; } S; layout (rgba16f, set = 0, binding = 2) uniform image2D DrawImage; layout (set = 0, binding = 3) uniform sampler SamplerNearest; #ifdef COMPOSITE_PASS layout (set = 0, binding = 4, rg32ui) uniform restrict readonly uimageBuffer ImageABuffer; layout (set = 0, binding = 5, r32ui) uniform restrict readonly uimage2D ImageAux; #else layout (set = 0, binding = 4, rg32ui) uniform coherent uimageBuffer ImageABuffer; layout (set = 0, binding = 5, r32ui) uniform coherent uimage2D ImageAux; #endif layout (set = 1, binding = 0) uniform texture2D Textures[]; layout (set = 2, binding = 0) uniform Material { vec4 ambient; vec4 diffuse; vec4 specular; uint albedo_texture; uint ambient_texture; uint specular_texture; uint alpha_texture; bool albedo_has_texture; bool ambient_has_texture; bool specular_has_texture; bool alpha_has_texture; float shininess; float alpha; } Materials[]; layout (push_constant) uniform Constants { mat4 model_matrix; uint mat_id; } PC;