Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ShadeMode to FRAPI #3937

Merged
merged 4 commits into from
Aug 4, 2024
Merged

Conversation

PepperCode1
Copy link
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 indigo Pull requests and issues related to Indigo's implementation of the rendering api labels Jul 14, 2024
Copy link
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.

@modmuss50 modmuss50 added the last call If you care, make yourself heard right away! label Jul 27, 2024
@modmuss50 modmuss50 added the 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
4 checks passed
PepperCode1 added a commit to PepperCode1/Indium that referenced this pull request Aug 15, 2024
- Copy changes from FabricMC/fabric#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#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 indigo Pull requests and issues related to Indigo's implementation of the rendering api last call If you care, make yourself heard right away! merge me please Pull requests that are ready to merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants