Something about shadowpass
This commit is contained in:
@@ -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,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user