@@ -171,12 +171,11 @@ void AppPBRShadow::UpdateUI()
171171 {
172172 .shadowMinBias = 0 .001f ,
173173 .shadowMaxBias = 0 .001f ,
174- .shadowNearPlane = 10 . 0f ,
175- .shadowFarPlane = 40 . 0f ,
174+ .cameraNearPlane = CameraConfig::Near ,
175+ .cameraFarPlane = CameraConfig::Far ,
176176 .pcfScale = 0 .5f
177177 };
178178 static float staticLightPos[3 ] = { -5 .f , 30 .0f , 5 .0f };
179- static int staticPCFIteration = 2 ;
180179
181180 imguiPtr_->ImGuiStart ();
182181 imguiPtr_->ImGuiSetWindow (" Bindless Shadow Mapping" , 525 , 650 );
@@ -190,10 +189,7 @@ void AppPBRShadow::UpdateUI()
190189 ImGui::SeparatorText (" Shadow mapping" );
191190 ImGui::SliderFloat (" Min Bias" , &staticShadowUBO.shadowMinBias , 0 .00001f , 0 .01f );
192191 ImGui::SliderFloat (" Max Bias" , &staticShadowUBO.shadowMaxBias , 0 .001f , 0 .1f );
193- ImGui::SliderFloat (" Near Plane" , &staticShadowUBO.shadowNearPlane , 0 .1f , 50 .0f );
194- ImGui::SliderFloat (" Far Plane" , &staticShadowUBO.shadowFarPlane , 10 .0f , 150 .0f );
195192 ImGui::SliderFloat (" PCF Scale" , &staticShadowUBO.pcfScale , 0 .1f , 3 .0f );
196- ImGui::SliderInt (" PCF Iteration" , &staticPCFIteration, 1 , 10 );
197193
198194 ImGui::SeparatorText (" Light position" );
199195 ImGui::SliderFloat (" X" , &(staticLightPos[0 ]), -10 .0f , 10 .0f );
@@ -210,10 +206,7 @@ void AppPBRShadow::UpdateUI()
210206
211207 shadowUBO_.shadowMinBias = staticShadowUBO.shadowMinBias ;
212208 shadowUBO_.shadowMaxBias = staticShadowUBO.shadowMaxBias ;
213- shadowUBO_.shadowNearPlane = staticShadowUBO.shadowNearPlane ;
214- shadowUBO_.shadowFarPlane = staticShadowUBO.shadowFarPlane ;
215209 shadowUBO_.pcfScale = staticShadowUBO.pcfScale ;
216- shadowUBO_.pcfIteration = staticPCFIteration;
217210}
218211
219212// This is called from main.cpp
0 commit comments