Refactor literally everything
This commit is contained in:
@@ -12,16 +12,24 @@ struct DirectionalLight {
|
||||
|
||||
struct Material {
|
||||
vec3 baseColor;
|
||||
uint baseColorTexture;
|
||||
vec3 emissive;
|
||||
uint emissiveTexture;
|
||||
float ior;
|
||||
float metallic;
|
||||
float normalScale;
|
||||
uint normalTexture;
|
||||
uint occlusionRoughnessMetallicTexture;
|
||||
float occlusionTextureStrength;
|
||||
float roughness;
|
||||
|
||||
uint16_t baseColorTexture;
|
||||
uint16_t emissiveTexture;
|
||||
uint16_t normalTexture;
|
||||
uint16_t occlusionRoughnessMetallicTexture;
|
||||
};
|
||||
|
||||
struct ObjectUniforms {
|
||||
mat4 matrixOStoWS;
|
||||
mat4 matrixOStoWSNormal;
|
||||
|
||||
uint16_t material;
|
||||
};
|
||||
|
||||
layout(set = 0, binding = 0, scalar) uniform GlobalUniforms {
|
||||
@@ -47,11 +55,8 @@ layout(set = 0, binding = 3, scalar) readonly buffer Materials {
|
||||
layout(set = 0, binding = 4) uniform sampler _Sampler;
|
||||
layout(set = 0, binding = 5) uniform texture2D _Textures[];
|
||||
|
||||
// --- SET 1 --- PER OBJECT ----------------------------------------------------
|
||||
// --- SET 1 --- PER BATCH -----------------------------------------------------
|
||||
|
||||
layout(set = 1, binding = 0, scalar) uniform ObjectUniforms {
|
||||
mat4 matrixOStoWS;
|
||||
mat4 matrixOStoWSNormal;
|
||||
|
||||
uint material;
|
||||
} _Object;
|
||||
layout(set = 1, binding = 0, scalar) readonly buffer ObjectsUniforms {
|
||||
ObjectUniforms _Object[];
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user