Gfx GX Fn GXInitLightAttn - wowjinxy/libPorpoise GitHub Wiki
GXInitLightAttn
- Category:
Lighting
- Matrix Status:
Implemented
- Matrix Notes: Verified SDK-parity coefficient writes for angular (
a0..a2) and distance (k0..k2) attenuation fields in the light object.
- Matrix Link: Gfx-GX-API-Matrix
Official SDK (Reference)
- Manual root:
reference/rvlsdk/man/en_US/gx
- Primary SDK source area:
demos/PikminDemo/src/gx (GC-style Dolphin GX source)
- Notes:
libPorpoise Implementation
- Runtime implementation area:
src/gx
- Public API surface:
include/dolphin/gx
- Notes:
SDK vs Porpoise Diff
- Signature parity:
- Behavioral parity:
-
Known divergence:
Validation Checklist
Working Notes
- Docs checked against
reference/man/gfx/gx/Lighting/GXInitLightAttn.html and SDK source in reference/gx/GXLight.c.
- SDK behavior:
- Writes six attenuation coefficients directly into the light object (
a[0..2], k[0..2]).
- No clamping or normalization of coefficient values is applied in this API.
- Runtime behavior in
src/gx/pc_gx.c:
GXInitLightAttn writes a0/a1/a2/k0/k1/k2 directly to internal light-object fields with matching ordering.
- Result:
- Function semantics match SDK for coefficient initialization.