6 lines
200 B
GLSL
6 lines
200 B
GLSL
float mx_aastep(float threshold, float value)
|
|
{
|
|
float afwidth = length(vec2(dFdx(value), dFdy(value))) * 0.70710678118654757;
|
|
return smoothstep(threshold-afwidth, threshold+afwidth, value);
|
|
}
|