Skip to content

F3DEX3: Added support for advanced lighting#2974

Merged
gonetz merged 1 commit into
gonetz:masterfrom
aglab2:ex3-adv-lighting
Jul 3, 2026
Merged

F3DEX3: Added support for advanced lighting#2974
gonetz merged 1 commit into
gonetz:masterfrom
aglab2:ex3-adv-lighting

Conversation

@aglab2

@aglab2 aglab2 commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

This PR implements advanced lighting path in F3DEX3 that allows to render "island test scene" featured in https://www.youtube.com/watch?v=xnAGq_KJbYk using HLE. It also includes most of the "useful" missing features from F3DEX3 that were unimplemented previously.

image

@gonetz gonetz left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Large number of changes, but the new code looks clean.
Good work! I have just a few nitpicks.

Comment thread src/RSP.cpp Outdated
gSP.attrOffset = { 0x0100, -0x0100 };
gSP.fresnel = {};
gSP.alphaCompareCull = {};
gSP.lookat.xyz[0][Y] = gSP.lookat.xyz[1][X] = 1.0f;

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

duplication of the line above.

Comment thread src/uCodes/F3DEX3.cpp Outdated
const u32 ofs = _SHIFTR(w0, 8, 8) * 8;
const u32 len = (1 + _SHIFTR(w0, 19, 5)) * 8;
for (u32 i = 0; i < len; i += 4)
for (int i = 0; i < len; i += 4)

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why int if len is u32? signed/unsigned mismatch

@aglab2 aglab2 force-pushed the ex3-adv-lighting branch from 4c2cf3c to 4b3fa48 Compare July 3, 2026 00:49
@aglab2

aglab2 commented Jul 3, 2026

Copy link
Copy Markdown
Contributor Author

Fixed the comments. It is a relatively large change indeed, mostly because ltadv features path in F3DEX3 is intertwined. It is easier to verify that GLideN64 code matched RSP listing without splitting it https://github.com/HackerN64/F3DEX3/blob/main/f3dex3.s#L3505

@gonetz gonetz merged commit cee9f9c into gonetz:master Jul 3, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants