Files
goldeneye-pc-port/port/fast3d
dolent 4705b0e4e8 fix: D430 -- stale per-texture anisotropy on recycled GL ids made watch text layout-dependent
gfx_opengl_set_sampler_parameters set GL_TEXTURE_MAX_ANISOTROPY only for
mipmapped samplers and never reset it. GL ids freed by
gfx_texture_cache_delete_range are recycled in unordered_map order (keyed by
texture address), so a non-mipmapped glyph could inherit a world texture's
4x anisotropy depending on the binary's data layout -> +-1-2 per channel on
the MP pause-menu text in couch 2P (frame 2400). Now always written (level
when mipmapped, 1 otherwise). #ifdef PORT, render-only.

Verified: couch 2P frames 2300-2500 fix vs fix+3KB array 0/21 differ
(before: 13/21); base vs fix: couch 2P 0/21, solo -level_09 f1800 and couch
4P f2400 byte-identical; netplay 2P SH identical (2 671 ticks).
Findings D430 + index row, porting note.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit ec5057f026259f35d4075833e89bf6fd0b6c467f)
2026-09-29 13:26:20 -07: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.