Files
goldeneye-pc-port/port/fast3d
James Dansereau 81054e4c98 D219: instrument a G_LIGHTING probe on explosion particle draws (#68)
* docs+probe(D219): new lead -- explosion.c never clears G_LIGHTING before particle draws

explosion.c's 15 particle DLs (assets/oddtextures.c globalDL_0x078..0x9a8,
all G_CC_INTERFERENCE+G_CC_MODULATEIA2) never get G_LIGHTING cleared by any
of explosion.c's own gSPClearGeometryMode calls. If lighting is left on from
a prior draw (e.g. a nearby lit character model), the port's vertex path
(gfx_pc.cpp:1301-1346) reinterprets the particle's authored RGBA tint as a
normal vector, turning SHADE into a scene-light color instead of red/orange
-- state-dependent, would explain "game-wide, live-play-only" exactly as
reported, and why the M-90 scripted repro (no nearby lit models) came back
clean.

Extends the existing D172 multitex-tri probe (GE_D172=1, already proven
reliable and uniquely keyed to this particle family) to also flag
geometry_mode & G_LIGHTING. Sanity-checked against the known-clean M-90
repro: still fires 40/40, all LIGHTING=off, matching the prior clean result
-- confirms the probe works without false-positiving.

Not a fix -- needs one live GE_D172=1 capture during a real explosion to
confirm or rule out before touching any rendering logic.

* fix: regenerate findings-index.csv via tools_pc/gen_findings_index.py

Hand-edited the CSV directly in the previous commit instead of running the
generator -- CI's "validate" job caught the drift.
2026-09-12 16:16:37 -04:00
..
2026-09-01 19:28:59 -04:00
2026-09-01 19:28:59 -04:00

fast3d — software RSP

A C++ interpreter that consumes the Gfx display list the game builds each frame and emits OpenGL calls, replacing the Nintendo 64's Reality Signal Processor and Reality Display Processor.

Origin and license

This code is adapted from the Perfect Dark PC port (port/fast3d/), which in turn is the Ship of Harkinian / libultraship fast3d, itself descended from sm64-port.

LICENSE.txt in this directory (MIT, © 2020 Emill, MaikelChan) covers that lineage. glad/ is generated by glad (© David Herberth, MIT). GoldenEye-specific changes in this directory are under the repository's top-level MIT license.

Files

File Role
gfx_pc.cpp the RSP interpreter — matrices, lights, fog, G_TRI1/G_TRI4, vtx
gfx_opengl.cpp OpenGL backend — shaders, textures, z-buffer, framebuffers
gfx_cc.cpp color-combiner equation -> GLSL shader
gfx_sdl2.cpp SDL2 window-manager backend
gfx_api.h public API (gfx_init / gfx_run / gfx_start_frame / ...)
gbiex.h GoldenEye custom GBI command definitions
glad/ OpenGL loader

GoldenEye-specific work

The PD fast3d already handles G_TRI4 (GoldenEye uses it too). The GE additions are the custom color-combiner / render modes and the handling of GE's GBI extension commands. rsp/graphics/gmain.s (GE's real RSP microcode, in the repo root) is the ground truth for the exact command encodings.