bevyengine / bevyengine/bevy

Allow cull_mode to be reflected so crates like bevy_materialize can set it

オープン
#20,249 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
A-Rendering C-Feature S-Needs-Design X-Uncontroversial
主要言語
Rust
スター
48.2k
フォーク
4.8k
平均マージ
3日 16時間
マージ済み PR(30日)
171

説明

## 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.

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

まず、cull_mode: Option として宣言されているマテリアルフィールドを見つけ、#[reflect(ignore, clone)] 属性がリフレクションとシリアライゼーションにどのような影響を与えるかを調べてください。TOML マテリアル設定で cull_mode をシリアライズおよびデシリアライズできることを確認し、issue で説明されている double_sided の動作を確認してください。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
rust
領域
computer-graphics, game-dev
issue の種類
機能追加
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
45/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。