Repository navigation
[Shaders] fix: a stage composition is supplied at the root, and the voxel marchers own their samplers slot - #3449
Merged
Conversation
…e voxel marchers own their samplers slot A shader declaring a stage member is promoted to the root, so a value supplied for its stage compose at a nested composition path had nothing to attach to (stride3d#3423). The mixer now reports it instead of failing later with a missing composition. Stride.Voxels supplied AttributeSamplers from LightVoxelEffect, which is itself composed under environmentLights[i]. The slot moves to the marchers, the only shaders that read it: each marcher composes the samplers it is given, and the renderers bind the attribute once per marcher path. MarchAttributesEffect had no user and goes with the key it served. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Contributor
|
🤖 Draft PR — automatic CI is skipped to save runner minutes.
|
Nicogo1705
marked this pull request as ready for review
September 18, 2026 12:15
3 of 4 tasks
…value from the root
…erer no longer knows the march set layout
Member
|
Thanks, the Voxels rewrite LGTM. I pushed two commits on top, please pull before continuing.
Shader tests pass (849). I did not run the voxel GI demo, could you check it once? |
Contributor
Author
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.
PR Details
A shader declaring a stage member is promoted to the root of the effect. When such a shader declares a
stage compose, a value supplied for it at a nested composition path had nothing to attach to, and the merge failed later with a missing composition (#3374 on beta7).stage composesupplied from a nested composition: which rule for the mixer? #3423. Astage composecan be declared anywhere, but its value can only be supplied at the root. Supplying it from a nested node is reported with the slot, the declaring shader and the path it was supplied at. The composition evaluation now runs under the same error handling as the merge, so it lands in the log like the other mixer errors.AttributeSamplerswas supplied byLightVoxelEffect, itself composed underenvironmentLights[i]. The slot moves to the marchers, the only shaders that read it:MarchAttributeslosesstage,LightVoxelShaderandVoxelVisualizationViewShaderno longer inherit it, andIVoxelMarchMethod/IVoxelMarchSet.GetMarchingShadertake the samplers to compose.LightVoxelRendererandVoxelVisualizationViewbind the attribute once per marcher path.MarchAttributesEffecthad no user and goes with the key it served.StageCompositionSuppliedFromNestedIsReported.Verified on Direct3D 11: the shader test suite (846), the voxel GI demo (Cornell box, bounce and cones fine), and the MyGame2 project attached to #3374, which gets past the mixer.
Note: MyGame2 then hits a separate compiler gap,
SV_Coverageas a fragment input is not mapped inBuiltinProcessor(used byVoxelAttributeDirectionalCoverageShader). That one is not in this PR; it will come as its own fix.Related Issue
Fixes #3423. Part of #3374.
Types of changes
GetMarchingShadergains a parameter on the two marcher interfaces.Checklist