Rubidium

Rubidium

36M Downloads

[1.16.5-1.20.1] Rubidium ignores per-vertex block lighting data

soir20 opened this issue ยท 3 comments

commented

I'm the author of an emissive textures mod for Forge that uses vanilla Minecraft's per-vertex lighting to render emissive block quads. Specifically, every 7th element of a BakedQuad's array of vertex data contains a light value for that vertex.

In the vanilla VertexConsumer#putBulkData(), Minecraft handles both the vertex lighting data and the face light value. However, Rubidium's block rendering ignores the vertex lighting data (for example). Rubidium only handles lighting for the entire face that is based on block light and sky light.

This means emissive overlay quads generated by my mod aren't rendered with full brightness when Rubidium is present. See the screenshots provided by a user: MoreMcmeta/emissive-plugin#2. (I've verified that the overlay quads are rendered in 1.19.2+ versions, but the lighting is wrong.)

Since Rubidium overwrites much of the vanilla block rendering code, I don't see a fix for this incompatibility on my end that wouldn't be invasive and likely cause issues with other mods. Is this something that Rubidium can/is willing to fix?

The issue appears to be present in all Minecraft versions supported by Rubidium, 1.16.5-1.20.1. I assume it's also a problem with Sodium, though it doesn't cause much of an issue with the Fabric version of my mod because I require the Fabric rendering API and Indium. Hence, I'm reporting it here first.

EDIT: I've found that this is a feature that Forge patches into the vanilla VertexConsumer (see applyBakedLighting() called inside putBulkData()). Hence, this isn't relevant for Sodium.

commented

This might be related to #56, though I'm not familiar with CTM's implementation.

commented

dont bother opening issues here, 0 chance any of this will be fixed by rubidium itself
if the problem also exists in the mod this is forked from (sodium) you can take a look there and ask around

commented

This bug will probably be fixed in a future Rubidium/Sodium update.