@@ -146,21 +146,6 @@ void AppPBRShadow::UpdateUBOs()
146146 skyboxUbo.view = glm::mat4 (glm::mat3 (skyboxUbo.view ));
147147 skyboxPtr_->SetCameraUBO (vulkanContext_, skyboxUbo);
148148
149- // Shadow mapping
150- // Temp
151- /* for (size_t i = 0; i < ShadowConfig::CascadeCount; ++i)
152- {
153- shadowUBO_.lightSpaceMatrices[i] = glm::mat4(1.0f);
154- shadowUBO_.splitValues[i] = (i + 1) * 2;
155- }*/
156-
157- // LightData light = resLights_->lights_[0];
158- /* glm::mat4 lightProjection = glm::perspective(glm::radians(45.f), 1.0f, shadowUBO_.shadowNearPlane, shadowUBO_.shadowFarPlane);
159- glm::mat4 lightView = glm::lookAt(glm::vec3(light.position_), glm::vec3(0.0f), glm::vec3(0.0, 1.0, 0.0));
160- glm::mat4 lightSpaceMatrix = lightProjection * lightView;
161- shadowUBO_.lightSpaceMatrices[0] = lightSpaceMatrix;
162- shadowUBO_.lightPosition = light.position_;
163- */
164149 shadowPtr_->CalculateCascade (vulkanContext_, camera_.get (), & (resLight_->lights_ [0 ]), &shadowUBO_);
165150 pbrPtr_->SetShadowMapConfigUBO (vulkanContext_, shadowUBO_);
166151}
@@ -207,7 +192,7 @@ void AppPBRShadow::UpdateUI()
207192 ImGui::SliderFloat (" Max Bias" , &staticShadowUBO.shadowMaxBias , 0 .001f , 0 .1f );
208193 ImGui::SliderFloat (" Near Plane" , &staticShadowUBO.shadowNearPlane , 0 .1f , 50 .0f );
209194 ImGui::SliderFloat (" Far Plane" , &staticShadowUBO.shadowFarPlane , 10 .0f , 150 .0f );
210- ImGui::SliderFloat (" PCF Scale" , &staticShadowUBO.pcfScale , 0 .1f , 1 .0f );
195+ ImGui::SliderFloat (" PCF Scale" , &staticShadowUBO.pcfScale , 0 .1f , 3 .0f );
211196 ImGui::SliderInt (" PCF Iteration" , &staticPCFIteration, 1 , 10 );
212197
213198 ImGui::SeparatorText (" Light position" );
0 commit comments