mkmaterial: Blender-related improvements - #965
Open
snacchus wants to merge 3 commits into
Open
Conversation
Dragorn421
reviewed
Aug 2, 2026
Dragorn421
left a comment
Contributor
There was a problem hiding this comment.
Looks good to me! Thanks!
Regarding the weirdness around blender.mode.const and blender.reg.fog.alpha both referring to the same value in fine (which it seems you handled correctly by erroring if both are set), one thing to note is that blender.mode.const currently has no effect (doesn't get exported into the material)
It may be a good opportunity to either get rid of blender.mode.const or actually implement it too
Contributor
Author
|
@Dragorn421 |
snacchus
force-pushed
the
mkmaterial-blender-missing-features
branch
from
August 2, 2026 16:30
9ab258f to
dc127d6
Compare
snacchus
marked this pull request as ready for review
August 2, 2026 16:36
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds the following new properties to mkmaterial:
blender.mode.raw: Similar tocombiner.*.raw, in that it allows to specify the exact blender formula (1-cycle or 2-cycle)BLEND_COLORandFOG_COLORRDP registers:blender.reg.blend.rgb: Corresponds to the RGB portion of theBLEND_COLORregister. Note that the alpha portion is not settable through a similar property, because this is already covered byrm.alpha_compare.blender.reg.fog.rgb: Corresponds to the RGB portion of theFOG_COLORregister.blender.reg.fog.alpha: Corresponds to the alpha portion of theFOG_COLORregister. This property must not be set ifblender.modeis set tomultiply_const, because the constant value also takes up the fog alpha.To make it possible to set RGB and alpha portions of RDP registers independently, some new API has been added at the rdpq-level:
rdpq_set_blend_color_rgbrdpq_set_blend_color_alphardpq_set_fog_color_rgbrdpq_set_fog_color_alphaThese functions are implemented by tracking the current register contents in DMEM (of the rdpq overlay).