Skip to content

g3d: Implement ResMaterial and ResShaderParam - #88

Closed
arayaphong wants to merge 1 commit into
open-ead:masterfrom
arayaphong:implement/g3d-res-material
Closed

arayaphong wants to merge 1 commit into
open-ead:masterfrom
arayaphong:implement/g3d-res-material

Conversation

@arayaphong

@arayaphong arayaphong commented Sep 25, 2026 •

Copy link
Copy Markdown

Implements nn::g3d::ResMaterial and nn::g3d::ResShaderParam (NintendoWare/g3d/ResMaterial.cpp) for OdysseyDecomp, tracked in MonsterDruide1/OdysseyDecompTracker#3736.

  • 23 of the 24 functions in ResMaterial.o match.
  • ResShaderParam::ConvertSrt3dCallback is non-matching (SIMD scheduling and register allocation), marked NON_MATCHING with a decomp.me link: https://decomp.me/scratch/lkHXp
  • Adds the needed declarations to nn/g3d/ResMaterial.h, nn/gfx/gfx_Sampler.h and nn/util/util_Arithmetic.h, and adds the source to CMakeLists.txt.

I suspect the original had a different code structure, probably Nintendo's nn::util inline helpers, and just reordering lines won't reach 100%.

Formatted with clang-format 14 (as used by this repo's lint workflow).


This change is Reviewable

@MonsterDruide1

Copy link
Copy Markdown
Member

Please file this PR against https://github.com/open-ead/nnware instead - we are planning to migrate from this repo to that one over the next weeks/months. No changes are accepted on this repo anymore. Port your changes over, then simply close this one.

@arayaphong
arayaphong force-pushed the implement/g3d-res-material branch from 3aa2f46 to b2fdfd2 Compare September 25, 2026 11:28
@arayaphong

Copy link
Copy Markdown
Author

Closing as requested - porting this to open-ead/nnware instead.

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