Skip to content

Commit

Permalink
Depth Pre-Pass and saving of images
Browse files Browse the repository at this point in the history
  • Loading branch information
Williscool13 committed Sep 27, 2024
1 parent 0d379d3 commit 2baf266
Show file tree
Hide file tree
Showing 15 changed files with 448 additions and 106 deletions.
6 changes: 6 additions & 0 deletions shaders/depthPrepass.frag
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#version 450


void main() {

}
49 changes: 49 additions & 0 deletions shaders/depthPrepass.vert
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
#version 450
#extension GL_EXT_buffer_reference : require

struct Model
{
mat4 modelMatrix;
};

struct Material
{
vec4 colorFactor;
vec4 metalRoughFactors;
ivec4 textureImageIndices;
ivec4 textureSamplerIndices;
vec4 alphaCutoff;
};

layout (buffer_reference, std430) readonly buffer ModelData
{
Model models[];
};

layout (buffer_reference, std430) readonly buffer MaterialData
{
Material materials[];
};

layout (set = 0, binding = 0) uniform addresses
{
MaterialData materialBufferDeviceAddress;
ModelData modelBufferDeviceAddress;
} bufferAddresses;


layout (location = 0) in vec3 position;


layout (push_constant) uniform PushConstants {
mat4 viewProj; // (64)
// (16)
// (16)
// (16)
// (16)
} pushConstants;

void main() {
mat4 model = bufferAddresses.modelBufferDeviceAddress.models[gl_InstanceIndex].modelMatrix;
gl_Position = pushConstants.viewProj * model * vec4(position, 1.0f);
}
17 changes: 0 additions & 17 deletions shaders/fragment.frag

This file was deleted.

File renamed without changes.
File renamed without changes.
33 changes: 0 additions & 33 deletions shaders/vertex.vert

This file was deleted.

Loading

0 comments on commit 2baf266

Please sign in to comment.