58 lines
1.3 KiB
GLSL
58 lines
1.3 KiB
GLSL
// ==========================================
|
|
// ====== TODO: Research values here ========
|
|
// ==========================================
|
|
|
|
struct Vertex {
|
|
float uv_x;
|
|
float uv_y;
|
|
float x, y, z;
|
|
};
|
|
|
|
layout (set = 0, binding = 0) uniform GlobalUniform {
|
|
mat4 camera_view;
|
|
mat4 camera_projection;
|
|
mat4 camera_view_projection;
|
|
mat4 camera_view_inverse;
|
|
mat4 camera_projection_inverse;
|
|
mat4 camera_previous_view;
|
|
mat4 camera_previous_projection;
|
|
vec2 render_resolution;
|
|
vec2 jitter_offset;
|
|
float delta;
|
|
uint frame_count;
|
|
} Globals;
|
|
|
|
layout (set = 0, binding = 1) uniform ShaderOptions {
|
|
float exposure;
|
|
float alpha;
|
|
int debug_display;
|
|
uint albedo_texture_indices[];
|
|
} Options;
|
|
|
|
layout (rgba16f, set = 0, binding = 2) uniform image2D image;
|
|
|
|
layout (set = 1, binding = 0) uniform sampler2D Textures[];
|
|
|
|
layout (rgba8_snorm, set = 2, binding = 0) uniform image2D Images[];
|
|
|
|
layout (set = 3, binding = 0) uniform PBRMaterials {
|
|
vec3 albedo;
|
|
vec3 normal;
|
|
float metallic;
|
|
float roughness;
|
|
float ao;
|
|
} Materials[];
|
|
|
|
|
|
layout (std430, buffer_reference) readonly buffer VertexBuffer {
|
|
Vertex vertices[];
|
|
};
|
|
|
|
layout (push_constant) uniform constants {
|
|
mat4 render_matrix;
|
|
VertexBuffer vertex_buffer;
|
|
uint sampler_index;
|
|
uint image_index;
|
|
uint material_index;
|
|
} PC;
|