diff --git a/Editor/Editor.cpp b/Editor/Editor.cpp index 0185878ad..e0bca689e 100644 --- a/Editor/Editor.cpp +++ b/Editor/Editor.cpp @@ -3895,7 +3895,19 @@ void EditorComponent::FocusCameraOnSelected() } if (scene.lights.Contains(x.entity)) { - aabb = AABB::Merge(aabb, scene.aabb_lights[scene.lights.GetIndex(x.entity)]); + size_t lightindex = scene.lights.GetIndex(x.entity); + const LightComponent& light = scene.lights[lightindex]; + if (light.GetType() == LightComponent::DIRECTIONAL) + { + // Directional light AABB is huge, so we handle this as special case: + AABB lightAABB; + lightAABB.createFromHalfWidth(light.position, XMFLOAT3(1, 1, 1)); + aabb = AABB::Merge(aabb, lightAABB); + } + else + { + aabb = AABB::Merge(aabb, scene.aabb_lights[lightindex]); + } } if (scene.decals.Contains(x.entity)) { diff --git a/WickedEngine/wiGUI.cpp b/WickedEngine/wiGUI.cpp index b0c0b81ca..f8955bd55 100644 --- a/WickedEngine/wiGUI.cpp +++ b/WickedEngine/wiGUI.cpp @@ -1492,6 +1492,12 @@ namespace wi::gui } } + if (wi::input::Down(wi::input::KEYBOARD_BUTTON_LCONTROL) && wi::input::Down((wi::input::BUTTON)'A')) + { + caret_begin = 0; + caret_pos = (int)font_input.GetText().size(); + } + } if (clicked && state == FOCUS) @@ -1649,6 +1655,8 @@ namespace wi::gui void TextInputField::AddInput(const wchar_t inputChar) { input_updated = true; + if (wi::input::Down(wi::input::KEYBOARD_BUTTON_LCONTROL) || wi::input::Down(wi::input::KEYBOARD_BUTTON_RCONTROL)) + return; switch (inputChar) { case '\b': // BACKSPACE diff --git a/WickedEngine/wiScene.cpp b/WickedEngine/wiScene.cpp index d57e64ee4..b93883fc3 100644 --- a/WickedEngine/wiScene.cpp +++ b/WickedEngine/wiScene.cpp @@ -3980,8 +3980,7 @@ namespace wi::scene GraphicsDevice* device = wi::graphics::GetDevice(); constexpr Format format = Format::BC6H_UF16; - constexpr uint32_t blocks = envmapRes / GetFormatBlockSize(format); - constexpr uint32_t mip_count = GetMipCount(blocks, blocks); + constexpr uint32_t mip_count = GetMipCount(envmapRes, envmapRes); TextureDesc desc; desc.array_size = 6; diff --git a/WickedEngine/wiVersion.cpp b/WickedEngine/wiVersion.cpp index 91d07960d..193b74552 100644 --- a/WickedEngine/wiVersion.cpp +++ b/WickedEngine/wiVersion.cpp @@ -9,7 +9,7 @@ namespace wi::version // minor features, major updates, breaking compatibility changes const int minor = 71; // minor bug fixes, alterations, refactors, updates - const int revision = 276; + const int revision = 277; const std::string version_string = std::to_string(major) + "." + std::to_string(minor) + "." + std::to_string(revision);