Allow cull_mode to be reflected so crates like bevy_materialize can set it
- Vorherrschende Sprache
- Rust
- Sterne
- 48.2k
- Forks
- 4.8k
- Ø Merge
- 3 T. 22 Std.
- Gemergte PRs (30 T.)
- 161
Beschreibung
## What problem does this solve or what need does it fill?
I am using bevy_materialize and i have trees whose leaves have a material defined in Toml.
```
type = "DoodadMaterial"
[material.base]
base_color_texture="/textures/material_overrides/nature/MeadowFoliageAtlas.png"
base_color = { LinearRgba = [0.33,0.55,0.22,1.0] }
perceptual_roughness= 0.9
uv_transform = { texture_subset_dimensions = { offset = [0,0], dimensions = [512, 512], base_texture_dimensions = [2048,2048] } }
double_sided= true
alpha_mode= {Mask = 0.5 }
[material.extension.custom_uniforms]
uv_input_scale= 1.0
```
At this point, the leaves have a cull_mode of BACK which absolutely sucks because it means my leaves dont show two-sided properly.
## What solution would you like?
```
#[reflect(ignore, clone)]
pub cull_mode: Option,
```
Please make cull_mode not be ignored by reflect, allow it to be serialized and deserialized. !
Alternatively, make cull_mode be forced to NONE when double_sided is true.
Beitragsleitfaden
Rechercherichtung
Start by locating the material field declared as cull_mode: Option and inspect how its #[reflect(ignore, clone)] attribute affects reflection and serialization. Confirm that cull_mode can be serialized and deserialized for the TOML material configuration, and check the double_sided behavior described in the issue.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- rust
- Bereich
- computer-graphics, game-dev
- Issue-Typ
- Feature
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 45/100