bevyengine / bevyengine/bevy

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

Đang mở
#20,249 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
A-Rendering C-Feature S-Needs-Design X-Uncontroversial
Ngôn ngữ chính
Rust
Star
48.2k
Fork
4.8k
Merge trung bình
3 ngày 16 giờ
Pull request đã merge (30 ngày)
171

Mô tả

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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Bắt đầu bằng cách xác định trường material được khai báo là cull_mode: Option và kiểm tra thuộc tính #[reflect(ignore, clone)] của nó ảnh hưởng như thế nào đến reflection và serialization. Xác nhận rằng cull_mode có thể được serialize và deserialize cho cấu hình material TOML, đồng thời kiểm tra hành vi của double_sided được mô tả trong issue.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
rust
Lĩnh vực
computer-graphics, game-dev
Loại issue
Tính năng
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
45/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.