-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
StandardMaterial doesn't support primitive restart #17794
Copy link
Copy link
Closed
Labels
A-RenderingDrawing game state to the screenDrawing game state to the screenC-UsabilityA targeted quality-of-life change that makes Bevy easier to useA targeted quality-of-life change that makes Bevy easier to useD-ModestA "normal" level of difficulty; suitable for simple features or challenging fixesA "normal" level of difficulty; suitable for simple features or challenging fixesS-Needs-DesignThis issue requires design work to think about how it would best be accomplishedThis issue requires design work to think about how it would best be accomplished
Metadata
Metadata
Assignees
Labels
A-RenderingDrawing game state to the screenDrawing game state to the screenC-UsabilityA targeted quality-of-life change that makes Bevy easier to useA targeted quality-of-life change that makes Bevy easier to useD-ModestA "normal" level of difficulty; suitable for simple features or challenging fixesA "normal" level of difficulty; suitable for simple features or challenging fixesS-Needs-DesignThis issue requires design work to think about how it would best be accomplishedThis issue requires design work to think about how it would best be accomplished
What problem does this solve or what need does it fill?
Triangle strip meshes require
PrimitiveState::strip_index_formatto be set for primitive restart to work. The current implementation ofStandardMaterialdoesn't do this.What solution would you like?
Add an extra field to
StandardMaterialof typeOption<IndexFormat>the value of which will be assigned toRenderPipelineDescriptor.primitive.strip_index_formatinMaterial::specializeOR
Add an extra field to
StandardMaterialof typePrimitiveState(and remove redundancies this creates) the value of which will be assigned toRenderPipelineDescriptor.primitiveinMaterial::specializeOR
Just unconditionally set
RenderPipelineDescriptor.primitive.strip_index_format = Some(IndexFormat::Uint32)inMaterial::specialize, this is less flexible but literally 1 line of code.What alternative(s) have you considered?
This can already be achieved with a
MaterialExtension: