Skip to content

Add ShadeMode to FRAPI#3937

Merged
modmuss50 merged 4 commits intoFabricMC:1.21from
PepperCode1:pr/1.21/frapi-shade-mode
Aug 4, 2024
Merged

Add ShadeMode to FRAPI#3937
modmuss50 merged 4 commits intoFabricMC:1.21from
PepperCode1:pr/1.21/frapi-shade-mode

Conversation

@PepperCode1
Copy link
Copy Markdown
Member

@PepperCode1 PepperCode1 commented Jul 13, 2024

ShadeMode is a material property and enum with two fields, ENHANCED and VANILLA. This material property is a hint to the renderer about how the quad is intended to be shaded, for example through ambient occlusion and diffuse shading. The renderer is free to ignore this hint. Similar functionality already existed in Indigo when using AoConfig.HYBRID, but a vanilla shade mode was hardcoded to always only be applied to quads output by the default implementation of emitBlockQuads. With a dedicated property exposed in the API, Indigo's code becomes cleaner and users have more control over this behavior.

- Update material documentation
- Use ShadeMode in VanillaModelEncoder
@Technici4n Technici4n self-assigned this Jul 13, 2024
- Rewrite header packing constants in EncodingFormat to match material packing constants
- Pass buffer Function to TerrainRenderContext instead of allocators and buffer map
- Restore functionality of ChunkRenderInfo#release
- Set captured terrain context to null after releasing it
- Bump mixin compatibility level to Java 21
- Remove unused AWs
- Fix RiverstoneUnbakedModel not calling setParents on models that it will bake
@PepperCode1 PepperCode1 marked this pull request as ready for review July 13, 2024 19:29
@modmuss50 modmuss50 added enhancement New feature or request module: renderer indigo Pull requests and issues related to Indigo's implementation of the rendering api labels Jul 14, 2024
Copy link
Copy Markdown
Member

@Technici4n Technici4n left a comment

Choose a reason for hiding this comment

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

I did not run the code, but I had a thorough look at every change. Looks very good.

@Technici4n Technici4n requested a review from modmuss50 July 25, 2024 21:36
@modmuss50 modmuss50 added the status: last call If you care, make yourself heard right away! label Jul 27, 2024
@modmuss50 modmuss50 added the status: merge me please Pull requests that are ready to merge label Aug 4, 2024
@modmuss50 modmuss50 merged commit c705a49 into FabricMC:1.21 Aug 4, 2024
PepperCode1 added a commit to PepperCode1/Indium that referenced this pull request Aug 15, 2024
- Copy changes from FabricMC/fabric-api#3937
- Copy Fabric impl VanillaModelEncoder class to avoid issues
- Initialize VanillaAoHelper statically as mods may create their own BlockModelRenderers
- Fix issues with buildscript
comp500 pushed a commit to comp500/Indium that referenced this pull request Aug 15, 2024
- Copy changes from FabricMC/fabric-api#3937
- Copy Fabric impl VanillaModelEncoder class to avoid issues
- Initialize VanillaAoHelper statically as mods may create their own BlockModelRenderers
- Fix issues with buildscript
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request module: renderer indigo Pull requests and issues related to Indigo's implementation of the rendering api status: last call If you care, make yourself heard right away! status: merge me please Pull requests that are ready to merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants