Multiple Object renderinggit add .git add . Completely revamped the model loading system using Model class instances, uses a Material class to build textures, clean slated descriptor sets for bindless rendering, significantly shortening the amount of code needed to load VkImage, VkImageView, and VkSampler. Added multiple texture rendering, abstracted out model loading process to automatically collect all Model instances and render for each object.
This commit is contained in:
21
src/shaders/common.glsl
Normal file
21
src/shaders/common.glsl
Normal file
@@ -0,0 +1,21 @@
|
||||
#extension GL_EXT_buffer_reference : require
|
||||
#extension GL_EXT_scalar_block_layout : require
|
||||
#extension GL_EXT_nonuniform_qualifier : require
|
||||
|
||||
struct Vertex {
|
||||
vec3 pos;
|
||||
vec3 color;
|
||||
vec2 texCoord;
|
||||
};
|
||||
|
||||
layout(buffer_reference, scalar) readonly buffer VertexBuffer{
|
||||
Vertex vertices[];
|
||||
};
|
||||
layout( push_constant, scalar ) uniform constants {
|
||||
VertexBuffer vertBuffer;
|
||||
vec3 objPos;
|
||||
int textureID;
|
||||
mat4 model;
|
||||
mat4 view;
|
||||
mat4 proj;
|
||||
} PushConstants;
|
Reference in New Issue
Block a user