summaryrefslogtreecommitdiff
path: root/src/3d/visual_debug.h
diff options
context:
space:
mode:
authorskal <pascal.massimino@gmail.com>2026-02-02 15:55:03 +0100
committerskal <pascal.massimino@gmail.com>2026-02-02 15:55:03 +0100
commitc194f59e171a1e58ce1704f37d99ffcd09a42433 (patch)
treef77a32f2c4c23b335209b8df11cc82920388b51a /src/3d/visual_debug.h
parent316825883c705ed0fe927c32e072f98141d3eaa3 (diff)
fix(gpu): Resolve high-DPI squished rendering and 3D shadow bugs
- Implemented dynamic resolution support in all shaders and effects. - Added explicit viewport setting for all render passes to ensure correct scaling. - Fixed 3D shadow mapping by adding PLANE support and standardizing soft shadow logic. - Propagated resize events through the Effect hierarchy. - Applied project-wide code formatting.
Diffstat (limited to 'src/3d/visual_debug.h')
-rw-r--r--src/3d/visual_debug.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/3d/visual_debug.h b/src/3d/visual_debug.h
index c757de3..f02ac6b 100644
--- a/src/3d/visual_debug.h
+++ b/src/3d/visual_debug.h
@@ -6,8 +6,8 @@
#if !defined(STRIP_ALL)
-#include "util/mini_math.h"
#include "gpu/gpu.h"
+#include "util/mini_math.h"
#include <vector>
struct DebugLine {
@@ -17,7 +17,7 @@ struct DebugLine {
};
class VisualDebug {
-public:
+ public:
void init(WGPUDevice device, WGPUTextureFormat format);
void shutdown();
@@ -27,13 +27,13 @@ public:
// Render all queued primitives and clear the queue
void render(WGPURenderPassEncoder pass, const mat4& view_proj);
-private:
+ private:
WGPUDevice device_ = nullptr;
WGPURenderPipeline pipeline_ = nullptr;
WGPUBindGroupLayout bind_group_layout_ = nullptr;
-
+
std::vector<DebugLine> lines_;
-
+
// Uniform buffer for ViewProjection matrix
WGPUBuffer uniform_buffer_ = nullptr;
WGPUBindGroup bind_group_ = nullptr;