feat(graphics): implement MSAA anti-aliasing and manual UI scaling#131
Merged
MichaelFisher1997 merged 3 commits intomainfrom Jan 5, 2026
Merged
feat(graphics): implement MSAA anti-aliasing and manual UI scaling#131MichaelFisher1997 merged 3 commits intomainfrom
MichaelFisher1997 merged 3 commits intomainfrom
Conversation
Implements full MSAA (Multi-Sample Anti-Aliasing) support for the Vulkan backend and adds a manual UI scale setting for better readability on high-resolution displays. MSAA Implementation: - Add MSAA color image resources to VulkanContext - Create render pass with 3 attachments (MSAA color, depth, resolve) when multisampling is enabled, with automatic resolve to swapchain - Update depth buffer to use MSAA sample count - Update framebuffer creation to include MSAA attachments - Update graphics pipeline to use configured sample count - Add createMSAAResources/destroyMSAAResources lifecycle functions - Pass msaa_samples from Settings to RHI during initialization - MSAA setting requires application restart to take effect UI Scale Implementation: - Add ui_scale field to Settings struct (0.5 to 2.0 multiplier) - Apply manual scale multiplier in settings menu rendering - Add UI SCALE setting with cycle through presets (0.5x to 2.0x) - Increase settings panel height to accommodate new option Closes #112 Closes #113
ab770a0 to
8af2240
Compare
- Settings for MSAA and Anisotropic Filtering now apply immediately without restart - Refactored RHI to support full teardown and reconstruction of rendering pipelines at runtime - Improved resolution handling to prioritize physical pixel dimensions from SDL - Fixed 'T' and 'Z' glyphs in bitmap font - Added detailed window/resolution logging for debugging HiDPI issues
8af2240 to
ed5003b
Compare
Collaborator
Author
|
/oc can u review this PR and make sure it solve the linked issue |
Co-authored-by: MichaelFisher1997 <MichaelFisher1997@users.noreply.github.com>
Contributor
Code Review SummaryPR: feat(graphics): implement MSAA anti-aliasing and manual UI scaling Issue #112 (Vulkan Optimization: MSAA & Anisotropic Filtering) ✅ SOLVEDMSAA Implementation:
Anisotropic Filtering:
Issue #113 (UI Readability: UI Scale) ✅ SOLVED
SDF Fonts
Verification
The PR properly addresses both issues #112 and #113. MSAA implementation follows Vulkan best practices (transient MSAA color attachment, automatic resolve), and UI scale provides immediate visual feedback with proper preset cycling. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Changes
MSAA Implementation (Issue #112)
rhi_vulkan.zigmsaa_color_image,msaa_color_memory,msaa_color_viewfieldsrhi_vulkan.ziggetMSAASampleCountFlag()helper functionrhi_vulkan.zigcreateMSAAResources()/destroyMSAAResources()lifecycle functionsrhi_vulkan.zigrhi_vulkan.zigrhi_vulkan.zigctx.msaa_samplesrhi_vulkan.zigrhi_vulkan.zigmsaa_samplesparameter tocreateRHI()app.zigsettings.msaa_samplesto RHI initializationNote: MSAA setting requires application restart to take effect (standard for graphics settings that require pipeline recreation).
UI Scale Implementation (Issue #113)
state.zigui_scale: f32 = 1.0fieldmenus.zigsettings.ui_scalemultiplier to automatic scalingmenus.zigmenus.ziggetUIScaleLabel()andcycleUIScale()helper functionsmenus.zigTesting
zig build test- Shader validation passeszig build- Build succeedszig fmt src/- Code formattedSettings Menu Preview
The settings menu now includes:
Related Issues