Fix ImGuiMC, Light Buffer Startup, NVIDIA Shader Issues, and Sodium 0.8.13 Issues#142
Merged
Ocelot5836 merged 3 commits intoMay 21, 2026
Conversation
added 2 commits
May 21, 2026 01:37
This branch keeps the light changes focused on buffer correctness and instance upload cost. It does not change the voxel shadow grid or the point/area light fragment shaders. ## ImGuiMC Renderer Fix - Updated ImGuiMC to `1.2.4`. - Added Fabric and NeoForge compatibility mixins for `foundry.imgui.impl.renderer.v0.ImGuiRendererGL33`. - Fixed ImGuiMC 1.2.x shader compilation on NVIDIA/OpenGL 3.3 by replacing the invalid GLSL 130 version line that included the `core` profile suffix. - This prevents ImGui from failing to compile its vertex/fragment shaders during startup. ## Sodium 0.8.12 Compatibility - Updated the Sodium dependency to `0.8.12-alpha.3+mc1.21.1`. - Adjusted Fabric and NeoForge Sodium compat to use Sodium's current `RenderSectionManager` rebuild scheduling path. ## Light Instance Buffer Optimization - Added a lightweight revision counter to `LightData`. - Point and area light setters now mark their light data dirty when position, color, brightness, size, radius, angle, distance, orientation, or occlusion changes. - `InstancedLightRenderer` now tracks the previous visible-light order and each light's uploaded revision. - If the visible light order changes, or the GL instance buffer is resized, Veil still uploads the full visible light buffer. - If the visible light order is unchanged, only lights whose data revision changed are uploaded with `glBufferSubData`. - This keeps the current rendering model intact while avoiding full instance-buffer uploads for static lights. ## Indirect Sphere Compute Shader Fix - Fixed NVIDIA GLSL compile errors in `veil:light/indirect_sphere`. - `gl_GlobalInvocationID` is unsigned, while Veil's light buffer offsets and command buffer indexes are signed integers. - The shader now converts the invocation ID math once and uses `int` for buffer indexing, avoiding implicit `int` to `uint` casts that NVIDIA rejects.
Ocelot5836
requested changes
May 21, 2026
Ocelot5836
approved these changes
May 21, 2026
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 branch keeps the light changes focused on buffer correctness and instance upload cost. It does not change the voxel shadow grid or the point/area light fragment shaders.
ImGuiMC Renderer Fix
1.2.4.foundry.imgui.impl.renderer.v0.ImGuiRendererGL33.coreprofile suffix.Sodium 0.8.12 Compatibility
0.8.12-alpha.3+mc1.21.1.RenderSectionManagerrebuild scheduling path.Light Instance Buffer Optimization
LightData.InstancedLightRenderernow tracks the previous visible-light order and each light's uploaded revision.glBufferSubData.Indirect Sphere Compute Shader Fix
veil:light/indirect_sphere.gl_GlobalInvocationIDis unsigned, while Veil's light buffer offsets and command buffer indexes are signed integers.intfor buffer indexing, avoiding implicitinttouintcasts that NVIDIA rejects.