glsl-combine-smooth
Smoothly combine two signed distance fields. A useful alternative to glsl-smooth-min that provides you with an explicit radius of influence and avoids distorting the distance fields.
This technique was derived from a great talk at NVScene by Johann Korndörfer.
Usage
float combine(float d1, float d2, float radius)
Given two distances d1
and d2
, smoothly merge them together
within the supplied radius
.
uniform float iGlobalTime;# combine = require('glsl-combine-smooth')# box = require('glsl-sdf-box')vec2
Contributing
See stackgl/contributing for details.
License
MIT. See LICENSE.md for details.