bevyengine / bevyengine/bevy

Why does `MaterialExtensionBindGroupData` require the bind group data to be `Copy`?

Open
#21,510 2 comments 0 reactions 0 assignees View on GitHub
A-Rendering C-Usability I-Regression S-Needs-Design
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 22h
Merged PRs (30d)
161

Description

## Bevy version and features

Bevy 0.17 and `ExtendedMaterial`

## What you did

Tried to updated [`bevy_shader_graph`](https://github.com/Neopallium/bevy_shader_graph) to support Bevy 0.17.

## What went wrong

The bind group data ([`ShaderGraph`](https://github.com/Neopallium/bevy_shader_graph/blob/33c0c2165e17db914427fbfb43f60a8a3a70c8f3/src/material.rs#L10)) can't be made `Copy`, since it contains two shader handles (vertex and fragment). The shader graph material extends the `StandardMaterial` using `ExtendedMaterial` in previous version of Bevy the bind group data didn't require `Copy`.

The bind group data is used to change the materials shaders at runtime (to support live editing of the shader).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.