// METRICS
- Links
- GitHub
- Language
- HLSL
- Type
- Shader
The long-form summary shown on the Shaders page card (cut off after four lines) and at the top of the shader page.
Breakdown
The body uses the same Markdown blocks as blog posts — see content/blogs/example-blog.md.
How it works
A noise texture is compared against a cutoff value; pixels below the cutoff are clipped and a thin colored edge is drawn where the two meet.
float noise = tex2D(_NoiseTex, i.uv).r;
clip(noise - _Cutoff);
float edge = 1 - smoothstep(0.0, _EdgeWidth, noise - _Cutoff);
col.rgb = lerp(col.rgb, _EdgeColor.rgb, edge);
Fragment shader excerpt.