samp.directory
← Skrypty i biblioteki

xKumorio/ModernDisplay

Native D3D9-to-D3D11 DXGI Flip Model renderer, NVIDIA Reflex, Hi-Z culling, and Trilogy graphics pipeline (CSM, GTAO, SSGI, SSR, PBR) for GTA:SA & SA-MP

Plugin★ 7zaktualizowano wczorajBrak licencjiC++
Otwórz na GitHubie

To repozytorium nie ma pliku licencji. Jest publiczne do odczytu, ale samo to nie daje pozwolenia na ponowne użycie.

Wypróbuj w kompilatorze Pawn →

Dodaje jej pliki include, razem z bibliotekami, od których zależy, do kompilatora Pawn w twojej przeglądarce, gotowe do dołączenia w skrypcie.

README.md

ModernDisplay 3.0 (Trilogy Engine)

English | Русский

Native D3D9Ex -> D3D11 DXGI Flip Model rendering backend for GTA: San Andreas 1.0 US, SA-MP (0.3.7 R1-R5, 0.3.DL), and open.mp.

Removes 2004 DirectX 9 bottlenecks (doubles FPS in player crowds and cuts input lag via NVIDIA Reflex / ULL-DX11) and adds a modern 3D graphics pipeline on top of the stock engine without touching 2D chat, nametags, dialogs, or HUD.

Watch the 1440p60 showcase video on YouTube

By default (without an .ini file) the plugin does not change graphics at all - only FPS optimizations, instant Alt-Tab, and low-latency pacing are active. Press F11 (or type /md) in-game to open the settings menu and switch to the Trilogy Remaster preset anytime.


Performance

Measured on an identical deterministic 6-location route (Pershing Square, Grove Street, Downtown, Vinewood, Rainy Avenue, Las Venturas), 1920x1080, SA-MP 0.3.7-R1, uncapped FPS, RTX 5060 Ti:

ModeAvg FPS1% lowFrame timeGain
Stock DirectX 92541723.94 msbaseline
ModernDisplay (no visual FX)5352791.87 ms+111%
ModernDisplay 2.0 Ultra (1.50x SSAA)4252812.36 ms+67%

Where the speedup comes from:

  • GPU->CPU Hi-Z Occlusion Culling (hiz_cull=1) - 7-level conservative depth pyramid (128x72, async staging ring) culls 35-45% of occluded buildings, objects, vehicles, peds, and custom RpAtomic meshes before RenderWare/D3D11 submission (cutting draw calls in half in dense city areas and player crowds).
  • D3D11 DXGI Flip Model (FLIP_DISCARD + Allow Tearing) + Async Present - moves presentation off the game thread so the CPU never stalls on Present().
  • SSE2 State Cache - caches D3D9 states, matrices, lights, and shader constants, eliminating tens of thousands of redundant RenderWare/SA-MP driver calls per second.
  • Smart Managed Textures - dirty-rectangle updates and skipping D3DLOCK_READONLY uploads (removes chat and 3D-text microstutters).
  • Async GPU Mipmaps + DrawPrimitiveUP Batching - zero hitching during texture streaming.
  • NVIDIA Reflex (Boost) / Universal DX11 Low-Latency - hardware frame markers on NVIDIA, MaxLatency=1 + pre-input sync on AMD and Intel.
  • Instant Alt-Tab & F8 Screenshots - zero DeviceLost on minimize; F8 encodes PNG in <1 ms on a background thread.

Visual Effects (Before / After)

All effects run strictly on the 3D mask and Z-buffer - chat, nametags, dialogs, radar, and third-party ImGui overlays remain 100% untouched.

1. Golden Hour Downtown - CSM Shadows, ClearCoat PBR & 360 Cubemap

3-cascade dynamic sun shadows, hardware 4x MSAA, GTAO + SSGI, and live 360-degree cubemap reflections on vehicles.

Stock GTA:SAModernDisplay 3.0 (Trilogy Remaster)

2. Grove Street - Natural Sky, Contact Shadows & Car Reflections

Classic Los Santos without flat cyan skies or jagged edges, preserving the original atmosphere.

Stock GTA:SAModernDisplay 3.0 (Trilogy Remaster)

3. Vinewood Sunset - Volumetric Clouds, Aerial Fog & ACES Tonemapping

Smoothly blends GTA SA's hard draw-distance edge and distant LODs into volumetric clouds and warm sunset haze (automatically off in interiors).

Stock GTA:SAModernDisplay 3.0 (Trilogy Remaster)

4. Wet Roads, World-Space SSR & 3D Volumetric Rain

Reads CWeather::Rain and CWeather::WetRoads directly from game memory - wet roads and puddles reflect lamps, signs, and headlights with animated rain ripples and 3D rain streaks.

Stock GTA:SAModernDisplay 3.0 (Trilogy Remaster)

5. Night City - Las Venturas Strip (SSR + HDR Bloom + Neon Puddles)

5-level HDR Bloom and wet-asphalt reflections apply exclusively to bright 3D world lights without bleeding onto UI.

Stock GTA:SAModernDisplay 3.0 (Trilogy Remaster)

6. Reworked Water & Reflections (Santa Maria Beach)

Preserves shallow water texture while adding depth absorption, caustics, shore foam, and crisp pier reflections.

Stock GTA:SAModernDisplay 3.0 (Trilogy Remaster)

Installation

  • OS: Windows 10 / Windows 11
  • Game: GTA:SA 1.0 US (Singleplayer or SA-MP 0.3.7 R1 / R2 / R3-1 / R4 / R5-1 / 0.3.DL-R1)
  1. Download ModernDisplay.asi from Releases.
  2. Drop ModernDisplay.asi into your GTA:SA root folder next to gta_sa.exe (or into scripts/).
    • Performance-only (stock look): nothing else needed - the plugin auto-generates a clean ModernDisplay.ini.
    • English .ini & chat messages: set english=1 under [Language] at the top of ModernDisplay.ini (or type /md lang en in-game) - all .ini comments rewrite to English automatically while keeping your settings.
    • Visual effects: type /md on in-game or enable effects in ModernDisplay.ini.
  3. Remove any third-party d3d9.dll (DXVK, ENB, ReShade) from the game folder to avoid conflicts.

In-Game Commands (SA-MP)

Every setting updates live without restarting and saves automatically to ModernDisplay.ini.

Command / HotkeyAction
/md off / /md onInstantly disable all visual FX (keep FPS boost) / restore your preset
/md lang <ru|en>Switch language and rewrite ModernDisplay.ini comments
/md compare (Alt+F9)Live Before/After split-screen wipe (fixed, auto, mouse, off)
/md hud (Alt+F10)Toggle minimal telemetry HUD (FPS, frametime, Reflex latency, iFlip)
Alt+EnterInstant windowed / borderless fullscreen toggle
/md ao <0..3>XeGTAO quality (0 off, 1 low, 2 med, 3 high)
/md aa <0..3>Anti-aliasing (1 SMAA Med, 2 SMAA High, 3 SMAA T2x)
/md ssr <0..2>Water & wet road reflections (1 med, 2 high)
/md rainfx <0|1>Rain puddle reflections & ripples (with SSR) + rain FX
/md raindrops <0|1>Screen lens rain droplets (when rain_fx=1)
/md rainlight <0|1>Time-of-day rain lighting for weather IDs 8 & 16 (independent of SSR)
/md spray <0|1|2>Wheel water spray (0 off, 1 original, 2 reduced in standing water)
/md gi <0..100>SSGI global illumination strength
/md bloom <0..100>3D HDR Bloom strength (/md flare 0|1 for anamorphic flares)
/md fog <0..100>Volumetric Aerial Perspective fog strength
/md tonemap <0|1|2>Tonemapping (0 off, 1 ACES Filmic, 2 AgX Punchy)
/md ssaa <1.0..2.0>Internal SSAA supersampling + Catmull-Rom downscale
/md fps <0|auto|20..1000>Precision FPS cap (auto = monitor Hz - 3 for G-Sync/FreeSync)
/md reflex <off|on|boost>NVIDIA Reflex / ULL-DX11 low-latency mode
/md lut <name|list|off>Load a .cube 3D LUT from ModernDisplay\luts\

ssgi_display_res=1 evaluates SSGI at display resolution under SSAA. compressed_mip_cache=1 caches compressed DXT mip levels in ModernDisplay/mip-cache-v2. direct_render_targets=1 enables experimental shared render targets with async present (when MSAA=0 and D3DSWAPEFFECT_DISCARD). All three are off by default.


Building from Source

Requires Visual Studio 2022 Build Tools with C++ x86 workload (Windows 10/11 SDK):

build.bat

Output binary: build\ModernDisplay.asi.


Links

asi-plugincppcsmd3d11d3d9directx11dxgigame-moddinggraphics-programminggta-sagta-san-andreasgtaogtasahlslnvidia-reflexopen-mprendering-enginesampssgissr

Ta strona jest zbudowana z tego, co GitHub publikuje o repozytorium. samp.directory nie hostuje kodu. Zgłoś problem z tym wpisem

xKumorio/ModernDisplay: Plugin SA-MP | samp.directory