Something about shadowpass

This commit is contained in:
2025-09-21 22:09:24 +02:00
parent 209780cd54
commit ed69a21b80
5 changed files with 45 additions and 38 deletions
@@ -108,7 +108,7 @@ void ShadowPass::beginFrame(const Component::Camera& camera, const Component::Tr
Vector maxExtents = Vector(radius);
Vector minExtents = -maxExtents;
Vector lightDir = glm::normalize(-scene->getLightEnvironment()->getDirectionalLight(s).direction);
Vector lightDir = glm::normalize(scene->getLightEnvironment()->getDirectionalLight(s).direction);
Vector cameraPos = frustumCenter - lightDir * -minExtents.z;
Matrix4 viewMatrix = glm::lookAt(cameraPos, frustumCenter, Vector(0, 1, 0));
Matrix4 projectionMatrix =
@@ -191,8 +191,8 @@ void ShadowPass::render() {
.pipelineLayout = collection->pipelineLayout,
.rasterizationState =
{
.cullMode = Gfx::SE_CULL_MODE_FRONT_BIT,
.depthBiasEnable = true,
.cullMode = Gfx::SE_CULL_MODE_NONE,
.depthBiasEnable = false,
.depthBiasConstantFactor = depthBiasConstant,
.depthBiasSlopeFactor = depthBiasSlope,
},