Skip to content

Voxel GBuffer and lighting stems - #98

Merged
CanReader merged 5 commits into
Advanced-Shadersfrom
feat/format-stems
Nov 9, 2026
Merged

CanReader merged 5 commits into
Advanced-Shadersfrom
feat/format-stems

Conversation

@CanReader

Copy link
Copy Markdown
Owner

Moves SleakCraft onto the engine's per-format stems and lighting override (SleakEngine#233), so the BSL lighting work can live in game shaders.

  • The voxel format registers gbuffer_voxel as its GBuffer fragment stem; it writes RT3 with the voxel shading model (craft/shading_models.glsl).
  • Game::Initialize sets lighting_voxel as the deferred lighting shader. Voxel pixels go through the voxel path; everything else (block effects, any engine material) goes through the engine's default lighting.
  • OpenGL gets matching _gl programs per pass; the old voxel-layout gbuffer_gl.vert becomes gbuffer_voxel_gl.vert, so the engine's default-layout GBuffer program is the global one again and block effects draw correctly on GL.

No visible change yet: Vulkan and OpenGL captures of the four fixed views are byte-identical. A throwaway patch painting the voxel shading model magenta proved RT3 reaches the lighting pass on both backends. The voxel lighting is a straight port of today's lighting for now; the BSL composition replaces it in the next change.

The Engine pin moves to the engine merge commit once SleakEngine#233 lands.

@CanReader
CanReader merged commit 63058e2 into Advanced-Shaders Nov 9, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant