amethyst / amethyst/rendy

Generate vertex tangents for OBJ files

Đang mở
#266 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Rust
Star
812
Fork
94
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

Currently, `rendy::mesh::obj::load_from_obj()` does not generate vertex tangents when loading OBJ files. This prevents OBJ files from being used with Amethyst's RenderBundle's RenderPbr3D plugin, which needs vertex tangents.

I can implement this, but I want to determine if this is a desired feature, and if so, what tradeoffs are preferred before I start. There are 3 ways I see to implement this:

1. Just generate the tangents all the time
* \+ Just works
* \- Wastes CPU cycles if tangents aren't needed
2. Add a boolean parameter to specify if tangents are desired
* \- Breaks API
* \- Inflexible; tangents treated as more special than other vertex attributes
3. Make `load_from_obj` generic over a new trait and implement the trait for `Vec where A: AsVertex` and tuples of those types
* \+ Leaves room for future extension
* \- Breaks API
* \- Adds type complexity

My intuition is that 1 is the best option if OBJ loading time is considered negligible, and 3 is the best option otherwise.

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

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

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.