Skip to content

Ambient occlusion flag not respected in AltModelBlockRenderer implementation. #3594

@Builderb0y

Description

@Builderb0y

Bug Description

The AltModelBlockRenderer that Sodium returns from Renderer.get().altModelBlockRenderer() seems to not respect the ambientOcclusion parameter passed in, and unconditionally emits quads which are shaded by cardinal direction, but lack any form of ambient occlusion baked into the vertex colors. This behavior differs from Indigo's AltModelBlockRenderer implementation, which bakes the AO into the vertex colors the way I would expect it to.

Screenshot when using Indigo:
Image

Screenshot when using Sodium:
Image

This issue affects sodium-fabric-0.8.9+mc26.1.1.jar, and possibly earlier versions that I didn't test.

Reproduction Steps

The above screenshots were from my LOD terrain renderer, but a more minimal stand-alone class which demonstrates this issue can be found here: AOTest.java

Upon calling capture(), it will create a Mesh containing the geometry of the blocks in an 11x11x11 block area centered around the player, and start rendering it 20 blocks above the player's location at the time of capturing. The mesh can then be inspected visually to see whether or not it has the correct AO everywhere.

Log File

latest.log

Crash Report

crash-2026-04-12_23.59.07-client.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions