diff --git a/enginecustom/imgui.ini b/enginecustom/imgui.ini index b2dbdfc..007bf98 100644 --- a/enginecustom/imgui.ini +++ b/enginecustom/imgui.ini @@ -1,6 +1,6 @@ [Window][DockSpace] Pos=0,0 -Size=1584,845 +Size=1536,793 Collapsed=0 [Window][Debug##Default] @@ -27,8 +27,8 @@ Collapsed=0 DockId=0x0000000B,0 [Window][Terrain] -Pos=0,19 -Size=266,541 +Pos=236,19 +Size=266,774 Collapsed=0 DockId=0x00000007,0 @@ -57,7 +57,7 @@ Collapsed=0 DockId=0x00000002,0 [Docking][Data] -DockSpace ID=0xCCBD8CF7 Window=0x3DA2F1DE Pos=0,19 Size=1584,826 Split=X +DockSpace ID=0xCCBD8CF7 Window=0x3DA2F1DE Pos=0,19 Size=1536,774 Split=X DockNode ID=0x00000001 Parent=0xCCBD8CF7 SizeRef=1350,842 Split=X DockNode ID=0x00000005 Parent=0x00000001 SizeRef=1265,842 Split=Y DockNode ID=0x00000003 Parent=0x00000005 SizeRef=1584,609 Split=X diff --git a/enginecustom/src/src/system/application_class.cpp b/enginecustom/src/src/system/application_class.cpp index cf15237..bd6a989 100644 --- a/enginecustom/src/src/system/application_class.cpp +++ b/enginecustom/src/src/system/application_class.cpp @@ -787,15 +787,9 @@ bool application_class::frame(input_class* Input) tab_was_pressed_ = false; } - if (active_camera_ == camera_) { - // Update the camera position and rotation based on the position class. - //camera_->set_position(positionX, positionY, positionZ); - //camera_->set_rotation(rotationX, rotationY, 0.0f); - } else { - // Update the sun camera position and rotation based on the light position. - sun_camera_->set_position(sun_light_->GetPosition().x, sun_light_->GetPosition().y, sun_light_->GetPosition().z); - sun_camera_->set_rotation(pitch, yaw, roll); - } + // Update the sun camera position and rotation based on the light position. + sun_camera_->set_position(sun_light_->GetPosition().x, sun_light_->GetPosition().y, sun_light_->GetPosition().z); + sun_camera_->set_rotation(pitch, yaw, roll); active_camera_->render(); entity_manager_->UpdateEntities(frameTime); @@ -936,13 +930,17 @@ bool application_class::render_shadow_map() bool result; shadow_texture_->SetRenderTarget(direct_3d_->get_device_context()); - shadow_texture_->ClearRenderTarget(direct_3d_->get_device_context(), 1.0f, 1.0f, 1.0f, 1.0f); + shadow_texture_->ClearRenderTarget(direct_3d_->get_device_context(), 1.0f,1.0f, 1.0f, 1.0f); sun_camera_->render(); // Generate the view matrix based on the camera's position. sun_camera_->get_view_matrix(light_viewMatrix); shadow_texture_->GetProjectionMatrix(light_projectionMatrix); for (auto& entity : entity_manager_->GetAllEntities()) { + + // ignore skysphere entity + if (entity == sky_entity_) + continue; auto render_cpnt = entity->GetComponent(); diff --git a/x64/Debug/config.txt b/x64/Debug/config.txt index 375d837..72420a8 100644 --- a/x64/Debug/config.txt +++ b/x64/Debug/config.txt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9499183f09722f969c39d7c3dee26a5d7175bb76cf7a675922c5307063d32592 +oid sha256:da6f91d4b7f6e40d04417930009ad66ebbf05fbfee58e6db0be9f6ceb84cf801 size 9 diff --git a/x64/Release/config.txt b/x64/Release/config.txt index 375d837..72420a8 100644 --- a/x64/Release/config.txt +++ b/x64/Release/config.txt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9499183f09722f969c39d7c3dee26a5d7175bb76cf7a675922c5307063d32592 +oid sha256:da6f91d4b7f6e40d04417930009ad66ebbf05fbfee58e6db0be9f6ceb84cf801 size 9