aboutsummaryrefslogtreecommitdiff
path: root/src/main/resources/shaders/modules/utils.glsl
blob: 1616e8c9544b9df07543345c68642e249183d912 (plain) (blame)
1
2
3
4
float smin(float a, float b, float k) {
  float h = clamp(0.5 + 0.5 * (b - a) / k, 0.0, 1.0);
  return mix(b, a, h) - k * h * (1.0 - h);
}