Bevy-Rust-GPU / rust-gpu-sdf

Signed distance field library usable on both CPU and GPU.
Apache License 2.0
12 stars 1 forks source link

Support for supplemental geometry attributes #3

Closed Shfty closed 1 year ago

Shfty commented 1 year ago

Since SDF evaluation can be thought of as an analog for the vertex_position functionality of a vertex shader, supplemental attributes like normal, UV and tangent need to be supported.

This should be generalized in such a way that operators can also apply to attributes, allowing them to be transformed by each step of a composition chain.

Will need to think on an appropriate way to encode this.

Shfty commented 1 year ago

Should be able to implement this similar to the 2D generalization; use existing SignedDistanceField type structure, but add a generic parameter to discriminate over output type.

Shfty commented 1 year ago

Done, though implementations for each type still need to be created.