feat: add spot light shadows with a tilled buffer

This commit is contained in:
2026-10-18 12:56:52 +02:00
parent 4bd99b25d1
commit 65a7310b56
19 changed files with 519 additions and 122 deletions
-20
View File
@@ -103,25 +103,6 @@ void LightKeeper::updateViewMode()
}
}
void LightKeeper::drawViewModeHint()
{
if (isPlayerViewActive() || mainScene.playerController == nullptr) {
return;
}
constexpr std::string_view hint = "Free camera RMB look WASD / Q E move F5 play";
constexpr float hintSize = 18.0f;
const VkExtent3D extent = renderer.getDrawImage().extent;
const glm::vec2 hintExtent = hudFont.MeasureText(hint, hintSize);
Renderer2D::GetInstance().DrawText(
hudFont,
hint,
{16.0f, static_cast<float>(extent.height) - hintExtent.y - 12.0f},
hintSize,
TextStyle{.color = {1.0f, 1.0f, 1.0f, 0.85f}, .outline = 2.0f, .outlineColor = {0.0f, 0.0f, 0.0f, 0.6f}});
}
void LightKeeper::drawCrosshair()
{
if (!isPlayerViewActive()) {
@@ -185,7 +166,6 @@ void LightKeeper::customDraw()
renderer.beginDrawing(gfxDevice);
submitDebugDraws();
drawCrosshair();
drawViewModeHint();
if (isPlayerViewActive())
{