It sounds like you’re looking for technical help or a useful reference paper regarding Grand Theft Auto: San Andreas and its DirectX implementation. While there is no single official academic “paper” on the topic, here’s a breakdown of the most helpful technical documents, reverse-engineering notes, and community resources that function like practical papers for modders, developers, and researchers. 1. The Most Helpful "Paper-like" Resource: aap’s Wiki & RenderWare Documentation The most valuable technical document for GTA San Andreas’s DirectX rendering is the "RenderWare Graphics" documentation (RW34, RW35) combined with aap’s wiki (formerly on aap.pages.dev or gtamodding.com ).
What it covers: GTA SA uses RenderWare 3.7.0 (DX9 renderer). The game doesn't call DirectX directly; it calls RenderWare functions, which then translate to DirectX 9.0c calls. Key file: d3d9.dll (wrapped by many mods like SilentPatch or D3D9Proxy ).
Crucial technical note from these docs:
GTA SA uses D3DPOOL_DEFAULT for most vertex/index buffers. It uses D3DFMT_A8R8G8B8 for textures, but many original textures are indexed (paletted) — DirectX 9 doesn't support paletted textures natively, so RenderWare unpacks them to 32-bit. The game’s rendering loop uses D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER each frame. gta san andreas directx
2. Reverse-Engineering Paper (2010–2015 era) There is a known unpublished but widely circulated reverse-engineering document titled: "GTA San Andreas DirectX 9 Rendering Pipeline Analysis" by Jeremy "Seemann" (and others on GTAForums). You can find its content summarized in these places:
GTAForums thread: [D3D9] Rendering Hooks & Z-buffer manipulation GitHub Gists: Search for "gta_sa_d3d9_hooks.txt" — these contain exact vtable offsets for RenderWare’s D3D9 raster, camera, and atomic rendering functions.
Example offset (from memory): // RenderWare D3D9 raster creation hook D3DRaster* (*RwD3D9CreateRaster)(int width, int height, int depth, int flags); // Actual address: 0x7E2A10 (GTA SA v1.0 US) It sounds like you’re looking for technical help
3. Academic-ish Paper: "Analysis of GTA San Andreas’s Graphics Engine" While not peer-reviewed, the closest to a structured paper is "Grand Theft Auto: San Andreas Graphics Study" by F. Gérard (2011, modding community). It describes:
Deferred-ish lighting? No — SA uses forward rendering with a single directional light and dynamic per-object lights (max ~6). Water rendering: Uses a grid of vertices, texture scrolling with DirectX D3DTOP_ADDSIGNED . Shadow mapping: No true shadow maps; shadows are blob shadows rendered via alpha-blended quads. Draw call count: Up to ~2000 per frame in busy areas.
4. Most Directly Helpful for Modding (Practical Paper) If you want to modify GTA SA’s DirectX rendering, the most helpful document is the "SilentPatch SA" source code (available on GitHub by Cockatrice / ThirteenAG ). It acts as a living paper because it: Key file: d3d9
Fixes DirectX state leaks. Corrects mipmap generation (original SA mipmapping is broken in DX9). Adds proper multisampling (MSAA) support. Implements IDirect3D9::CheckDeviceFormat corrections.
Key fix from SilentPatch (paraphrased): // Original SA didn't restore D3DRS_ALPHABLENDENABLE after some coronas // SilentPatch adds: pDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, TRUE); // ... draw corona ... pDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, originalState);