You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
Just generate the tangents all the time
+ Just works
- Wastes CPU cycles if tangents aren't needed
Add a boolean parameter to specify if tangents are desired
- Breaks API
- Inflexible; tangents treated as more special than other vertex attributes
Make load_from_obj generic over a new trait and implement the trait for Vec<A> 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.
The text was updated successfully, but these errors were encountered:
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:
load_from_obj
generic over a new trait and implement the trait forVec<A> where A: AsVertex
and tuples of those typesMy intuition is that 1 is the best option if OBJ loading time is considered negligible, and 3 is the best option otherwise.
The text was updated successfully, but these errors were encountered: