Skip to content

Commit

Permalink
Added groups
Browse files Browse the repository at this point in the history
  • Loading branch information
denis authored and denis committed Dec 6, 2024
1 parent 404c682 commit ebfaf8c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 10 deletions.
7 changes: 3 additions & 4 deletions Engine/Shaders/CSMPipeline/vertex.glsl
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
#version 460 core
layout(location = 0) in vec3 aPos;

layout(std430, binding = 1) readonly buffer Matrices
{
mat4 modelMatrices[];
layout(std430, binding = 20) buffer MatricesCopy {
mat4 modelMatricesCopy[];
};

void main()
{
gl_Position = modelMatrices[gl_DrawID] * vec4(aPos, 1.0);
gl_Position = modelMatricesCopy[gl_DrawID] * vec4(aPos, 1.0);
}
7 changes: 3 additions & 4 deletions Engine/Shaders/OmniShadowPipeline/vertex.glsl
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
#version 460 core
layout (location = 0) in vec3 aPos;

layout(std430, binding = 1) readonly buffer Matrices
{
mat4 modelMatrices[];
layout(std430, binding = 20) buffer MatricesCopy {
mat4 modelMatricesCopy[];
};

void main()
{
gl_Position = modelMatrices[gl_DrawID] * vec4(aPos, 1.0);
gl_Position = modelMatricesCopy[gl_DrawID] * vec4(aPos, 1.0);
}
2 changes: 1 addition & 1 deletion Engine/src/Pipelines/PipelineCSM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ void Prisma::PipelineCSM::update(glm::vec3 lightPos)
glBindFramebuffer(GL_FRAMEBUFFER, m_fbo);
glClear(GL_DEPTH_BUFFER_BIT);
glCullFace(GL_FRONT); // peter panning
MeshIndirect::getInstance().renderMeshes();
MeshIndirect::getInstance().renderMeshesCopy();

m_shaderAnimation->use();

Expand Down
2 changes: 1 addition & 1 deletion Engine/src/Pipelines/PipelineOmniShadow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ void Prisma::PipelineOmniShadow::update(glm::vec3 lightPos)
m_shader->setFloat(m_farPlanePos, m_farPlane);
m_shader->setVec3(m_lightPos, lightPos);

MeshIndirect::getInstance().renderMeshes();
MeshIndirect::getInstance().renderMeshesCopy();

m_shaderAnimation->use();

Expand Down

0 comments on commit ebfaf8c

Please sign in to comment.