diff options
author | Frederico Linhares <fred@linhares.blue> | 2022-09-23 10:58:25 -0300 |
---|---|---|
committer | Frederico Linhares <fred@linhares.blue> | 2022-09-23 10:58:25 -0300 |
commit | 28de1fe8713aba2c4bb23fc8640adb2747373b66 (patch) | |
tree | 20acc92f084a0833293651a9127d3c20271e8d70 | |
parent | 78db82c0dac8db90a3de1004e5428f225947b2b9 (diff) |
refa Use Vulkan coordinates instead of OpenGL
-rw-r--r-- | src/vk/graphics_pipeline_3d.cpp | 3 | ||||
-rw-r--r-- | test/src/main.rb | 4 |
2 files changed, 3 insertions, 4 deletions
diff --git a/src/vk/graphics_pipeline_3d.cpp b/src/vk/graphics_pipeline_3d.cpp index fbf5b80..eb86401 100644 --- a/src/vk/graphics_pipeline_3d.cpp +++ b/src/vk/graphics_pipeline_3d.cpp @@ -627,7 +627,6 @@ GraphicsPipeline3D::draw( glm::radians(45.0f), view->region.z / view->region.w, 0.1f, 100.0f); - ubo_view_3d.proj[1][1] *= -1; view->ub_3d[image_index].copy_data(&ubo_view_3d); } @@ -640,7 +639,7 @@ GraphicsPipeline3D::draw( UBOWorld3D_Frag ubo_world_3d_frag{}; ubo_world_3d_frag.directional_light_direction = - glm::vec3{-0.57735, -0.57735, -0.57735}; + glm::vec3{-0.57735, 0.57735, -0.57735}; ubo_world_3d_frag.directional_light_color = glm::vec4{0.8, 0.8, 0.8, 1.0}; this->ub_world_frag[image_index].copy_data(&ubo_world_3d_frag); } diff --git a/test/src/main.rb b/test/src/main.rb index 40a7c79..b2e91e9 100644 --- a/test/src/main.rb +++ b/test/src/main.rb @@ -48,9 +48,9 @@ end def key_down(key) case key when CandyGear::Key::I - $camera_rotation.rotate(CAMERA_ROTATION_SPEED, 0.0); - when CandyGear::Key::K $camera_rotation.rotate(-CAMERA_ROTATION_SPEED, 0.0); + when CandyGear::Key::K + $camera_rotation.rotate(CAMERA_ROTATION_SPEED, 0.0); when CandyGear::Key::J $camera_rotation.rotate(0.0, CAMERA_ROTATION_SPEED); when CandyGear::Key::L |