Commit Graph

16 Commits

Author SHA1 Message Date
Dipshet 2b52e5e2c8 Add dynamic vblank pacing for the FPS unlock (ac6_dynamic_vblank)
With the unlock forcing single-vblank presents, frame-locked content (menus,
hangar, in-engine cutscenes) free-runs far too fast while only gameplay should.
Pace the guest vblank dynamically: free-run only while the 3D world is being
rendered, otherwise force the native 60Hz.

"World is rendering" is detected from the GPU side - the command processor
stamps a heartbeat (NotifyWorldCompositorDraw) whenever a draw uses the
world/effects compositor pixel shader (ucode 17e5e4ac3e713245), which runs
every frame of 3D but never in the 2D front-end. The present timing hook then
sets a guest-vblank Hz override via the new GraphicsSystem hook. Only engages
under the unlock; ac6_dynamic_vblank=false restores the plain always-on unlock.
2026-07-09 22:38:29 +03:00
Dipshet 2c7ee7ea68 Fix cull the sun-flare's spurious second billboard (flare "square")
The sun lens-flare draw (VS ADF9AFC4C10921B9 emits two billboards:
V0-V3 = the visible glow quad, V4-V7 = a malformed quad that mis-renders
in the emulator as a faint  bright rectangle in the sky (the "square").

Cull it in the vertex shader using the translator's existing kill-vertex
mechanism: in CompleteVertexOrDomainShader, for this ucode hash
(plain host VS only), vertices with SV_VertexID >= ac6_flare_drop_index_min
(default 4) get a NaN output position, so the rasterizer discards the primitive.
The real glow (V0-V3) is untouched.

cvars: ac6_flare_drop_quad2 (bool, default true), ac6_flare_drop_index_min
(int32, default 4). Baked at shader translation.
2026-07-08 20:54:59 +03:00
sal063 b30cdf003d Merge pull request #18 from Dipshet/fix-deswizzle
Fix AC6 resolution scalar >1x mosaic and cloud/effects de-swizzle streaks
2026-07-08 08:56:09 +03:00
Dipshet bb4f4855ac Fix invisible missile/jet trails (stale vertex-buffer residency)
Missile/jet trail position history is a fixed guest-address ring, so its
vertex fetch constants never change and the command processor's
vertex_buffer_states_ address cache skipped RequestRange forever, the GPU
copy of the trail history froze at zero (trails invisible) while CPU memory was
correct.

Register a physical-memory invalidation callback that flags when the CPU writes
watched GPU-visible memory, and drop the cached vertex-buffer states at the next
draw so the ring's pages get re-uploaded. Also notify those callbacks from the
access-violation page-recovery path (xmemory), since a recovered page becomes
read-write and would otherwise never fault again to report the write. Gated by
ac6_fix_trails (default ON).
2026-07-08 02:14:02 +03:00
Dipshet 313fd236ee Fix AC6 >1x mosaic and cloud/effects de-swizzle streaks
Upscale mosaic. At draw-resolution scale > 1, AC6's deferred
EDRAM restore passes do integer pixel-address math on the PsParamGen
position. Its leftover sub-guest-pixel fraction scrambles into an 8x8
mosaic. Floor the param-gen position (param_gen_integer_guest_position)
and re-add the host sub-pixel at the fetch (param_gen_host_subpixel_restore).
Inert at 1x.

De-swizzle scramble. Some AC6 restore/resample passes
manually de-swizzle the Xenos EDRAM sub-tile layout of their source, which
is only correct on tiled data. The emulator detiles everything to linear,
so the de-swizzle always scrambles, streaking the cloud/effects pipeline.
For allowlisted shader hashes (ac6_neutralize_deswizzle_hashes) the sample
coordinate is replaced with the identity host-texel UV (a 1:1 copy).
2026-07-08 01:28:57 +03:00
salh c2e2fbfbbc Add 60fps cutscene clamp for in-engine cinematics
Suspend the FPS unlock while a demo-manager Exec (DD sub_82184460 / EM sub_821856F8) ticks, so the frame-locked IngameCinematics Sequencer plays at native ~30fps instead of double speed. Adds ac6_cutscene_clamp CVar (default on).
2026-06-15 16:03:43 +03:00
salh 0d7a528395 Fix codegen teardown and skip dispatch thread in tool mode 2026-05-30 11:56:35 +03:00
salh ead11217b7 Upgraded to RexGlue v0.8 and edited a bit of the Audio code 2026-05-29 22:17:02 +03:00
salh d3bb76be61 Integrate rexglue 0.7.5 and 0.7.6 improvements 2026-04-22 14:30:40 +03:00
salh 3d3579d290 Implement texture swap dump and replace pipeline 2026-04-22 01:06:53 +03:00
salh 701eb202eb Fix graphics diagnostics and restore default runtime settings 2026-04-20 23:13:53 +03:00
salh 26c84988e7 Add setup_and_build.bat script 2026-04-20 06:43:35 +03:00
salh 882d20f686 Refactor native graphics backend and fix build errors 2026-04-19 13:05:54 +03:00
salh 62717248d4 fix(gpu): default point-list expansion in VS for particles/trails
D3D12 previously assumed native point-list + geometry-shader expansion; that path can drop or rasterize points incorrectly (invisible missile trails). Default to the shared triangle-strip VS expansion path with an init-time CVar override.

Vulkan: default vulkan_force_expand_point_sprites_in_vs to true for the same behavior on non-D3D12 hosts.
Made-with: Cursor
2026-04-17 22:55:03 +03:00
salh a96d70d51a feat: add SDL audio backend for Linux runtime
Add a native SDL3 audio driver for non-Windows hosts and gate WASAPI to Windows-only builds, so Linux builds no longer depend on Windows headers while keeping runtime telemetry and queue behavior intact.

Made-with: Cursor
2026-04-17 22:39:55 +03:00
salh ddf7c28587 Initial barebones version 2026-04-17 20:09:41 +03:00