Updated SVG filter (+auto-formatting)
This commit is contained in:
parent
5513e91773
commit
e4223ce02c
1 changed files with 51 additions and 51 deletions
|
|
@ -1,5 +1,6 @@
|
|||
<!doctype html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport"
|
||||
|
|
@ -7,6 +8,7 @@
|
|||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
<title>Document</title>
|
||||
</head>
|
||||
|
||||
<body style="height: 100vh;">
|
||||
|
||||
<div style="display: flex; flex-direction: column; gap: 1em; align-items: center">
|
||||
|
|
@ -23,43 +25,40 @@
|
|||
<div style="display: none;">
|
||||
<svg width="600" height="400" xmlns="http://www.w3.org/2000/svg">
|
||||
<filter id="filter0" color-interpolation-filters="linearRGB" filterUnits="objectBoundingBox"
|
||||
primitiveUnits="userSpaceOnUse">
|
||||
<feTurbulence type="turbulence" baseFrequency="0 0.1" numOctaves="1" result="noise"/>
|
||||
<feDisplacementMap in="SourceGraphic" in2="noise" result="distorted" scale="20"/>
|
||||
<feColorMatrix in="distorted" type="saturate" values="0" result="bw"/>
|
||||
primitiveUnits="objectBoundingBox">
|
||||
<feColorMatrix in="SourceGraphic" type="saturate" values="0" result="bw" />
|
||||
<feColorMatrix in="bw" type="luminanceToAlpha" result="ltoa" />
|
||||
<feComponentTransfer in="ltoa" result="ltoa_inverse">
|
||||
<feFuncA type="table" tableValues="0 1" />
|
||||
</feComponentTransfer>
|
||||
<feConvolveMatrix
|
||||
in="ltoa_inverse"
|
||||
result="edges"
|
||||
kernelMatrix="-2 0 -2
|
||||
0 0 0
|
||||
2 0 2"/>
|
||||
|
||||
<feComponentTransfer in="edges" result="pink">
|
||||
<feFuncR type="table" tableValues="1 0"/>
|
||||
<feFuncG type="table" tableValues="0 1"/>
|
||||
<feFuncB type="table" tableValues="0.1 0"/>
|
||||
<feConvolveMatrix in="ltoa_inverse" result="pink_edges" kernelMatrix="-4 0 4 0 0 0 -4 0 4" />
|
||||
<feComponentTransfer in="pink_edges" result="pink">
|
||||
<feFuncR type="table" tableValues="0.7765 0" />
|
||||
<feFuncG type="table" tableValues="0.1451 0" />
|
||||
<feFuncB type="table" tableValues="0.4902 0" />
|
||||
</feComponentTransfer>
|
||||
<feOffset in="pink" result="pink_shift" dx="-4" dy="0"/>
|
||||
<feOffset in="pink" result="pink_shift" dx="-0.002" />
|
||||
|
||||
<feComponentTransfer in="edges" result="cyan">
|
||||
<feFuncR type="table" tableValues="0.1 0"/>
|
||||
<feFuncG type="table" tableValues="1 0"/>
|
||||
<feFuncB type="table" tableValues="1 0"/>
|
||||
<feConvolveMatrix in="ltoa_inverse" result="cyan_edges" kernelMatrix="4 0 -4 0 0 0 4 0 -4" />
|
||||
<feComponentTransfer in="cyan_edges" result="cyan">
|
||||
<feFuncR type="table" tableValues="0.2941 0" />
|
||||
<feFuncG type="table" tableValues="0.6784 0" />
|
||||
<feFuncB type="table" tableValues="0.8471 0" />
|
||||
</feComponentTransfer>
|
||||
<feOffset in="cyan" result="cyan_shift" dx="4" dy="0"/>
|
||||
<feOffset in="cyan" result="cyan_shift" dx="0.002" />
|
||||
|
||||
<feMerge result="pink_cyan_shift">
|
||||
<feMergeNode in="distorted"/>
|
||||
<feMergeNode in="SourceGraphic" />
|
||||
<feMergeNode in="pink_shift" />
|
||||
<feMergeNode in="cyan_shift" />
|
||||
</feMerge>
|
||||
|
||||
<feTurbulence type="fractalNoise" baseFrequency="0 0.2" numOctaves="1" result="noise" />
|
||||
<feDisplacementMap in="pink_cyan_shift" in2="noise" result="distorted_raw" scale="0.02" />
|
||||
<feOffset in="distorted_raw" result="distorted" />
|
||||
</filter>
|
||||
|
||||
<rect fill="#000000" width="100%" height="100%"/>
|
||||
<g filter="url(#filter0)">
|
||||
<image href="" width="100%" height="100%" />
|
||||
</g>
|
||||
|
|
@ -75,4 +74,5 @@
|
|||
|
||||
<script src="generator.js" type="text/javascript"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue