Bevy-Rust-GPU / bevy-pbr-rust

rust-gpu port of bevy-pbr
Apache License 2.0
6 stars 1 forks source link

Formalize code structure vs WGSL implementation #8

Open Shfty opened 1 year ago

Shfty commented 1 year ago

Upgrading to bevy 0.10 demonstrated the need for some kind of formal mapping between WGSL and Rust implementations, for the sake of easily patching in changes via diff as they're made in upstream.

However, this is somewhat at odds with Rust organization idioms. Need to see if anything can be done, perhaps by splitting out impl blocks in cases where free functions have been made intrinsic over a related type.

LegNeato commented 9 months ago

@Shfty You might be interested in my draft PR to naga:

https://github.com/gfx-rs/wgpu/pull/5175/