Skip to content

Instantly share code, notes, and snippets.

@ganglio
Forked from LeaVerou/dabblet.css
Created July 30, 2012 18:47
Show Gist options
  • Save ganglio/3209102 to your computer and use it in GitHub Desktop.
Save ganglio/3209102 to your computer and use it in GitHub Desktop.
SVG: fractalNoise (Warning: Might be slow!)
Display the source blob
Display the rendered blob
Raw
<!-- Meant to be used as a CSS background through an external file or URLencoded data URI -->
<svg width="100%" height="100%">
<defs>
<filter id="noise">
<feTurbulence type="fractalNoise" baseFrequency=".7" />
<feComponentTransfer>
<feFuncR type="linear" slope="2" intercept="-.5"/>
<feFuncG type="linear" slope="2" intercept="-.5"/>
<feFuncB type="linear" slope="2" intercept="-.5"/>
</feComponentTransfer>
<feColorMatrix type="saturate" values="0"/>
<feComponentTransfer>
<feFuncA type="table" tableValues="0 .3"/>
</feComponentTransfer>
</filter>
</defs>
<rect width="100%" height="100%" filter="url(#noise)" />
</svg>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment