diff options
| author | skal <pascal.massimino@gmail.com> | 2026-02-02 15:55:03 +0100 |
|---|---|---|
| committer | skal <pascal.massimino@gmail.com> | 2026-02-02 15:55:03 +0100 |
| commit | c194f59e171a1e58ce1704f37d99ffcd09a42433 (patch) | |
| tree | f77a32f2c4c23b335209b8df11cc82920388b51a /src/gpu/effects/solarize_effect.cc | |
| parent | 316825883c705ed0fe927c32e072f98141d3eaa3 (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/gpu/effects/solarize_effect.cc')
| -rw-r--r-- | src/gpu/effects/solarize_effect.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gpu/effects/solarize_effect.cc b/src/gpu/effects/solarize_effect.cc index f8a7f33..a0bc971 100644 --- a/src/gpu/effects/solarize_effect.cc +++ b/src/gpu/effects/solarize_effect.cc @@ -9,7 +9,7 @@ SolarizeEffect::SolarizeEffect(WGPUDevice device, WGPUQueue queue, WGPUTextureFormat format) : PostProcessEffect(device, queue) { uniforms_ = - gpu_create_buffer(device_, sizeof(float) * 4, + gpu_create_buffer(device_, sizeof(float) * 6, WGPUBufferUsage_Uniform | WGPUBufferUsage_CopyDst); pipeline_ = create_post_process_pipeline(device_, format, solarize_shader_wgsl); @@ -17,8 +17,8 @@ SolarizeEffect::SolarizeEffect(WGPUDevice device, WGPUQueue queue, void SolarizeEffect::render(WGPURenderPassEncoder pass, float t, float b, float i, float a) { struct { - float t, b, i, a; - } u = {t, b, i, a}; + float t, b, i, a, w, h; + } u = {t, b, i, a, (float)width_, (float)height_}; wgpuQueueWriteBuffer(queue_, uniforms_.buffer, 0, &u, sizeof(u)); PostProcessEffect::render(pass, t, b, i, a); } |
