yutannihilation / wgpugd

A WebGPU Graphics Device for R
https://yutannihilation.github.io/wgpugd/
Other
45 stars 3 forks source link

Narrow SDF #20

Open yutannihilation opened 2 years ago

yutannihilation commented 2 years ago

Currently, this vertex shader includes the whole screen, but only the area around circle is needed. Not sure about the performance gain by this, though.

https://github.com/yutannihilation/wgpugd/blob/6aa3d001198e8eff54840d166b7afcd55132269a/src/rust/src/shaders/sdf_shape.wgsl#L35-L51