mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-19 23:49:56 -04:00
Add one anti-aliasing setting: the game's SMAA, off, FXAA, SMAA at its Ultra preset, or TAA.
Ocarina anti-aliases every frame with its own SMAA in three compute passes after the bloom composite. The new aa setting (nx2navi.ini aa, the Screen tab's Anti-aliasing row) keeps that by default. off, fxaa and smaa leave out the game's edge and weight passes and replace its composition with a pass of our own that writes the same square-rooted RGB9E5 words into the scene target: a plain copy, an edge smoothing written here, or the SMAA reference implementation with its area and search textures (MIT). taa is DLSS or FSR 3.1 at the scene's size, which the row sets through the upscaler; while either runs, the game's SMAA stays whatever aa says. The game's passes are known by a hash of their guest code. The shader build now also rebuilds a header when a file its source includes changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -280,6 +280,19 @@ int vk_exec_held_ready(void); // ... and one of them can go on now (vk_b
|
||||
// sample DLSS's output vk_dlaa_swap_view in its place, so the game's scaling draw scales DLSS's picture.
|
||||
extern const VkTexImage *vk_dlaa_swap_img;
|
||||
extern VkImageView vk_dlaa_swap_view;
|
||||
// vk_aa.c, the anti-aliasing setting in place of the game's SMAA (vk_exec_draw.c aa_dispatch). vk_aa_mode: this frame's
|
||||
// replacement, VK_AA_GAME when the game's SMAA runs as it is. vk_aa_role: which of the game's SMAA passes a compute
|
||||
// program is, by the hash of its guest code. vk_aa_skip_ok: the edge and weight passes may be left out (the last
|
||||
// composition was replaced). vk_aa_record: the replacement of the composition into cb, from src (the composite, sampled)
|
||||
// into dst (the scene target's R32_UINT storage view) of w x h; 0 when it could not. vk_aa_composed: what became of the
|
||||
// composition this frame.
|
||||
enum { VK_AA_GAME, VK_AA_OFF, VK_AA_FXAA, VK_AA_SMAA };
|
||||
enum { VK_AA_ROLE_NONE, VK_AA_ROLE_EDGES, VK_AA_ROLE_WEIGHTS, VK_AA_ROLE_COMPOSE };
|
||||
int vk_aa_mode(void);
|
||||
int vk_aa_role(uint64_t guest_hash);
|
||||
int vk_aa_skip_ok(void);
|
||||
int vk_aa_record(VkCommandBuffer cb, int mode, VkImageView src, VkImageView dst, uint32_t w, uint32_t h);
|
||||
void vk_aa_composed(int ok);
|
||||
// vk_contact.c: a pass about to begin (its targets resolved, no pass open), and a dispatch or copy about to be recorded
|
||||
void vk_contact_pass_begin(VkExec *ex);
|
||||
void vk_contact_flush(VkExec *ex);
|
||||
|
||||
Reference in New Issue
Block a user