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

Codify operator arity #8

Closed Shfty closed 1 year ago

Shfty commented 1 year ago

Currently, all SDF operators are assumed to be unary, and those that are binary work around this by composing the second parameter inside the operator struct.

This is not ideal, since it introduces extra type parameters on said structs, which has a knock-on effect of making type-level paths more clunky for the affected types.

Need to either generalize SignedDistanceOperator's parameter input, or split it into per-arity traits.

Shfty commented 1 year ago

It transpires that operator input was already sufficiently general; all it needed was an implementation.

In light of this, all non-shape field transformations have been refactored as operators.