From a2852229ccf5d5905331c492de6db2d38a3c67cd Mon Sep 17 00:00:00 2001 From: greggman Date: Wed, 4 Oct 2023 00:25:00 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20=20@=206ef6e?= =?UTF-8?q?d21782888b9aee2642bb09aa312581e2bd8=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 404.html | 4 ++-- .../samples/A-buffer.json | 0 .../samples/animometer.json | 0 .../samples/cameras.json | 0 .../samples/computeBoids.json | 0 .../samples/cornell.json | 0 .../samples/cubemap.json | 0 .../samples/deferredRendering.json | 0 .../samples/fractalCube.json | 0 .../samples/gameOfLife.json | 0 .../samples/helloTriangle.json | 0 .../samples/helloTriangleMSAA.json | 0 .../samples/imageBlur.json | 0 .../samples/instancedCube.json | 0 .../samples/particles.json | 0 .../samples/renderBundles.json | 0 .../samples/resizeCanvas.json | 0 .../samples/reversedZ.json | 0 .../samples/rotatingCube.json | 0 .../samples/samplerParameters.json | 0 .../samples/shadowMapping.json | 0 .../samples/texturedCube.json | 0 .../samples/twoCubes.json | 0 .../samples/videoUploading.json | 0 .../samples/videoUploadingWebCodecs.json | 0 .../samples/worker.json | 0 .../_buildManifest.js | 0 .../_ssgManifest.js | 0 _next/static/chunks/73.38bd17f6a83e3c68.js | 1 - _next/static/chunks/73.c38a93640c1ff80d.js | 1 + ...pack-ab06f07e42fd237d.js => webpack-a358947a3be7ead5.js} | 2 +- index.html | 2 +- samples/A-buffer.html | 6 +++++- samples/animometer.html | 2 +- samples/cameras.html | 2 +- samples/computeBoids.html | 2 +- samples/cornell.html | 2 +- samples/cubemap.html | 2 +- samples/deferredRendering.html | 4 ++-- samples/fractalCube.html | 2 +- samples/gameOfLife.html | 2 +- samples/helloTriangle.html | 2 +- samples/helloTriangleMSAA.html | 2 +- samples/imageBlur.html | 2 +- samples/instancedCube.html | 2 +- samples/particles.html | 2 +- samples/renderBundles.html | 4 ++-- samples/resizeCanvas.html | 2 +- samples/reversedZ.html | 4 ++-- samples/rotatingCube.html | 2 +- samples/samplerParameters.html | 2 +- samples/shadowMapping.html | 2 +- samples/texturedCube.html | 2 +- samples/twoCubes.html | 2 +- samples/videoUploading.html | 2 +- samples/videoUploadingWebCodecs.html | 2 +- samples/worker.html | 4 ++-- 57 files changed, 38 insertions(+), 34 deletions(-) rename _next/data/{J9I_zgn18ItGOwycGNOf4 => GAyY4C3ntNV3XSXtDXCAj}/samples/A-buffer.json (100%) rename _next/data/{J9I_zgn18ItGOwycGNOf4 => GAyY4C3ntNV3XSXtDXCAj}/samples/animometer.json (100%) rename _next/data/{J9I_zgn18ItGOwycGNOf4 => GAyY4C3ntNV3XSXtDXCAj}/samples/cameras.json (100%) rename _next/data/{J9I_zgn18ItGOwycGNOf4 => GAyY4C3ntNV3XSXtDXCAj}/samples/computeBoids.json (100%) rename _next/data/{J9I_zgn18ItGOwycGNOf4 => GAyY4C3ntNV3XSXtDXCAj}/samples/cornell.json (100%) rename _next/data/{J9I_zgn18ItGOwycGNOf4 => GAyY4C3ntNV3XSXtDXCAj}/samples/cubemap.json (100%) rename _next/data/{J9I_zgn18ItGOwycGNOf4 => GAyY4C3ntNV3XSXtDXCAj}/samples/deferredRendering.json (100%) rename _next/data/{J9I_zgn18ItGOwycGNOf4 => GAyY4C3ntNV3XSXtDXCAj}/samples/fractalCube.json (100%) rename _next/data/{J9I_zgn18ItGOwycGNOf4 => GAyY4C3ntNV3XSXtDXCAj}/samples/gameOfLife.json (100%) rename _next/data/{J9I_zgn18ItGOwycGNOf4 => GAyY4C3ntNV3XSXtDXCAj}/samples/helloTriangle.json (100%) rename _next/data/{J9I_zgn18ItGOwycGNOf4 => GAyY4C3ntNV3XSXtDXCAj}/samples/helloTriangleMSAA.json (100%) rename _next/data/{J9I_zgn18ItGOwycGNOf4 => GAyY4C3ntNV3XSXtDXCAj}/samples/imageBlur.json (100%) rename _next/data/{J9I_zgn18ItGOwycGNOf4 => GAyY4C3ntNV3XSXtDXCAj}/samples/instancedCube.json (100%) rename _next/data/{J9I_zgn18ItGOwycGNOf4 => GAyY4C3ntNV3XSXtDXCAj}/samples/particles.json (100%) rename _next/data/{J9I_zgn18ItGOwycGNOf4 => GAyY4C3ntNV3XSXtDXCAj}/samples/renderBundles.json (100%) rename _next/data/{J9I_zgn18ItGOwycGNOf4 => GAyY4C3ntNV3XSXtDXCAj}/samples/resizeCanvas.json (100%) rename _next/data/{J9I_zgn18ItGOwycGNOf4 => GAyY4C3ntNV3XSXtDXCAj}/samples/reversedZ.json (100%) rename _next/data/{J9I_zgn18ItGOwycGNOf4 => GAyY4C3ntNV3XSXtDXCAj}/samples/rotatingCube.json (100%) rename _next/data/{J9I_zgn18ItGOwycGNOf4 => GAyY4C3ntNV3XSXtDXCAj}/samples/samplerParameters.json (100%) rename _next/data/{J9I_zgn18ItGOwycGNOf4 => GAyY4C3ntNV3XSXtDXCAj}/samples/shadowMapping.json (100%) rename _next/data/{J9I_zgn18ItGOwycGNOf4 => GAyY4C3ntNV3XSXtDXCAj}/samples/texturedCube.json (100%) rename _next/data/{J9I_zgn18ItGOwycGNOf4 => GAyY4C3ntNV3XSXtDXCAj}/samples/twoCubes.json (100%) rename _next/data/{J9I_zgn18ItGOwycGNOf4 => GAyY4C3ntNV3XSXtDXCAj}/samples/videoUploading.json (100%) rename _next/data/{J9I_zgn18ItGOwycGNOf4 => GAyY4C3ntNV3XSXtDXCAj}/samples/videoUploadingWebCodecs.json (100%) rename _next/data/{J9I_zgn18ItGOwycGNOf4 => GAyY4C3ntNV3XSXtDXCAj}/samples/worker.json (100%) rename _next/static/{J9I_zgn18ItGOwycGNOf4 => GAyY4C3ntNV3XSXtDXCAj}/_buildManifest.js (100%) rename _next/static/{J9I_zgn18ItGOwycGNOf4 => GAyY4C3ntNV3XSXtDXCAj}/_ssgManifest.js (100%) delete mode 100644 _next/static/chunks/73.38bd17f6a83e3c68.js create mode 100644 _next/static/chunks/73.c38a93640c1ff80d.js rename _next/static/chunks/{webpack-ab06f07e42fd237d.js => webpack-a358947a3be7ead5.js} (97%) diff --git a/404.html b/404.html index 2db32085..6407808b 100644 --- a/404.html +++ b/404.html @@ -1,4 +1,4 @@ -404: This page could not be found

404

This page could not be found.

\ No newline at end of file + }

404

This page could not be found.

\ No newline at end of file diff --git a/_next/data/J9I_zgn18ItGOwycGNOf4/samples/A-buffer.json b/_next/data/GAyY4C3ntNV3XSXtDXCAj/samples/A-buffer.json similarity index 100% rename from _next/data/J9I_zgn18ItGOwycGNOf4/samples/A-buffer.json rename to _next/data/GAyY4C3ntNV3XSXtDXCAj/samples/A-buffer.json diff --git a/_next/data/J9I_zgn18ItGOwycGNOf4/samples/animometer.json b/_next/data/GAyY4C3ntNV3XSXtDXCAj/samples/animometer.json similarity index 100% rename from _next/data/J9I_zgn18ItGOwycGNOf4/samples/animometer.json rename to _next/data/GAyY4C3ntNV3XSXtDXCAj/samples/animometer.json diff --git a/_next/data/J9I_zgn18ItGOwycGNOf4/samples/cameras.json b/_next/data/GAyY4C3ntNV3XSXtDXCAj/samples/cameras.json similarity index 100% rename from _next/data/J9I_zgn18ItGOwycGNOf4/samples/cameras.json rename to _next/data/GAyY4C3ntNV3XSXtDXCAj/samples/cameras.json diff --git a/_next/data/J9I_zgn18ItGOwycGNOf4/samples/computeBoids.json b/_next/data/GAyY4C3ntNV3XSXtDXCAj/samples/computeBoids.json similarity index 100% rename from _next/data/J9I_zgn18ItGOwycGNOf4/samples/computeBoids.json rename to _next/data/GAyY4C3ntNV3XSXtDXCAj/samples/computeBoids.json diff --git a/_next/data/J9I_zgn18ItGOwycGNOf4/samples/cornell.json b/_next/data/GAyY4C3ntNV3XSXtDXCAj/samples/cornell.json similarity index 100% rename from _next/data/J9I_zgn18ItGOwycGNOf4/samples/cornell.json rename to _next/data/GAyY4C3ntNV3XSXtDXCAj/samples/cornell.json diff --git a/_next/data/J9I_zgn18ItGOwycGNOf4/samples/cubemap.json b/_next/data/GAyY4C3ntNV3XSXtDXCAj/samples/cubemap.json similarity index 100% rename from _next/data/J9I_zgn18ItGOwycGNOf4/samples/cubemap.json rename to _next/data/GAyY4C3ntNV3XSXtDXCAj/samples/cubemap.json diff --git a/_next/data/J9I_zgn18ItGOwycGNOf4/samples/deferredRendering.json b/_next/data/GAyY4C3ntNV3XSXtDXCAj/samples/deferredRendering.json similarity index 100% rename from _next/data/J9I_zgn18ItGOwycGNOf4/samples/deferredRendering.json rename to _next/data/GAyY4C3ntNV3XSXtDXCAj/samples/deferredRendering.json diff --git a/_next/data/J9I_zgn18ItGOwycGNOf4/samples/fractalCube.json b/_next/data/GAyY4C3ntNV3XSXtDXCAj/samples/fractalCube.json similarity index 100% rename from _next/data/J9I_zgn18ItGOwycGNOf4/samples/fractalCube.json rename to _next/data/GAyY4C3ntNV3XSXtDXCAj/samples/fractalCube.json diff --git a/_next/data/J9I_zgn18ItGOwycGNOf4/samples/gameOfLife.json b/_next/data/GAyY4C3ntNV3XSXtDXCAj/samples/gameOfLife.json similarity index 100% rename from _next/data/J9I_zgn18ItGOwycGNOf4/samples/gameOfLife.json rename to _next/data/GAyY4C3ntNV3XSXtDXCAj/samples/gameOfLife.json diff --git a/_next/data/J9I_zgn18ItGOwycGNOf4/samples/helloTriangle.json b/_next/data/GAyY4C3ntNV3XSXtDXCAj/samples/helloTriangle.json similarity index 100% rename from _next/data/J9I_zgn18ItGOwycGNOf4/samples/helloTriangle.json rename to _next/data/GAyY4C3ntNV3XSXtDXCAj/samples/helloTriangle.json diff --git a/_next/data/J9I_zgn18ItGOwycGNOf4/samples/helloTriangleMSAA.json b/_next/data/GAyY4C3ntNV3XSXtDXCAj/samples/helloTriangleMSAA.json similarity index 100% rename from _next/data/J9I_zgn18ItGOwycGNOf4/samples/helloTriangleMSAA.json rename to _next/data/GAyY4C3ntNV3XSXtDXCAj/samples/helloTriangleMSAA.json diff --git a/_next/data/J9I_zgn18ItGOwycGNOf4/samples/imageBlur.json b/_next/data/GAyY4C3ntNV3XSXtDXCAj/samples/imageBlur.json similarity index 100% rename from _next/data/J9I_zgn18ItGOwycGNOf4/samples/imageBlur.json rename to _next/data/GAyY4C3ntNV3XSXtDXCAj/samples/imageBlur.json diff --git a/_next/data/J9I_zgn18ItGOwycGNOf4/samples/instancedCube.json b/_next/data/GAyY4C3ntNV3XSXtDXCAj/samples/instancedCube.json similarity index 100% rename from _next/data/J9I_zgn18ItGOwycGNOf4/samples/instancedCube.json rename to _next/data/GAyY4C3ntNV3XSXtDXCAj/samples/instancedCube.json diff --git a/_next/data/J9I_zgn18ItGOwycGNOf4/samples/particles.json b/_next/data/GAyY4C3ntNV3XSXtDXCAj/samples/particles.json similarity index 100% rename from _next/data/J9I_zgn18ItGOwycGNOf4/samples/particles.json rename to _next/data/GAyY4C3ntNV3XSXtDXCAj/samples/particles.json diff --git a/_next/data/J9I_zgn18ItGOwycGNOf4/samples/renderBundles.json b/_next/data/GAyY4C3ntNV3XSXtDXCAj/samples/renderBundles.json similarity index 100% rename from _next/data/J9I_zgn18ItGOwycGNOf4/samples/renderBundles.json rename to _next/data/GAyY4C3ntNV3XSXtDXCAj/samples/renderBundles.json diff --git a/_next/data/J9I_zgn18ItGOwycGNOf4/samples/resizeCanvas.json b/_next/data/GAyY4C3ntNV3XSXtDXCAj/samples/resizeCanvas.json similarity index 100% rename from _next/data/J9I_zgn18ItGOwycGNOf4/samples/resizeCanvas.json rename to _next/data/GAyY4C3ntNV3XSXtDXCAj/samples/resizeCanvas.json diff --git a/_next/data/J9I_zgn18ItGOwycGNOf4/samples/reversedZ.json b/_next/data/GAyY4C3ntNV3XSXtDXCAj/samples/reversedZ.json similarity index 100% rename from _next/data/J9I_zgn18ItGOwycGNOf4/samples/reversedZ.json rename to _next/data/GAyY4C3ntNV3XSXtDXCAj/samples/reversedZ.json diff --git a/_next/data/J9I_zgn18ItGOwycGNOf4/samples/rotatingCube.json b/_next/data/GAyY4C3ntNV3XSXtDXCAj/samples/rotatingCube.json similarity index 100% rename from _next/data/J9I_zgn18ItGOwycGNOf4/samples/rotatingCube.json rename to _next/data/GAyY4C3ntNV3XSXtDXCAj/samples/rotatingCube.json diff --git a/_next/data/J9I_zgn18ItGOwycGNOf4/samples/samplerParameters.json b/_next/data/GAyY4C3ntNV3XSXtDXCAj/samples/samplerParameters.json similarity index 100% rename from _next/data/J9I_zgn18ItGOwycGNOf4/samples/samplerParameters.json rename to _next/data/GAyY4C3ntNV3XSXtDXCAj/samples/samplerParameters.json diff --git a/_next/data/J9I_zgn18ItGOwycGNOf4/samples/shadowMapping.json b/_next/data/GAyY4C3ntNV3XSXtDXCAj/samples/shadowMapping.json similarity index 100% rename from _next/data/J9I_zgn18ItGOwycGNOf4/samples/shadowMapping.json rename to _next/data/GAyY4C3ntNV3XSXtDXCAj/samples/shadowMapping.json diff --git a/_next/data/J9I_zgn18ItGOwycGNOf4/samples/texturedCube.json b/_next/data/GAyY4C3ntNV3XSXtDXCAj/samples/texturedCube.json similarity index 100% rename from _next/data/J9I_zgn18ItGOwycGNOf4/samples/texturedCube.json rename to _next/data/GAyY4C3ntNV3XSXtDXCAj/samples/texturedCube.json diff --git a/_next/data/J9I_zgn18ItGOwycGNOf4/samples/twoCubes.json b/_next/data/GAyY4C3ntNV3XSXtDXCAj/samples/twoCubes.json similarity index 100% rename from _next/data/J9I_zgn18ItGOwycGNOf4/samples/twoCubes.json rename to _next/data/GAyY4C3ntNV3XSXtDXCAj/samples/twoCubes.json diff --git a/_next/data/J9I_zgn18ItGOwycGNOf4/samples/videoUploading.json b/_next/data/GAyY4C3ntNV3XSXtDXCAj/samples/videoUploading.json similarity index 100% rename from _next/data/J9I_zgn18ItGOwycGNOf4/samples/videoUploading.json rename to _next/data/GAyY4C3ntNV3XSXtDXCAj/samples/videoUploading.json diff --git a/_next/data/J9I_zgn18ItGOwycGNOf4/samples/videoUploadingWebCodecs.json b/_next/data/GAyY4C3ntNV3XSXtDXCAj/samples/videoUploadingWebCodecs.json similarity index 100% rename from _next/data/J9I_zgn18ItGOwycGNOf4/samples/videoUploadingWebCodecs.json rename to _next/data/GAyY4C3ntNV3XSXtDXCAj/samples/videoUploadingWebCodecs.json diff --git a/_next/data/J9I_zgn18ItGOwycGNOf4/samples/worker.json b/_next/data/GAyY4C3ntNV3XSXtDXCAj/samples/worker.json similarity index 100% rename from _next/data/J9I_zgn18ItGOwycGNOf4/samples/worker.json rename to _next/data/GAyY4C3ntNV3XSXtDXCAj/samples/worker.json diff --git a/_next/static/J9I_zgn18ItGOwycGNOf4/_buildManifest.js b/_next/static/GAyY4C3ntNV3XSXtDXCAj/_buildManifest.js similarity index 100% rename from _next/static/J9I_zgn18ItGOwycGNOf4/_buildManifest.js rename to _next/static/GAyY4C3ntNV3XSXtDXCAj/_buildManifest.js diff --git a/_next/static/J9I_zgn18ItGOwycGNOf4/_ssgManifest.js b/_next/static/GAyY4C3ntNV3XSXtDXCAj/_ssgManifest.js similarity index 100% rename from _next/static/J9I_zgn18ItGOwycGNOf4/_ssgManifest.js rename to _next/static/GAyY4C3ntNV3XSXtDXCAj/_ssgManifest.js diff --git a/_next/static/chunks/73.38bd17f6a83e3c68.js b/_next/static/chunks/73.38bd17f6a83e3c68.js deleted file mode 100644 index 2cee3e5e..00000000 --- a/_next/static/chunks/73.38bd17f6a83e3c68.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[73],{5671:function(e,n,t){"use strict";t.d(n,{Tl:function(){return d},hu:function(){return f}});var r=t(5893),a=t(9008),i=t.n(a),o=t(1163),s=t(7294),l=t(9147),u=t.n(l);t(7319);let c=e=>{let n=(0,s.useRef)(null),a=(0,s.useMemo)(()=>e.sources.map(e=>{let{name:n,contents:a}=e;return{name:n,...function(e){let n;let a=null;{a=document.createElement("div");let i=t(4631);n=i(a,{lineNumbers:!0,lineWrapping:!0,theme:"monokai",readOnly:!0})}return{Container:function(t){return(0,r.jsx)("div",{...t,children:(0,r.jsx)("div",{ref(t){a&&t&&(t.appendChild(a),n.setOption("value",e))}})})}}}(a)}}),e.sources),l=(0,s.useRef)(null),c=(0,s.useMemo)(()=>{if(e.gui){let n=t(4376);return new n.GUI({autoPlace:!1})}},[]),d=(0,s.useRef)(null),f=(0,s.useMemo)(()=>{if(e.stats){let n=t(2792);return new n}},[]),p=(0,o.useRouter)(),m=p.asPath.match(/#([a-zA-Z0-9\.\/]+)/),[g,h]=(0,s.useState)(null),[v,x]=(0,s.useState)(null);return(0,s.useEffect)(()=>{if(m?x(m[1]):x(a[0].name),c&&l.current)for(l.current.appendChild(c.domElement);c.__controllers.length>0;)c.__controllers[0].remove();f&&d.current&&(f.dom.style.position="absolute",f.showPanel(1),d.current.appendChild(f.dom));let t={active:!0},r=()=>{t.active=!1};try{let i=n.current;if(!i)throw Error("The canvas is not available");let o=e.init({canvas:i,pageState:t,gui:c,stats:f});o instanceof Promise&&o.catch(e=>{console.error(e),h(e)})}catch(s){console.error(s),h(s)}return r},[]),(0,r.jsxs)("main",{children:[(0,r.jsxs)(i(),{children:[(0,r.jsx)("style",{dangerouslySetInnerHTML:{__html:"\n .CodeMirror {\n height: auto !important;\n margin: 1em 0;\n }\n\n .CodeMirror-scroll {\n height: auto !important;\n overflow: visible !important;\n }\n "}}),(0,r.jsx)("title",{children:"".concat(e.name," - WebGPU Samples")}),(0,r.jsx)("meta",{name:"description",content:e.description}),(0,r.jsx)("meta",{httpEquiv:"origin-trial",content:e.originTrial})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h1",{children:e.name}),(0,r.jsx)("a",{target:"_blank",rel:"noreferrer",href:"https://github.com/".concat("webgpu/webgpu-samples","/tree/main/").concat(e.filename),children:"See it on Github!"}),(0,r.jsx)("p",{children:e.description}),g?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("p",{children:"Something went wrong. Do your browser and device support WebGPU?"}),(0,r.jsx)("p",{children:"".concat(g)})]}):null]}),(0,r.jsxs)("div",{className:u().canvasContainer,children:[(0,r.jsx)("div",{style:{position:"absolute",left:10},ref:d}),(0,r.jsx)("div",{style:{position:"absolute",right:10},ref:l}),(0,r.jsx)("canvas",{ref:n})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("nav",{className:u().sourceFileNav,children:(0,r.jsx)("ul",{children:a.map((e,n)=>(0,r.jsx)("li",{children:(0,r.jsx)("a",{href:"#".concat(e.name),"data-active":v==e.name,onClick(){x(e.name)},children:e.name})},n))})}),a.map((e,n)=>(0,r.jsx)(e.Container,{className:u().sourceFileContainer,"data-active":v==e.name},n))]})]})},d=e=>(0,r.jsx)(c,{...e});function f(e,n){if(!e)throw Error(n)}},9385:function(e,n,t){"use strict";t.d(n,{b:function(){return a},q:function(){return o}});var r=t(6416);function a(e,n){let t=e.map(()=>[0,0,0]);return n.forEach(n=>{let[a,i,o]=n,s=e[a],l=e[i],u=e[o],c=r.R3.subtract(l,s),d=r.R3.subtract(u,s);r.R3.normalize(c,c),r.R3.normalize(d,d);let f=r.R3.cross(c,d);r.R3.add(t[a],f,t[a]),r.R3.add(t[i],f,t[i]),r.R3.add(t[o],f,t[o])}),t.forEach(e=>{r.R3.normalize(e,e)}),t}let i={xy:[0,1],xz:[0,2],yz:[1,2]};function o(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"xy",t=i[n],r=e.map(()=>[0,0]),a=[1/0,1/0],o=[-1/0,-1/0];return e.forEach((e,n)=>{r[n][0]=e[t[0]],r[n][1]=e[t[1]],a[0]=Math.min(e[t[0]],a[0]),a[1]=Math.min(e[t[1]],a[1]),o[0]=Math.max(e[t[0]],o[0]),o[1]=Math.max(e[t[1]],o[1])}),r.forEach(e=>{e[0]=(e[0]-a[0])/(o[0]-a[0]),e[1]=(e[1]-a[1])/(o[1]-a[1])}),r}},3073:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return m}});var r=t(6416),a=t(5671),i=t(8748),o=t(9385);let s={positions:i.m,triangles:i.g,normals:[]};s.normals=(0,o.b)(s.positions,s.triangles);var l="struct Uniforms {\n modelViewProjectionMatrix: mat4x4,\n};\n\n@binding(0) @group(0) var uniforms: Uniforms;\n\nstruct VertexOutput {\n @builtin(position) position: vec4,\n @location(0) @interpolate(flat) instance: u32\n};\n\n@vertex\nfn main_vs(@location(0) position: vec4, @builtin(instance_index) instance: u32) -> VertexOutput {\n var output: VertexOutput;\n\n // distribute instances into a staggered 4x4 grid\n const gridWidth = 125.0;\n const cellSize = gridWidth / 4.0;\n let row = instance / 2u;\n let col = instance % 2u;\n\n let xOffset = -gridWidth / 2.0 + cellSize / 2.0 + 2.0 * cellSize * f32(col) + f32(row % 2u != 0u) * cellSize;\n let zOffset = -gridWidth / 2.0 + cellSize / 2.0 + 2.0 + f32(row) * cellSize;\n\n let offsetPos = vec4(position.x + xOffset, position.y, position.z + zOffset, position.w);\n\n output.position = uniforms.modelViewProjectionMatrix * offsetPos;\n output.instance = instance;\n return output;\n}\n\n@fragment\nfn main_fs(@location(0) @interpolate(flat) instance: u32) -> @location(0) vec4 {\n const colors = array,6>(\n vec3(1.0, 0.0, 0.0),\n vec3(0.0, 1.0, 0.0),\n vec3(0.0, 0.0, 1.0),\n vec3(1.0, 0.0, 1.0),\n vec3(1.0, 1.0, 0.0),\n vec3(0.0, 1.0, 1.0),\n );\n\n return vec4(colors[instance % 6u], 1.0);\n}",u="struct Uniforms {\n modelViewProjectionMatrix: mat4x4,\n maxStorableFragments: u32,\n targetWidth: u32,\n};\n\n\nstruct Heads {\n numFragments: atomic,\n data: array>\n};\n\nstruct LinkedListElement {\n color: vec4,\n depth: f32,\n next: u32\n};\n\nstruct LinkedList {\n data: array\n};\n\n@binding(0) @group(0) var uniforms: Uniforms;\n@binding(1) @group(0) var heads: Heads;\n@binding(2) @group(0) var linkedList: LinkedList;\n@binding(3) @group(0) var opaqueDepthTexture: texture_depth_2d;\n\nstruct VertexOutput {\n @builtin(position) position: vec4,\n @location(0) @interpolate(flat) instance: u32\n};\n\n@vertex\nfn main_vs(@location(0) position: vec4, @builtin(instance_index) instance: u32) -> VertexOutput {\n var output: VertexOutput;\n\n // distribute instances into a staggered 4x4 grid\n const gridWidth = 125.0;\n const cellSize = gridWidth / 4.0;\n let row = instance / 2u;\n let col = instance % 2u;\n\n let xOffset = -gridWidth / 2.0 + cellSize / 2.0 + 2.0 * cellSize * f32(col) + f32(row % 2u == 0u) * cellSize;\n let zOffset = -gridWidth / 2.0 + cellSize / 2.0 + 2.0 + f32(row) * cellSize;\n\n let offsetPos = vec4(position.x + xOffset, position.y, position.z + zOffset, position.w);\n\n output.position = uniforms.modelViewProjectionMatrix * offsetPos;\n output.instance = instance;\n\n return output;\n}\n\n@fragment\nfn main_fs(@builtin(position) position: vec4, @location(0) @interpolate(flat) instance: u32) {\n const colors = array,6>(\n vec3(1.0, 0.0, 0.0),\n vec3(0.0, 1.0, 0.0),\n vec3(0.0, 0.0, 1.0),\n vec3(1.0, 0.0, 1.0),\n vec3(1.0, 1.0, 0.0),\n vec3(0.0, 1.0, 1.0),\n );\n\n let fragCoords = vec2(position.xy);\n let opaqueDepth = textureLoad(opaqueDepthTexture, fragCoords, 0);\n\n // reject fragments behind opaque objects\n if position.z >= opaqueDepth {\n discard;\n }\n\n // The index in the heads buffer corresponding to the head data for the fragment at\n // the current location.\n let headsIndex = u32(fragCoords.y) * uniforms.targetWidth + u32(fragCoords.x);\n\n // The index in the linkedList buffer at which to store the new fragment\n let fragIndex = atomicAdd(&heads.numFragments, 1u);\n\n // If we run out of space to store the fragments, we just lose them\n if fragIndex < uniforms.maxStorableFragments {\n let lastHead = atomicExchange(&heads.data[headsIndex], fragIndex);\n linkedList.data[fragIndex].depth = position.z;\n linkedList.data[fragIndex].next = lastHead;\n linkedList.data[fragIndex].color = vec4(colors[(instance + 3u) % 6u], 0.3);\n }\n}",c="struct Uniforms {\n modelViewProjectionMatrix: mat4x4,\n maxStorableFragments: u32,\n targetWidth: u32,\n};\n\nstruct Heads {\n numFragments: u32,\n data: array\n};\n\nstruct LinkedListElement {\n color: vec4,\n depth: f32,\n next: u32\n};\n\nstruct LinkedList {\n data: array\n};\n\n@binding(0) @group(0) var uniforms: Uniforms;\n@binding(1) @group(0) var heads: Heads;\n@binding(2) @group(0) var linkedList: LinkedList;\n\n// Output a full screen quad\n@vertex\nfn main_vs(@builtin(vertex_index) vertIndex: u32) -> @builtin(position) vec4 {\n const position = array, 6>(\n vec2(-1.0, -1.0),\n vec2(1.0, -1.0),\n vec2(1.0, 1.0),\n vec2(-1.0, -1.0),\n vec2(1.0, 1.0),\n vec2(-1.0, 1.0),\n );\n \n return vec4(position[vertIndex], 0.0, 1.0);\n}\n\n@fragment\nfn main_fs(@builtin(position) position: vec4) -> @location(0) vec4 {\n let fragCoords = vec2(position.xy);\n let headsIndex = u32(fragCoords.y) * uniforms.targetWidth + u32(fragCoords.x);\n\n // The maximum layers we can process for any pixel\n const maxLayers = 24u;\n\n var layers: array;\n\n var numLayers = 0u;\n var elementIndex = heads.data[headsIndex];\n\n // copy the list elements into an array up to the maximum amount of layers\n while elementIndex != 0xFFFFFFFFu && numLayers < maxLayers {\n layers[numLayers] = linkedList.data[elementIndex];\n numLayers++;\n elementIndex = linkedList.data[elementIndex].next;\n }\n\n if numLayers == 0u {\n discard;\n }\n \n // sort the fragments by depth\n for (var i = 1u; i < numLayers; i++) {\n let toInsert = layers[i];\n var j = i;\n\n while j > 0u && toInsert.depth > layers[j - 1u].depth {\n layers[j] = layers[j - 1u];\n j--;\n }\n\n layers[j] = toInsert;\n }\n\n // pre-multiply alpha for the first layer\n var color = vec4(layers[0].color.a * layers[0].color.rgb, layers[0].color.a);\n\n // blend the remaining layers\n for (var i = 1u; i < numLayers; i++) {\n let mixed = mix(color.rgb, layers[i].color.rgb, layers[i].color.aaa);\n color = vec4(mixed, color.a);\n }\n\n return color;\n}",d="src/sample/a-buffer/main.ts";let f=async e=>{let{canvas:n,pageState:t}=e,a=await navigator.gpu.requestAdapter(),i=await a.requestDevice();if(!t.active)return;let o=n.getContext("webgpu"),d=Math.min(window.devicePixelRatio||1,3);n.width=n.clientWidth*d,n.height=n.clientHeight*d;let f=navigator.gpu.getPreferredCanvasFormat();o.configure({device:i,format:f,alphaMode:"premultiplied"});let p=i.createTexture({size:[n.width,n.height],format:"depth24plus",usage:GPUTextureUsage.RENDER_ATTACHMENT|GPUTextureUsage.TEXTURE_BINDING,label:"depthTexture"}),m=p.createView({label:"depthTextureView"}),g=i.createBuffer({size:3*s.positions.length*Float32Array.BYTES_PER_ELEMENT,usage:GPUBufferUsage.VERTEX,mappedAtCreation:!0,label:"vertexBuffer"});{let h=new Float32Array(g.getMappedRange());for(let v=0;v(0,a.Tl)({name:"A-Buffer",description:"Demonstrates order independent transparency using a per-pixel linked-list of translucent fragments.",init:f,sources:[{name:d.substring(20),contents:"import { mat4, vec3 } from 'wgpu-matrix';\nimport { makeSample, SampleInit } from '../../components/SampleLayout';\n\nimport { mesh } from '../../meshes/teapot';\n\nimport opaqueWGSL from './opaque.wgsl';\nimport translucentWGSL from './translucent.wgsl';\nimport compositeWGSL from './composite.wgsl';\n\nfunction roundUp(n: number, k: number): number {\n return Math.ceil(n / k) * k;\n}\n\nconst init: SampleInit = async ({ canvas, pageState }) => {\n const adapter = await navigator.gpu.requestAdapter();\n const device = await adapter.requestDevice();\n\n if (!pageState.active) return;\n const context = canvas.getContext('webgpu') as GPUCanvasContext;\n\n // The devicePixelRatio is clamped here because the linkedListBuffer size will\n // be computed based on the canvas size, but if the devicePixelRatio is too\n // high then it will cause that buffer to exceed the default\n // maxStorageBufferBindingSize (128Mib).\n const devicePixelRatio = Math.min(window.devicePixelRatio || 1, 3);\n canvas.width = canvas.clientWidth * devicePixelRatio;\n canvas.height = canvas.clientHeight * devicePixelRatio;\n const presentationFormat = navigator.gpu.getPreferredCanvasFormat();\n\n context.configure({\n device,\n format: presentationFormat,\n alphaMode: 'premultiplied',\n });\n\n const depthTexture = device.createTexture({\n size: [canvas.width, canvas.height],\n format: 'depth24plus',\n usage: GPUTextureUsage.RENDER_ATTACHMENT | GPUTextureUsage.TEXTURE_BINDING,\n label: 'depthTexture',\n });\n\n const depthTextureView = depthTexture.createView({\n label: 'depthTextureView',\n });\n\n // Create the model vertex buffer\n const vertexBuffer = device.createBuffer({\n size: 3 * mesh.positions.length * Float32Array.BYTES_PER_ELEMENT,\n usage: GPUBufferUsage.VERTEX,\n mappedAtCreation: true,\n label: 'vertexBuffer',\n });\n {\n const mapping = new Float32Array(vertexBuffer.getMappedRange());\n for (let i = 0; i < mesh.positions.length; ++i) {\n mapping.set(mesh.positions[i], 3 * i);\n }\n vertexBuffer.unmap();\n }\n\n // Create the model index buffer\n const indexCount = mesh.triangles.length * 3;\n const indexBuffer = device.createBuffer({\n size: indexCount * Uint16Array.BYTES_PER_ELEMENT,\n usage: GPUBufferUsage.INDEX,\n mappedAtCreation: true,\n label: 'indexBuffer',\n });\n {\n const mapping = new Uint16Array(indexBuffer.getMappedRange());\n for (let i = 0; i < mesh.triangles.length; ++i) {\n mapping.set(mesh.triangles[i], 3 * i);\n }\n indexBuffer.unmap();\n }\n\n // `Heads` struct contains the start index of the linked-list of translucent fragments\n // for a given pixel.\n // * numFragments : u32\n // * data : array\n const headsBuffer = device.createBuffer({\n size: (1 + canvas.width * canvas.height) * Uint32Array.BYTES_PER_ELEMENT,\n usage: GPUBufferUsage.STORAGE | GPUBufferUsage.COPY_DST,\n label: 'headsBuffer',\n });\n\n const headsInitBuffer = device.createBuffer({\n size: (1 + canvas.width * canvas.height) * Uint32Array.BYTES_PER_ELEMENT,\n usage: GPUBufferUsage.COPY_SRC,\n mappedAtCreation: true,\n label: 'headsInitBuffer',\n });\n {\n const buffer = new Uint32Array(headsInitBuffer.getMappedRange());\n\n for (let i = 0; i < buffer.length; ++i) {\n buffer[i] = 0xffffffff;\n }\n\n headsInitBuffer.unmap();\n }\n\n // Determines how much memory is allocated to store linked-list elements\n const averageLayersPerFragment = 4;\n\n // Each element stores\n // * color : vec4\n // * depth : f32\n // * index of next element in the list : u32\n const linkedListElementSize =\n 5 * Float32Array.BYTES_PER_ELEMENT + 1 * Uint32Array.BYTES_PER_ELEMENT;\n\n const linkedListBuffer = device.createBuffer({\n size:\n averageLayersPerFragment *\n linkedListElementSize *\n canvas.width *\n canvas.height,\n usage: GPUBufferUsage.STORAGE | GPUBufferUsage.COPY_DST,\n label: 'linkedListBuffer',\n });\n\n // Uniforms contains:\n // * modelViewProjectionMatrix: mat4x4\n // * maxStorableFragments: u32\n // * targetWidth: u32\n const uniformsSize = roundUp(\n 16 * Float32Array.BYTES_PER_ELEMENT + 2 * Uint32Array.BYTES_PER_ELEMENT,\n 16\n );\n\n const uniformBuffer = device.createBuffer({\n size: uniformsSize,\n usage: GPUBufferUsage.UNIFORM | GPUBufferUsage.COPY_DST,\n label: 'uniformBuffer',\n });\n\n const opaqueModule = device.createShaderModule({\n code: opaqueWGSL,\n label: 'opaqueModule',\n });\n\n const opaquePipeline = device.createRenderPipeline({\n layout: 'auto',\n vertex: {\n module: opaqueModule,\n entryPoint: 'main_vs',\n buffers: [\n {\n arrayStride: 3 * Float32Array.BYTES_PER_ELEMENT,\n attributes: [\n {\n // position\n format: 'float32x3',\n offset: 0,\n shaderLocation: 0,\n },\n ],\n },\n ],\n },\n fragment: {\n module: opaqueModule,\n entryPoint: 'main_fs',\n targets: [\n {\n format: presentationFormat,\n },\n ],\n },\n primitive: {\n topology: 'triangle-list',\n },\n depthStencil: {\n depthWriteEnabled: true,\n depthCompare: 'less',\n format: depthTexture.format,\n },\n label: 'opaquePipeline',\n });\n\n const opaquePassDescriptor: GPURenderPassDescriptor = {\n colorAttachments: [\n {\n view: undefined,\n clearValue: { r: 0, g: 0, b: 0, a: 1.0 },\n loadOp: 'clear',\n storeOp: 'store',\n },\n ],\n depthStencilAttachment: {\n view: depthTextureView,\n depthClearValue: 1.0,\n depthLoadOp: 'clear',\n depthStoreOp: 'store',\n },\n label: 'opaquePassDescriptor',\n };\n\n const opaqueBindGroup = device.createBindGroup({\n layout: opaquePipeline.getBindGroupLayout(0),\n entries: [\n {\n binding: 0,\n resource: {\n buffer: uniformBuffer,\n size: 16 * Float32Array.BYTES_PER_ELEMENT,\n label: 'modelViewProjection',\n },\n },\n ],\n label: 'opaquePipeline',\n });\n\n const translucentModule = device.createShaderModule({\n code: translucentWGSL,\n label: 'translucentModule',\n });\n\n const translucentPipeline = device.createRenderPipeline({\n layout: 'auto',\n vertex: {\n module: translucentModule,\n entryPoint: 'main_vs',\n buffers: [\n {\n arrayStride: 3 * Float32Array.BYTES_PER_ELEMENT,\n attributes: [\n {\n format: 'float32x3',\n offset: 0,\n shaderLocation: 0,\n },\n ],\n },\n ],\n },\n fragment: {\n module: translucentModule,\n entryPoint: 'main_fs',\n targets: [\n {\n format: presentationFormat,\n writeMask: 0x0,\n },\n ],\n },\n primitive: {\n topology: 'triangle-list',\n },\n label: 'translucentPipeline',\n });\n\n const translucentPassDescriptor: GPURenderPassDescriptor = {\n colorAttachments: [\n {\n loadOp: 'load',\n storeOp: 'store',\n view: undefined,\n },\n ],\n label: 'translucentPassDescriptor',\n };\n\n const translucentBindGroup = device.createBindGroup({\n layout: translucentPipeline.getBindGroupLayout(0),\n entries: [\n {\n binding: 0,\n resource: {\n buffer: uniformBuffer,\n label: 'uniforms',\n },\n },\n {\n binding: 1,\n resource: {\n buffer: headsBuffer,\n label: 'headsBuffer',\n },\n },\n {\n binding: 2,\n resource: {\n buffer: linkedListBuffer,\n label: 'linkedListBuffer',\n },\n },\n {\n binding: 3,\n resource: depthTextureView,\n },\n ],\n label: 'translucentBindGroup',\n });\n\n const compositeModule = device.createShaderModule({\n code: compositeWGSL,\n label: 'compositeModule',\n });\n\n const compositePipeline = device.createRenderPipeline({\n layout: 'auto',\n vertex: {\n module: compositeModule,\n entryPoint: 'main_vs',\n },\n fragment: {\n module: compositeModule,\n entryPoint: 'main_fs',\n targets: [\n {\n format: presentationFormat,\n blend: {\n color: {\n srcFactor: 'one',\n operation: 'add',\n dstFactor: 'one-minus-src-alpha',\n },\n alpha: {},\n },\n },\n ],\n },\n primitive: {\n topology: 'triangle-list',\n },\n label: 'compositePipeline',\n });\n\n const compositePassDescriptor: GPURenderPassDescriptor = {\n colorAttachments: [\n {\n view: undefined,\n loadOp: 'load',\n storeOp: 'store',\n },\n ],\n label: 'compositePassDescriptor',\n };\n\n const compositeBindGroup = device.createBindGroup({\n layout: compositePipeline.getBindGroupLayout(0),\n entries: [\n {\n binding: 0,\n resource: {\n buffer: uniformBuffer,\n label: 'uniforms',\n },\n },\n {\n binding: 1,\n resource: {\n buffer: headsBuffer,\n label: 'headsBuffer',\n },\n },\n {\n binding: 2,\n resource: {\n buffer: linkedListBuffer,\n label: 'linkedListBuffer',\n },\n },\n ],\n });\n\n // Rotates the camera around the origin based on time.\n function getCameraViewProjMatrix() {\n const aspect = canvas.width / canvas.height;\n\n const projectionMatrix = mat4.perspective(\n (2 * Math.PI) / 5,\n aspect,\n 1,\n 2000.0\n );\n\n const upVector = vec3.fromValues(0, 1, 0);\n const origin = vec3.fromValues(0, 0, 0);\n const eyePosition = vec3.fromValues(0, 5, -100);\n\n const rad = Math.PI * (Date.now() / 5000);\n const rotation = mat4.rotateY(mat4.translation(origin), rad);\n vec3.transformMat4(eyePosition, rotation, eyePosition);\n\n const viewMatrix = mat4.lookAt(eyePosition, origin, upVector);\n\n const viewProjMatrix = mat4.multiply(projectionMatrix, viewMatrix);\n return viewProjMatrix as Float32Array;\n }\n\n function frame() {\n // Sample is no longer the active page.\n if (!pageState.active) return;\n\n // update the uniform buffer\n {\n const buffer = new ArrayBuffer(uniformBuffer.size);\n\n new Float32Array(buffer).set(getCameraViewProjMatrix());\n new Uint32Array(buffer, 16 * Float32Array.BYTES_PER_ELEMENT).set([\n averageLayersPerFragment * canvas.width * canvas.height,\n canvas.width,\n ]);\n\n device.queue.writeBuffer(uniformBuffer, 0, buffer);\n }\n\n const commandEncoder = device.createCommandEncoder();\n\n // initialize the heads buffer\n commandEncoder.copyBufferToBuffer(\n headsInitBuffer,\n 0,\n headsBuffer,\n 0,\n headsInitBuffer.size\n );\n\n const textureView = context.getCurrentTexture().createView();\n\n // Draw the opaque objects\n opaquePassDescriptor.colorAttachments[0].view = textureView;\n const opaquePassEncoder =\n commandEncoder.beginRenderPass(opaquePassDescriptor);\n opaquePassEncoder.setPipeline(opaquePipeline);\n opaquePassEncoder.setBindGroup(0, opaqueBindGroup);\n opaquePassEncoder.setVertexBuffer(0, vertexBuffer);\n opaquePassEncoder.setIndexBuffer(indexBuffer, 'uint16');\n opaquePassEncoder.drawIndexed(mesh.triangles.length * 3, 8);\n opaquePassEncoder.end();\n\n // Draw the translucent objects\n translucentPassDescriptor.colorAttachments[0].view = textureView;\n const translucentPassEncoder = commandEncoder.beginRenderPass(\n translucentPassDescriptor\n );\n translucentPassEncoder.setPipeline(translucentPipeline);\n translucentPassEncoder.setBindGroup(0, translucentBindGroup);\n translucentPassEncoder.setVertexBuffer(0, vertexBuffer);\n translucentPassEncoder.setIndexBuffer(indexBuffer, 'uint16');\n translucentPassEncoder.drawIndexed(mesh.triangles.length * 3, 8);\n translucentPassEncoder.end();\n\n // Composite the opaque and translucent objects\n compositePassDescriptor.colorAttachments[0].view = textureView;\n const compositePassEncoder = commandEncoder.beginRenderPass(\n compositePassDescriptor\n );\n compositePassEncoder.setPipeline(compositePipeline);\n compositePassEncoder.setBindGroup(0, compositeBindGroup);\n compositePassEncoder.draw(6);\n compositePassEncoder.end();\n\n device.queue.submit([commandEncoder.finish()]);\n\n requestAnimationFrame(frame);\n }\n\n requestAnimationFrame(frame);\n};\n\nconst ABuffer: () => JSX.Element = () =>\n makeSample({\n name: 'A-Buffer',\n description:\n 'Demonstrates order independent transparency using a per-pixel linked-list of translucent fragments.',\n init,\n sources: [\n {\n name: __filename.substring(__dirname.length + 1),\n contents: __SOURCE__,\n },\n {\n name: 'opaque.wsgl',\n contents: opaqueWGSL,\n },\n {\n name: 'translucent.wsgl',\n contents: translucentWGSL,\n },\n {\n name: 'composite.wsgl',\n contents: compositeWGSL,\n },\n ],\n filename: __filename,\n });\n\nexport default ABuffer;\n"},{name:"opaque.wsgl",contents:l},{name:"translucent.wsgl",contents:u},{name:"composite.wsgl",contents:c}],filename:d});var m=p},9147:function(e){e.exports={canvasContainer:"SampleLayout_canvasContainer__zRR_l",sourceFileNav:"SampleLayout_sourceFileNav__ml48P",sourceFileContainer:"SampleLayout_sourceFileContainer__3s84x"}},8748:function(e,n){n.m=[[5.929688,4.125,0],[5.387188,4.125,2.7475],[5.2971,4.494141,2.70917],[5.832031,4.494141,0],[5.401602,4.617188,2.753633],[5.945313,4.617188,0],[5.614209,4.494141,2.844092],[6.175781,4.494141,0],[5.848437,4.125,2.94375],[6.429688,4.125,0],[3.899688,4.125,4.97],[3.830352,4.494141,4.900664],[3.910782,4.617188,4.981094],[4.074414,4.494141,5.144727],[4.254687,4.125,5.325],[1.677188,4.125,6.4575],[1.638858,4.494141,6.367412],[1.68332,4.617188,6.471914],[1.77378,4.494141,6.684522],[1.873438,4.125,6.91875],[-1.070312,4.125,7],[-1.070312,4.494141,6.902344],[-1.070312,4.617188,7.015625],[-1.070312,4.494141,7.246094],[-1.070312,4.125,7.5],[-1.070312,4.125,7],[-4.007656,4.125,6.4575],[-3.859572,4.494141,6.367412],[-1.070312,4.494141,6.902344],[-3.847676,4.617188,6.471914],[-1.070312,4.617188,7.015625],[-3.917371,4.494141,6.684522],[-1.070312,4.494141,7.246094],[-4.014062,4.125,6.91875],[-1.070312,4.125,7.5],[-6.209063,4.125,4.97],[-6.042168,4.494141,4.900664],[-6.0725,4.617188,4.981094],[-6.217675,4.494141,5.144727],[-6.395312,4.125,5.325],[-7.591093,4.125,2.7475],[-7.464421,4.494141,2.70917],[-7.550137,4.617188,2.753633],[-7.755822,4.494141,2.844092],[-7.989062,4.125,2.94375],[-8.070313,4.125,0],[-7.972656,4.494141,0],[-8.085938,4.617188,0],[-8.316406,4.494141,0],[-8.570313,4.125,0],[-8.070313,4.125,0],[-7.527812,4.125,-2.7475],[-7.437724,4.494141,-2.70917],[-7.972656,4.494141,0],[-7.542227,4.617188,-2.753633],[-8.085938,4.617188,0],[-7.754834,4.494141,-2.844092],[-8.316406,4.494141,0],[-7.989062,4.125,-2.94375],[-8.570313,4.125,0],[-6.040312,4.125,-4.97],[-5.970977,4.494141,-4.900664],[-6.051406,4.617188,-4.981094],[-6.215039,4.494141,-5.144727],[-6.395312,4.125,-5.325],[-3.817812,4.125,-6.4575],[-3.779482,4.494141,-6.367412],[-3.823945,4.617188,-6.471914],[-3.914404,4.494141,-6.684522],[-4.014062,4.125,-6.91875],[-1.070312,4.125,-7],[-1.070312,4.494141,-6.902344],[-1.070312,4.617188,-7.015625],[-1.070312,4.494141,-7.246094],[-1.070312,4.125,-7.5],[-1.070312,4.125,-7],[1.677188,4.125,-6.4575],[1.638858,4.494141,-6.367412],[-1.070312,4.494141,-6.902344],[1.68332,4.617188,-6.471914],[-1.070312,4.617188,-7.015625],[1.77378,4.494141,-6.684522],[-1.070312,4.494141,-7.246094],[1.873438,4.125,-6.91875],[-1.070312,4.125,-7.5],[3.899688,4.125,-4.97],[3.830352,4.494141,-4.900664],[3.910782,4.617188,-4.981094],[4.074414,4.494141,-5.144727],[4.254687,4.125,-5.325],[5.387188,4.125,-2.7475],[5.2971,4.494141,-2.70917],[5.401602,4.617188,-2.753633],[5.614209,4.494141,-2.844092],[5.848437,4.125,-2.94375],[5.929688,4.125,0],[5.832031,4.494141,0],[5.945313,4.617188,0],[6.175781,4.494141,0],[6.429688,4.125,0],[6.429688,4.125,0],[5.848437,4.125,2.94375],[6.695264,2.162109,3.304053],[7.347656,2.162109,0],[7.433985,.234375,3.61836],[8.148438,.234375,0],[7.956494,-1.623047,3.840674],[8.714844,-1.623047,0],[8.154688,-3.375,3.925],[8.929688,-3.375,0],[4.254687,4.125,5.325],[4.906446,2.162109,5.976758],[5.475,.234375,6.545312],[5.877149,-1.623047,6.947461],[6.029688,-3.375,7.1],[1.873438,4.125,6.91875],[2.23374,2.162109,7.765576],[2.548047,.234375,8.504297],[2.770362,-1.623047,9.026807],[2.854688,-3.375,9.225],[-1.070312,4.125,7.5],[-1.070312,2.162109,8.417969],[-1.070312,.234375,9.21875],[-1.070312,-1.623047,9.785156],[-1.070312,-3.375,10],[-1.070312,4.125,7.5],[-4.014062,4.125,6.91875],[-4.374365,2.162109,7.765576],[-1.070312,2.162109,8.417969],[-4.688672,.234375,8.504297],[-1.070312,.234375,9.21875],[-4.910986,-1.623047,9.026807],[-1.070312,-1.623047,9.785156],[-4.995313,-3.375,9.225],[-1.070312,-3.375,10],[-6.395312,4.125,5.325],[-7.047071,2.162109,5.976758],[-7.615624,.234375,6.545312],[-8.017773,-1.623047,6.947461],[-8.170312,-3.375,7.1],[-7.989062,4.125,2.94375],[-8.835889,2.162109,3.304053],[-9.57461,.234375,3.61836],[-10.097119,-1.623047,3.840674],[-10.295313,-3.375,3.925],[-8.570313,4.125,0],[-9.488281,2.162109,0],[-10.289063,.234375,0],[-10.855469,-1.623047,0],[-11.070313,-3.375,0],[-8.570313,4.125,0],[-7.989062,4.125,-2.94375],[-8.835889,2.162109,-3.304053],[-9.488281,2.162109,0],[-9.57461,.234375,-3.61836],[-10.289063,.234375,0],[-10.097119,-1.623047,-3.840674],[-10.855469,-1.623047,0],[-10.295313,-3.375,-3.925],[-11.070313,-3.375,0],[-6.395312,4.125,-5.325],[-7.047071,2.162109,-5.976758],[-7.615624,.234375,-6.545312],[-8.017773,-1.623047,-6.947461],[-8.170312,-3.375,-7.1],[-4.014062,4.125,-6.91875],[-4.374365,2.162109,-7.765576],[-4.688672,.234375,-8.504297],[-4.910986,-1.623047,-9.026807],[-4.995313,-3.375,-9.225],[-1.070312,4.125,-7.5],[-1.070312,2.162109,-8.417969],[-1.070312,.234375,-9.21875],[-1.070312,-1.623047,-9.785156],[-1.070312,-3.375,-10],[-1.070312,4.125,-7.5],[1.873438,4.125,-6.91875],[2.23374,2.162109,-7.765576],[-1.070312,2.162109,-8.417969],[2.548047,.234375,-8.504297],[-1.070312,.234375,-9.21875],[2.770362,-1.623047,-9.026807],[-1.070312,-1.623047,-9.785156],[2.854688,-3.375,-9.225],[-1.070312,-3.375,-10],[4.254687,4.125,-5.325],[4.906446,2.162109,-5.976758],[5.475,.234375,-6.545312],[5.877149,-1.623047,-6.947461],[6.029688,-3.375,-7.1],[5.848437,4.125,-2.94375],[6.695264,2.162109,-3.304053],[7.433985,.234375,-3.61836],[7.956494,-1.623047,-3.840674],[8.154688,-3.375,-3.925],[6.429688,4.125,0],[7.347656,2.162109,0],[8.148438,.234375,0],[8.714844,-1.623047,0],[8.929688,-3.375,0],[8.929688,-3.375,0],[8.154688,-3.375,3.925],[7.794336,-4.857422,3.77168],[8.539063,-4.857422,0],[7.001562,-5.953125,3.434375],[7.679688,-5.953125,0],[6.208789,-6.697266,3.09707],[6.820313,-6.697266,0],[5.848437,-7.125,2.94375],[6.429688,-7.125,0],[6.029688,-3.375,7.1],[5.752343,-4.857422,6.822656],[5.142187,-5.953125,6.2125],[4.532031,-6.697266,5.602344],[4.254687,-7.125,5.325],[2.854688,-3.375,9.225],[2.701367,-4.857422,8.864649],[2.364063,-5.953125,8.071875],[2.026758,-6.697266,7.279101],[1.873438,-7.125,6.91875],[-1.070312,-3.375,10],[-1.070312,-4.857422,9.609375],[-1.070312,-5.953125,8.75],[-1.070312,-6.697266,7.890625],[-1.070312,-7.125,7.5],[-1.070312,-3.375,10],[-4.995313,-3.375,9.225],[-4.841992,-4.857422,8.864649],[-1.070312,-4.857422,9.609375],[-4.504687,-5.953125,8.071875],[-1.070312,-5.953125,8.75],[-4.167383,-6.697266,7.279101],[-1.070312,-6.697266,7.890625],[-4.014062,-7.125,6.91875],[-1.070312,-7.125,7.5],[-8.170312,-3.375,7.1],[-7.892968,-4.857422,6.822656],[-7.282812,-5.953125,6.2125],[-6.672656,-6.697266,5.602344],[-6.395312,-7.125,5.325],[-10.295313,-3.375,3.925],[-9.934961,-4.857422,3.77168],[-9.142187,-5.953125,3.434375],[-8.349414,-6.697266,3.09707],[-7.989062,-7.125,2.94375],[-11.070313,-3.375,0],[-10.679688,-4.857422,0],[-9.820313,-5.953125,0],[-8.960938,-6.697266,0],[-8.570313,-7.125,0],[-11.070313,-3.375,0],[-10.295313,-3.375,-3.925],[-9.934961,-4.857422,-3.77168],[-10.679688,-4.857422,0],[-9.142187,-5.953125,-3.434375],[-9.820313,-5.953125,0],[-8.349414,-6.697266,-3.09707],[-8.960938,-6.697266,0],[-7.989062,-7.125,-2.94375],[-8.570313,-7.125,0],[-8.170312,-3.375,-7.1],[-7.892968,-4.857422,-6.822656],[-7.282812,-5.953125,-6.2125],[-6.672656,-6.697266,-5.602344],[-6.395312,-7.125,-5.325],[-4.995313,-3.375,-9.225],[-4.841992,-4.857422,-8.864649],[-4.504687,-5.953125,-8.071875],[-4.167383,-6.697266,-7.279101],[-4.014062,-7.125,-6.91875],[-1.070312,-3.375,-10],[-1.070312,-4.857422,-9.609375],[-1.070312,-5.953125,-8.75],[-1.070312,-6.697266,-7.890625],[-1.070312,-7.125,-7.5],[-1.070312,-3.375,-10],[2.854688,-3.375,-9.225],[2.701367,-4.857422,-8.864649],[-1.070312,-4.857422,-9.609375],[2.364063,-5.953125,-8.071875],[-1.070312,-5.953125,-8.75],[2.026758,-6.697266,-7.279101],[-1.070312,-6.697266,-7.890625],[1.873438,-7.125,-6.91875],[-1.070312,-7.125,-7.5],[6.029688,-3.375,-7.1],[5.752343,-4.857422,-6.822656],[5.142187,-5.953125,-6.2125],[4.532031,-6.697266,-5.602344],[4.254687,-7.125,-5.325],[8.154688,-3.375,-3.925],[7.794336,-4.857422,-3.77168],[7.001562,-5.953125,-3.434375],[6.208789,-6.697266,-3.09707],[5.848437,-7.125,-2.94375],[8.929688,-3.375,0],[8.539063,-4.857422,0],[7.679688,-5.953125,0],[6.820313,-6.697266,0],[6.429688,-7.125,0],[6.429688,-7.125,0],[5.848437,-7.125,2.94375],[5.691685,-7.400391,2.877056],[6.259766,-7.400391,0],[4.853868,-7.640625,2.520586],[5.351563,-7.640625,0],[2.783648,-7.810547,1.639761],[3.107422,-7.810547,0],[-1.070312,-7.875,0],[4.254687,-7.125,5.325],[4.134043,-7.400391,5.204355],[3.489219,-7.640625,4.559531],[1.895879,-7.810547,2.966191],[-1.070312,-7.875,0],[1.873438,-7.125,6.91875],[1.806743,-7.400391,6.761997],[1.450274,-7.640625,5.92418],[.569448,-7.810547,3.85396],[-1.070312,-7.875,0],[-1.070312,-7.125,7.5],[-1.070312,-7.400391,7.330078],[-1.070312,-7.640625,6.421875],[-1.070312,-7.810547,4.177734],[-1.070312,-7.875,0],[-1.070312,-7.125,7.5],[-4.014062,-7.125,6.91875],[-3.947368,-7.400391,6.761997],[-1.070312,-7.400391,7.330078],[-3.590898,-7.640625,5.92418],[-1.070312,-7.640625,6.421875],[-2.710073,-7.810547,3.85396],[-1.070312,-7.810547,4.177734],[-1.070312,-7.875,0],[-6.395312,-7.125,5.325],[-6.274668,-7.400391,5.204355],[-5.629844,-7.640625,4.559531],[-4.036504,-7.810547,2.966191],[-1.070312,-7.875,0],[-7.989062,-7.125,2.94375],[-7.832309,-7.400391,2.877056],[-6.994492,-7.640625,2.520586],[-4.924272,-7.810547,1.639761],[-1.070312,-7.875,0],[-8.570313,-7.125,0],[-8.400391,-7.400391,0],[-7.492188,-7.640625,0],[-5.248047,-7.810547,0],[-1.070312,-7.875,0],[-8.570313,-7.125,0],[-7.989062,-7.125,-2.94375],[-7.832309,-7.400391,-2.877056],[-8.400391,-7.400391,0],[-6.994492,-7.640625,-2.520586],[-7.492188,-7.640625,0],[-4.924272,-7.810547,-1.639761],[-5.248047,-7.810547,0],[-1.070312,-7.875,0],[-6.395312,-7.125,-5.325],[-6.274668,-7.400391,-5.204355],[-5.629844,-7.640625,-4.559531],[-4.036504,-7.810547,-2.966191],[-1.070312,-7.875,0],[-4.014062,-7.125,-6.91875],[-3.947368,-7.400391,-6.761997],[-3.590898,-7.640625,-5.92418],[-2.710073,-7.810547,-3.85396],[-1.070312,-7.875,0],[-1.070312,-7.125,-7.5],[-1.070312,-7.400391,-7.330078],[-1.070312,-7.640625,-6.421875],[-1.070312,-7.810547,-4.177734],[-1.070312,-7.875,0],[-1.070312,-7.125,-7.5],[1.873438,-7.125,-6.91875],[1.806743,-7.400391,-6.761997],[-1.070312,-7.400391,-7.330078],[1.450274,-7.640625,-5.92418],[-1.070312,-7.640625,-6.421875],[.569448,-7.810547,-3.85396],[-1.070312,-7.810547,-4.177734],[-1.070312,-7.875,0],[4.254687,-7.125,-5.325],[4.134043,-7.400391,-5.204355],[3.489219,-7.640625,-4.559531],[1.895879,-7.810547,-2.966191],[-1.070312,-7.875,0],[5.848437,-7.125,-2.94375],[5.691685,-7.400391,-2.877056],[4.853868,-7.640625,-2.520586],[2.783648,-7.810547,-1.639761],[-1.070312,-7.875,0],[6.429688,-7.125,0],[6.259766,-7.400391,0],[5.351563,-7.640625,0],[3.107422,-7.810547,0],[-1.070312,-7.875,0],[-9.070313,2.25,0],[-8.992188,2.425781,.84375],[-11.47583,2.405457,.84375],[-11.40625,2.232422,0],[-13.298828,2.263184,.84375],[-13.132813,2.109375,0],[-14.421631,1.877014,.84375],[-14.203125,1.775391,0],[-14.804688,1.125,.84375],[-14.570313,1.125,0],[-8.820313,2.8125,1.125],[-11.628906,2.786134,1.125],[-13.664063,2.601563,1.125],[-14.902344,2.100586,1.125],[-15.320313,1.125,1.125],[-8.648438,3.199219,.84375],[-11.781982,3.166809,.84375],[-14.029297,2.939941,.84375],[-15.383057,2.324158,.84375],[-15.835938,1.125,.84375],[-8.570313,3.375,0],[-11.851563,3.339844,0],[-14.195313,3.09375,0],[-15.601563,2.425781,0],[-16.070313,1.125,0],[-8.570313,3.375,0],[-8.648438,3.199219,-.84375],[-11.781982,3.166809,-.84375],[-11.851563,3.339844,0],[-14.029297,2.939941,-.84375],[-14.195313,3.09375,0],[-15.383057,2.324158,-.84375],[-15.601563,2.425781,0],[-15.835938,1.125,-.84375],[-16.070313,1.125,0],[-8.820313,2.8125,-1.125],[-11.628906,2.786134,-1.125],[-13.664063,2.601563,-1.125],[-14.902344,2.100586,-1.125],[-15.320313,1.125,-1.125],[-8.992188,2.425781,-.84375],[-11.47583,2.405457,-.84375],[-13.298828,2.263184,-.84375],[-14.421631,1.877014,-.84375],[-14.804688,1.125,-.84375],[-9.070313,2.25,0],[-11.40625,2.232422,0],[-13.132813,2.109375,0],[-14.203125,1.775391,0],[-14.570313,1.125,0],[-14.570313,1.125,0],[-14.804688,1.125,.84375],[-14.588013,.00705,.84375],[-14.375,.105469,0],[-13.90918,-1.275146,.84375],[-13.757813,-1.125,0],[-12.724976,-2.540863,.84375],[-12.671875,-2.355469,0],[-10.992188,-3.609375,.84375],[-11.070313,-3.375,0],[-15.320313,1.125,1.125],[-15.056641,-.209473,1.125],[-14.242188,-1.605469,1.125],[-12.841797,-2.94873,1.125],[-10.820313,-4.125,1.125],[-15.835938,1.125,.84375],[-15.525269,-.425995,.84375],[-14.575195,-1.935791,.84375],[-12.958618,-3.356598,.84375],[-10.648438,-4.640625,.84375],[-16.070313,1.125,0],[-15.738281,-.524414,0],[-14.726563,-2.085938,0],[-13.011719,-3.541992,0],[-10.570313,-4.875,0],[-16.070313,1.125,0],[-15.835938,1.125,-.84375],[-15.525269,-.425995,-.84375],[-15.738281,-.524414,0],[-14.575195,-1.935791,-.84375],[-14.726563,-2.085938,0],[-12.958618,-3.356598,-.84375],[-13.011719,-3.541992,0],[-10.648438,-4.640625,-.84375],[-10.570313,-4.875,0],[-15.320313,1.125,-1.125],[-15.056641,-.209473,-1.125],[-14.242188,-1.605469,-1.125],[-12.841797,-2.94873,-1.125],[-10.820313,-4.125,-1.125],[-14.804688,1.125,-.84375],[-14.588013,.00705,-.84375],[-13.90918,-1.275146,-.84375],[-12.724976,-2.540863,-.84375],[-10.992188,-3.609375,-.84375],[-14.570313,1.125,0],[-14.375,.105469,0],[-13.757813,-1.125,0],[-12.671875,-2.355469,0],[-11.070313,-3.375,0],[7.429688,-.75,0],[7.429688,-1.394531,1.85625],[10.01123,-.677124,1.676074],[9.828125,-.199219,0],[11.101563,.84668,1.279688],[10.867188,1.125,0],[11.723145,2.629761,.883301],[11.4375,2.730469,0],[12.898438,4.125,.703125],[12.429688,4.125,0],[7.429688,-2.8125,2.475],[10.414063,-1.728516,2.234766],[11.617188,.234375,1.70625],[12.351563,2.408203,1.177734],[13.929688,4.125,.9375],[7.429688,-4.230469,1.85625],[10.816895,-2.779907,1.676074],[12.132813,-.37793,1.279688],[12.97998,2.186646,.883301],[14.960938,4.125,.703125],[7.429688,-4.875,0],[11,-3.257813,0],[12.367188,-.65625,0],[13.265625,2.085938,0],[15.429688,4.125,0],[7.429688,-4.875,0],[7.429688,-4.230469,-1.85625],[10.816895,-2.779907,-1.676074],[11,-3.257813,0],[12.132813,-.37793,-1.279688],[12.367188,-.65625,0],[12.97998,2.186646,-.883301],[13.265625,2.085938,0],[14.960938,4.125,-.703125],[15.429688,4.125,0],[7.429688,-2.8125,-2.475],[10.414063,-1.728516,-2.234766],[11.617188,.234375,-1.70625],[12.351563,2.408203,-1.177734],[13.929688,4.125,-.9375],[7.429688,-1.394531,-1.85625],[10.01123,-.677124,-1.676074],[11.101563,.84668,-1.279688],[11.723145,2.629761,-.883301],[12.898438,4.125,-.703125],[7.429688,-.75,0],[9.828125,-.199219,0],[10.867188,1.125,0],[11.4375,2.730469,0],[12.429688,4.125,0],[12.429688,4.125,0],[12.898438,4.125,.703125],[13.291077,4.346237,.65918],[12.789063,4.335938,0],[13.525879,4.422729,.5625],[13.054688,4.40625,0],[13.532898,4.350357,.46582],[13.132813,4.335938,0],[13.242188,4.125,.421875],[12.929688,4.125,0],[13.929688,4.125,.9375],[14.395508,4.368896,.878906],[14.5625,4.458984,.75],[14.413086,4.38208,.621094],[13.929688,4.125,.5625],[14.960938,4.125,.703125],[15.499939,4.391556,.65918],[15.599121,4.495239,.5625],[15.293274,4.413804,.46582],[14.617188,4.125,.421875],[15.429688,4.125,0],[16.001953,4.401855,0],[16.070313,4.511719,0],[15.693359,4.428224,0],[14.929688,4.125,0],[15.429688,4.125,0],[14.960938,4.125,-.703125],[15.499939,4.391556,-.65918],[16.001953,4.401855,0],[15.599121,4.495239,-.5625],[16.070313,4.511719,0],[15.293274,4.413804,-.46582],[15.693359,4.428224,0],[14.617188,4.125,-.421875],[14.929688,4.125,0],[13.929688,4.125,-.9375],[14.395508,4.368896,-.878906],[14.5625,4.458984,-.75],[14.413086,4.38208,-.621094],[13.929688,4.125,-.5625],[12.898438,4.125,-.703125],[13.291077,4.346237,-.65918],[13.525879,4.422729,-.5625],[13.532898,4.350357,-.46582],[13.242188,4.125,-.421875],[12.429688,4.125,0],[12.789063,4.335938,0],[13.054688,4.40625,0],[13.132813,4.335938,0],[12.929688,4.125,0],[.501414,7.628906,.670256],[.632813,7.628906,0],[-1.070312,7.875,0],[.429278,7.03125,.639395],[.554688,7.03125,0],[-.162029,6.292969,.38696],[-.085937,6.292969,0],[-.147812,5.625,.3925],[-.070312,5.625,0],[.140489,7.628906,1.210801],[-1.070312,7.875,0],[.084844,7.03125,1.155156],[-.370879,6.292969,.699434],[-.360312,5.625,.71],[-.400056,7.628906,1.571726],[-1.070312,7.875,0],[-.430918,7.03125,1.49959],[-.683352,6.292969,.908284],[-.677812,5.625,.9225],[-1.070312,7.628906,1.703125],[-1.070312,7.875,0],[-1.070312,7.03125,1.625],[-1.070312,6.292969,.984375],[-1.070312,5.625,1],[-1.740569,7.628906,1.571726],[-1.070312,7.628906,1.703125],[-1.070312,7.875,0],[-1.709707,7.03125,1.49959],[-1.070312,7.03125,1.625],[-1.457273,6.292969,.908284],[-1.070312,6.292969,.984375],[-1.462812,5.625,.9225],[-1.070312,5.625,1],[-2.281113,7.628906,1.210801],[-1.070312,7.875,0],[-2.225469,7.03125,1.155156],[-1.769746,6.292969,.699434],[-1.780312,5.625,.71],[-2.642038,7.628906,.670256],[-1.070312,7.875,0],[-2.569902,7.03125,.639395],[-1.978596,6.292969,.38696],[-1.992812,5.625,.3925],[-2.773438,7.628906,0],[-1.070312,7.875,0],[-2.695313,7.03125,0],[-2.054687,6.292969,0],[-2.070312,5.625,0],[-2.642038,7.628906,-.670256],[-2.773438,7.628906,0],[-1.070312,7.875,0],[-2.569902,7.03125,-.639395],[-2.695313,7.03125,0],[-1.978596,6.292969,-.38696],[-2.054687,6.292969,0],[-1.992812,5.625,-.3925],[-2.070312,5.625,0],[-2.281113,7.628906,-1.210801],[-1.070312,7.875,0],[-2.225469,7.03125,-1.155156],[-1.769746,6.292969,-.699434],[-1.780312,5.625,-.71],[-1.740569,7.628906,-1.571726],[-1.070312,7.875,0],[-1.709707,7.03125,-1.49959],[-1.457273,6.292969,-.908284],[-1.462812,5.625,-.9225],[-1.070312,7.628906,-1.703125],[-1.070312,7.875,0],[-1.070312,7.03125,-1.625],[-1.070312,6.292969,-.984375],[-1.070312,5.625,-1],[-.400056,7.628906,-1.571726],[-1.070312,7.628906,-1.703125],[-1.070312,7.875,0],[-.430918,7.03125,-1.49959],[-1.070312,7.03125,-1.625],[-.683352,6.292969,-.908284],[-1.070312,6.292969,-.984375],[-.677812,5.625,-.9225],[-1.070312,5.625,-1],[.140489,7.628906,-1.210801],[-1.070312,7.875,0],[.084844,7.03125,-1.155156],[-.370879,6.292969,-.699434],[-.360312,5.625,-.71],[.501414,7.628906,-.670256],[-1.070312,7.875,0],[.429278,7.03125,-.639395],[-.162029,6.292969,-.38696],[-.147812,5.625,-.3925],[.632813,7.628906,0],[-1.070312,7.875,0],[.554688,7.03125,0],[-.085937,6.292969,0],[-.070312,5.625,0],[-.070312,5.625,0],[-.147812,5.625,.3925],[1.034141,5.179688,.895391],[1.210938,5.179688,0],[2.735,4.875,1.619062],[3.054688,4.875,0],[4.262891,4.570313,2.26914],[4.710938,4.570313,0],[4.925938,4.125,2.55125],[5.429688,4.125,0],[-.360312,5.625,.71],[.549375,5.179688,1.619688],[1.858438,4.875,2.92875],[3.034375,4.570313,4.104687],[3.544688,4.125,4.615],[-.677812,5.625,.9225],[-.174922,5.179688,2.104453],[.54875,4.875,3.805313],[1.198828,4.570313,5.333203],[1.480938,4.125,5.99625],[-1.070312,5.625,1],[-1.070312,5.179688,2.28125],[-1.070312,4.875,4.125],[-1.070312,4.570313,5.78125],[-1.070312,4.125,6.5],[-1.070312,5.625,1],[-1.462812,5.625,.9225],[-1.965703,5.179688,2.104453],[-1.070312,5.179688,2.28125],[-2.689375,4.875,3.805313],[-1.070312,4.875,4.125],[-3.339453,4.570313,5.333203],[-1.070312,4.570313,5.78125],[-3.621562,4.125,5.99625],[-1.070312,4.125,6.5],[-1.780312,5.625,.71],[-2.69,5.179688,1.619688],[-3.999062,4.875,2.92875],[-5.174999,4.570313,4.104687],[-5.685312,4.125,4.615],[-1.992812,5.625,.3925],[-3.174765,5.179688,.895391],[-4.875625,4.875,1.619062],[-6.403516,4.570313,2.26914],[-7.066563,4.125,2.55125],[-2.070312,5.625,0],[-3.351562,5.179688,0],[-5.195313,4.875,0],[-6.851563,4.570313,0],[-7.570313,4.125,0],[-2.070312,5.625,0],[-1.992812,5.625,-.3925],[-3.174765,5.179688,-.895391],[-3.351562,5.179688,0],[-4.875625,4.875,-1.619062],[-5.195313,4.875,0],[-6.403516,4.570313,-2.26914],[-6.851563,4.570313,0],[-7.066563,4.125,-2.55125],[-7.570313,4.125,0],[-1.780312,5.625,-.71],[-2.69,5.179688,-1.619688],[-3.999062,4.875,-2.92875],[-5.174999,4.570313,-4.104687],[-5.685312,4.125,-4.615],[-1.462812,5.625,-.9225],[-1.965703,5.179688,-2.104453],[-2.689375,4.875,-3.805313],[-3.339453,4.570313,-5.333203],[-3.621562,4.125,-5.99625],[-1.070312,5.625,-1],[-1.070312,5.179688,-2.28125],[-1.070312,4.875,-4.125],[-1.070312,4.570313,-5.78125],[-1.070312,4.125,-6.5],[-1.070312,5.625,-1],[-.677812,5.625,-.9225],[-.174922,5.179688,-2.104453],[-1.070312,5.179688,-2.28125],[.54875,4.875,-3.805313],[-1.070312,4.875,-4.125],[1.198828,4.570313,-5.333203],[-1.070312,4.570313,-5.78125],[1.480938,4.125,-5.99625],[-1.070312,4.125,-6.5],[-.360312,5.625,-.71],[.549375,5.179688,-1.619688],[1.858438,4.875,-2.92875],[3.034375,4.570313,-4.104687],[3.544688,4.125,-4.615],[-.147812,5.625,-.3925],[1.034141,5.179688,-.895391],[2.735,4.875,-1.619062],[4.262891,4.570313,-2.26914],[4.925938,4.125,-2.55125],[-.070312,5.625,0],[1.210938,5.179688,0],[3.054688,4.875,0],[4.710938,4.570313,0],[5.429688,4.125,0]],n.g=[[0,1,2],[2,3,0],[3,2,4],[4,5,3],[5,4,6],[6,7,5],[7,6,8],[8,9,7],[1,10,11],[11,2,1],[2,11,12],[12,4,2],[4,12,13],[13,6,4],[6,13,14],[14,8,6],[10,15,16],[16,11,10],[11,16,17],[17,12,11],[12,17,18],[18,13,12],[13,18,19],[19,14,13],[15,20,21],[21,16,15],[16,21,22],[22,17,16],[17,22,23],[23,18,17],[18,23,24],[24,19,18],[25,26,27],[27,28,25],[28,27,29],[29,30,28],[30,29,31],[31,32,30],[32,31,33],[33,34,32],[26,35,36],[36,27,26],[27,36,37],[37,29,27],[29,37,38],[38,31,29],[31,38,39],[39,33,31],[35,40,41],[41,36,35],[36,41,42],[42,37,36],[37,42,43],[43,38,37],[38,43,44],[44,39,38],[40,45,46],[46,41,40],[41,46,47],[47,42,41],[42,47,48],[48,43,42],[43,48,49],[49,44,43],[50,51,52],[52,53,50],[53,52,54],[54,55,53],[55,54,56],[56,57,55],[57,56,58],[58,59,57],[51,60,61],[61,52,51],[52,61,62],[62,54,52],[54,62,63],[63,56,54],[56,63,64],[64,58,56],[60,65,66],[66,61,60],[61,66,67],[67,62,61],[62,67,68],[68,63,62],[63,68,69],[69,64,63],[65,70,71],[71,66,65],[66,71,72],[72,67,66],[67,72,73],[73,68,67],[68,73,74],[74,69,68],[75,76,77],[77,78,75],[78,77,79],[79,80,78],[80,79,81],[81,82,80],[82,81,83],[83,84,82],[76,85,86],[86,77,76],[77,86,87],[87,79,77],[79,87,88],[88,81,79],[81,88,89],[89,83,81],[85,90,91],[91,86,85],[86,91,92],[92,87,86],[87,92,93],[93,88,87],[88,93,94],[94,89,88],[90,95,96],[96,91,90],[91,96,97],[97,92,91],[92,97,98],[98,93,92],[93,98,99],[99,94,93],[100,101,102],[102,103,100],[103,102,104],[104,105,103],[105,104,106],[106,107,105],[107,106,108],[108,109,107],[101,110,111],[111,102,101],[102,111,112],[112,104,102],[104,112,113],[113,106,104],[106,113,114],[114,108,106],[110,115,116],[116,111,110],[111,116,117],[117,112,111],[112,117,118],[118,113,112],[113,118,119],[119,114,113],[115,120,121],[121,116,115],[116,121,122],[122,117,116],[117,122,123],[123,118,117],[118,123,124],[124,119,118],[125,126,127],[127,128,125],[128,127,129],[129,130,128],[130,129,131],[131,132,130],[132,131,133],[133,134,132],[126,135,136],[136,127,126],[127,136,137],[137,129,127],[129,137,138],[138,131,129],[131,138,139],[139,133,131],[135,140,141],[141,136,135],[136,141,142],[142,137,136],[137,142,143],[143,138,137],[138,143,144],[144,139,138],[140,145,146],[146,141,140],[141,146,147],[147,142,141],[142,147,148],[148,143,142],[143,148,149],[149,144,143],[150,151,152],[152,153,150],[153,152,154],[154,155,153],[155,154,156],[156,157,155],[157,156,158],[158,159,157],[151,160,161],[161,152,151],[152,161,162],[162,154,152],[154,162,163],[163,156,154],[156,163,164],[164,158,156],[160,165,166],[166,161,160],[161,166,167],[167,162,161],[162,167,168],[168,163,162],[163,168,169],[169,164,163],[165,170,171],[171,166,165],[166,171,172],[172,167,166],[167,172,173],[173,168,167],[168,173,174],[174,169,168],[175,176,177],[177,178,175],[178,177,179],[179,180,178],[180,179,181],[181,182,180],[182,181,183],[183,184,182],[176,185,186],[186,177,176],[177,186,187],[187,179,177],[179,187,188],[188,181,179],[181,188,189],[189,183,181],[185,190,191],[191,186,185],[186,191,192],[192,187,186],[187,192,193],[193,188,187],[188,193,194],[194,189,188],[190,195,196],[196,191,190],[191,196,197],[197,192,191],[192,197,198],[198,193,192],[193,198,199],[199,194,193],[200,201,202],[202,203,200],[203,202,204],[204,205,203],[205,204,206],[206,207,205],[207,206,208],[208,209,207],[201,210,211],[211,202,201],[202,211,212],[212,204,202],[204,212,213],[213,206,204],[206,213,214],[214,208,206],[210,215,216],[216,211,210],[211,216,217],[217,212,211],[212,217,218],[218,213,212],[213,218,219],[219,214,213],[215,220,221],[221,216,215],[216,221,222],[222,217,216],[217,222,223],[223,218,217],[218,223,224],[224,219,218],[225,226,227],[227,228,225],[228,227,229],[229,230,228],[230,229,231],[231,232,230],[232,231,233],[233,234,232],[226,235,236],[236,227,226],[227,236,237],[237,229,227],[229,237,238],[238,231,229],[231,238,239],[239,233,231],[235,240,241],[241,236,235],[236,241,242],[242,237,236],[237,242,243],[243,238,237],[238,243,244],[244,239,238],[240,245,246],[246,241,240],[241,246,247],[247,242,241],[242,247,248],[248,243,242],[243,248,249],[249,244,243],[250,251,252],[252,253,250],[253,252,254],[254,255,253],[255,254,256],[256,257,255],[257,256,258],[258,259,257],[251,260,261],[261,252,251],[252,261,262],[262,254,252],[254,262,263],[263,256,254],[256,263,264],[264,258,256],[260,265,266],[266,261,260],[261,266,267],[267,262,261],[262,267,268],[268,263,262],[263,268,269],[269,264,263],[265,270,271],[271,266,265],[266,271,272],[272,267,266],[267,272,273],[273,268,267],[268,273,274],[274,269,268],[275,276,277],[277,278,275],[278,277,279],[279,280,278],[280,279,281],[281,282,280],[282,281,283],[283,284,282],[276,285,286],[286,277,276],[277,286,287],[287,279,277],[279,287,288],[288,281,279],[281,288,289],[289,283,281],[285,290,291],[291,286,285],[286,291,292],[292,287,286],[287,292,293],[293,288,287],[288,293,294],[294,289,288],[290,295,296],[296,291,290],[291,296,297],[297,292,291],[292,297,298],[298,293,292],[293,298,299],[299,294,293],[300,301,302],[302,303,300],[303,302,304],[304,305,303],[305,304,306],[306,307,305],[307,306,308],[301,309,310],[310,302,301],[302,310,311],[311,304,302],[304,311,312],[312,306,304],[306,312,313],[309,314,315],[315,310,309],[310,315,316],[316,311,310],[311,316,317],[317,312,311],[312,317,318],[314,319,320],[320,315,314],[315,320,321],[321,316,315],[316,321,322],[322,317,316],[317,322,323],[324,325,326],[326,327,324],[327,326,328],[328,329,327],[329,328,330],[330,331,329],[331,330,332],[325,333,334],[334,326,325],[326,334,335],[335,328,326],[328,335,336],[336,330,328],[330,336,337],[333,338,339],[339,334,333],[334,339,340],[340,335,334],[335,340,341],[341,336,335],[336,341,342],[338,343,344],[344,339,338],[339,344,345],[345,340,339],[340,345,346],[346,341,340],[341,346,347],[348,349,350],[350,351,348],[351,350,352],[352,353,351],[353,352,354],[354,355,353],[355,354,356],[349,357,358],[358,350,349],[350,358,359],[359,352,350],[352,359,360],[360,354,352],[354,360,361],[357,362,363],[363,358,357],[358,363,364],[364,359,358],[359,364,365],[365,360,359],[360,365,366],[362,367,368],[368,363,362],[363,368,369],[369,364,363],[364,369,370],[370,365,364],[365,370,371],[372,373,374],[374,375,372],[375,374,376],[376,377,375],[377,376,378],[378,379,377],[379,378,380],[373,381,382],[382,374,373],[374,382,383],[383,376,374],[376,383,384],[384,378,376],[378,384,385],[381,386,387],[387,382,381],[382,387,388],[388,383,382],[383,388,389],[389,384,383],[384,389,390],[386,391,392],[392,387,386],[387,392,393],[393,388,387],[388,393,394],[394,389,388],[389,394,395],[396,397,398],[398,399,396],[399,398,400],[400,401,399],[401,400,402],[402,403,401],[403,402,404],[404,405,403],[397,406,407],[407,398,397],[398,407,408],[408,400,398],[400,408,409],[409,402,400],[402,409,410],[410,404,402],[406,411,412],[412,407,406],[407,412,413],[413,408,407],[408,413,414],[414,409,408],[409,414,415],[415,410,409],[411,416,417],[417,412,411],[412,417,418],[418,413,412],[413,418,419],[419,414,413],[414,419,420],[420,415,414],[421,422,423],[423,424,421],[424,423,425],[425,426,424],[426,425,427],[427,428,426],[428,427,429],[429,430,428],[422,431,432],[432,423,422],[423,432,433],[433,425,423],[425,433,434],[434,427,425],[427,434,435],[435,429,427],[431,436,437],[437,432,431],[432,437,438],[438,433,432],[433,438,439],[439,434,433],[434,439,440],[440,435,434],[436,441,442],[442,437,436],[437,442,443],[443,438,437],[438,443,444],[444,439,438],[439,444,445],[445,440,439],[446,447,448],[448,449,446],[449,448,450],[450,451,449],[451,450,452],[452,453,451],[453,452,454],[454,455,453],[447,456,457],[457,448,447],[448,457,458],[458,450,448],[450,458,459],[459,452,450],[452,459,460],[460,454,452],[456,461,462],[462,457,456],[457,462,463],[463,458,457],[458,463,464],[464,459,458],[459,464,465],[465,460,459],[461,466,467],[467,462,461],[462,467,468],[468,463,462],[463,468,469],[469,464,463],[464,469,470],[470,465,464],[471,472,473],[473,474,471],[474,473,475],[475,476,474],[476,475,477],[477,478,476],[478,477,479],[479,480,478],[472,481,482],[482,473,472],[473,482,483],[483,475,473],[475,483,484],[484,477,475],[477,484,485],[485,479,477],[481,486,487],[487,482,481],[482,487,488],[488,483,482],[483,488,489],[489,484,483],[484,489,490],[490,485,484],[486,491,492],[492,487,486],[487,492,493],[493,488,487],[488,493,494],[494,489,488],[489,494,495],[495,490,489],[496,497,498],[498,499,496],[499,498,500],[500,501,499],[501,500,502],[502,503,501],[503,502,504],[504,505,503],[497,506,507],[507,498,497],[498,507,508],[508,500,498],[500,508,509],[509,502,500],[502,509,510],[510,504,502],[506,511,512],[512,507,506],[507,512,513],[513,508,507],[508,513,514],[514,509,508],[509,514,515],[515,510,509],[511,516,517],[517,512,511],[512,517,518],[518,513,512],[513,518,519],[519,514,513],[514,519,520],[520,515,514],[521,522,523],[523,524,521],[524,523,525],[525,526,524],[526,525,527],[527,528,526],[528,527,529],[529,530,528],[522,531,532],[532,523,522],[523,532,533],[533,525,523],[525,533,534],[534,527,525],[527,534,535],[535,529,527],[531,536,537],[537,532,531],[532,537,538],[538,533,532],[533,538,539],[539,534,533],[534,539,540],[540,535,534],[536,541,542],[542,537,536],[537,542,543],[543,538,537],[538,543,544],[544,539,538],[539,544,545],[545,540,539],[546,547,548],[548,549,546],[549,548,550],[550,551,549],[551,550,552],[552,553,551],[553,552,554],[554,555,553],[547,556,557],[557,548,547],[548,557,558],[558,550,548],[550,558,559],[559,552,550],[552,559,560],[560,554,552],[556,561,562],[562,557,556],[557,562,563],[563,558,557],[558,563,564],[564,559,558],[559,564,565],[565,560,559],[561,566,567],[567,562,561],[562,567,568],[568,563,562],[563,568,569],[569,564,563],[564,569,570],[570,565,564],[571,572,573],[573,574,571],[574,573,575],[575,576,574],[576,575,577],[577,578,576],[578,577,579],[579,580,578],[572,581,582],[582,573,572],[573,582,583],[583,575,573],[575,583,584],[584,577,575],[577,584,585],[585,579,577],[581,586,587],[587,582,581],[582,587,588],[588,583,582],[583,588,589],[589,584,583],[584,589,590],[590,585,584],[586,591,592],[592,587,586],[587,592,593],[593,588,587],[588,593,594],[594,589,588],[589,594,595],[595,590,589],[596,597,598],[597,596,599],[599,600,597],[600,599,601],[601,602,600],[602,601,603],[603,604,602],[605,596,606],[596,605,607],[607,599,596],[599,607,608],[608,601,599],[601,608,609],[609,603,601],[610,605,611],[605,610,612],[612,607,605],[607,612,613],[613,608,607],[608,613,614],[614,609,608],[615,610,616],[610,615,617],[617,612,610],[612,617,618],[618,613,612],[613,618,619],[619,614,613],[620,621,622],[621,620,623],[623,624,621],[624,623,625],[625,626,624],[626,625,627],[627,628,626],[629,620,630],[620,629,631],[631,623,620],[623,631,632],[632,625,623],[625,632,633],[633,627,625],[634,629,635],[629,634,636],[636,631,629],[631,636,637],[637,632,631],[632,637,638],[638,633,632],[639,634,640],[634,639,641],[641,636,634],[636,641,642],[642,637,636],[637,642,643],[643,638,637],[644,645,646],[645,644,647],[647,648,645],[648,647,649],[649,650,648],[650,649,651],[651,652,650],[653,644,654],[644,653,655],[655,647,644],[647,655,656],[656,649,647],[649,656,657],[657,651,649],[658,653,659],[653,658,660],[660,655,653],[655,660,661],[661,656,655],[656,661,662],[662,657,656],[663,658,664],[658,663,665],[665,660,658],[660,665,666],[666,661,660],[661,666,667],[667,662,661],[668,669,670],[669,668,671],[671,672,669],[672,671,673],[673,674,672],[674,673,675],[675,676,674],[677,668,678],[668,677,679],[679,671,668],[671,679,680],[680,673,671],[673,680,681],[681,675,673],[682,677,683],[677,682,684],[684,679,677],[679,684,685],[685,680,679],[680,685,686],[686,681,680],[687,682,688],[682,687,689],[689,684,682],[684,689,690],[690,685,684],[685,690,691],[691,686,685],[692,693,694],[694,695,692],[695,694,696],[696,697,695],[697,696,698],[698,699,697],[699,698,700],[700,701,699],[693,702,703],[703,694,693],[694,703,704],[704,696,694],[696,704,705],[705,698,696],[698,705,706],[706,700,698],[702,707,708],[708,703,702],[703,708,709],[709,704,703],[704,709,710],[710,705,704],[705,710,711],[711,706,705],[707,712,713],[713,708,707],[708,713,714],[714,709,708],[709,714,715],[715,710,709],[710,715,716],[716,711,710],[717,718,719],[719,720,717],[720,719,721],[721,722,720],[722,721,723],[723,724,722],[724,723,725],[725,726,724],[718,727,728],[728,719,718],[719,728,729],[729,721,719],[721,729,730],[730,723,721],[723,730,731],[731,725,723],[727,732,733],[733,728,727],[728,733,734],[734,729,728],[729,734,735],[735,730,729],[730,735,736],[736,731,730],[732,737,738],[738,733,732],[733,738,739],[739,734,733],[734,739,740],[740,735,734],[735,740,741],[741,736,735],[742,743,744],[744,745,742],[745,744,746],[746,747,745],[747,746,748],[748,749,747],[749,748,750],[750,751,749],[743,752,753],[753,744,743],[744,753,754],[754,746,744],[746,754,755],[755,748,746],[748,755,756],[756,750,748],[752,757,758],[758,753,752],[753,758,759],[759,754,753],[754,759,760],[760,755,754],[755,760,761],[761,756,755],[757,762,763],[763,758,757],[758,763,764],[764,759,758],[759,764,765],[765,760,759],[760,765,766],[766,761,760],[767,768,769],[769,770,767],[770,769,771],[771,772,770],[772,771,773],[773,774,772],[774,773,775],[775,776,774],[768,777,778],[778,769,768],[769,778,779],[779,771,769],[771,779,780],[780,773,771],[773,780,781],[781,775,773],[777,782,783],[783,778,777],[778,783,784],[784,779,778],[779,784,785],[785,780,779],[780,785,786],[786,781,780],[782,787,788],[788,783,782],[783,788,789],[789,784,783],[784,789,790],[790,785,784],[785,790,791],[791,786,785]]}}]); \ No newline at end of file diff --git a/_next/static/chunks/73.c38a93640c1ff80d.js b/_next/static/chunks/73.c38a93640c1ff80d.js new file mode 100644 index 00000000..433731db --- /dev/null +++ b/_next/static/chunks/73.c38a93640c1ff80d.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[73],{5671:function(e,n,t){"use strict";t.d(n,{Tl:function(){return f},hu:function(){return d}});var i=t(5893),r=t(9008),a=t.n(r),o=t(1163),s=t(7294),l=t(9147),u=t.n(l);t(7319);let c=e=>{let n=(0,s.useRef)(null),r=(0,s.useMemo)(()=>e.sources.map(e=>{let{name:n,contents:r}=e;return{name:n,...function(e){let n;let r=null;{r=document.createElement("div");let a=t(4631);n=a(r,{lineNumbers:!0,lineWrapping:!0,theme:"monokai",readOnly:!0})}return{Container:function(t){return(0,i.jsx)("div",{...t,children:(0,i.jsx)("div",{ref(t){r&&t&&(t.appendChild(r),n.setOption("value",e))}})})}}}(r)}}),e.sources),l=(0,s.useRef)(null),c=(0,s.useMemo)(()=>{if(e.gui){let n=t(4376);return new n.GUI({autoPlace:!1})}},[]),f=(0,s.useRef)(null),d=(0,s.useMemo)(()=>{if(e.stats){let n=t(2792);return new n}},[]),m=(0,o.useRouter)(),p=m.asPath.match(/#([a-zA-Z0-9\.\/]+)/),[g,h]=(0,s.useState)(null),[b,v]=(0,s.useState)(null);return(0,s.useEffect)(()=>{if(p?v(p[1]):v(r[0].name),c&&l.current)for(l.current.appendChild(c.domElement);c.__controllers.length>0;)c.__controllers[0].remove();d&&f.current&&(d.dom.style.position="absolute",d.showPanel(1),f.current.appendChild(d.dom));let t={active:!0},i=()=>{t.active=!1};try{let a=n.current;if(!a)throw Error("The canvas is not available");let o=e.init({canvas:a,pageState:t,gui:c,stats:d});o instanceof Promise&&o.catch(e=>{console.error(e),h(e)})}catch(s){console.error(s),h(s)}return i},[]),(0,i.jsxs)("main",{children:[(0,i.jsxs)(a(),{children:[(0,i.jsx)("style",{dangerouslySetInnerHTML:{__html:"\n .CodeMirror {\n height: auto !important;\n margin: 1em 0;\n }\n\n .CodeMirror-scroll {\n height: auto !important;\n overflow: visible !important;\n }\n "}}),(0,i.jsx)("title",{children:"".concat(e.name," - WebGPU Samples")}),(0,i.jsx)("meta",{name:"description",content:e.description}),(0,i.jsx)("meta",{httpEquiv:"origin-trial",content:e.originTrial})]}),(0,i.jsxs)("div",{children:[(0,i.jsx)("h1",{children:e.name}),(0,i.jsx)("a",{target:"_blank",rel:"noreferrer",href:"https://github.com/".concat("webgpu/webgpu-samples","/tree/main/").concat(e.filename),children:"See it on Github!"}),(0,i.jsx)("p",{children:e.description}),g?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("p",{children:"Something went wrong. Do your browser and device support WebGPU?"}),(0,i.jsx)("p",{children:"".concat(g)})]}):null]}),(0,i.jsxs)("div",{className:u().canvasContainer,children:[(0,i.jsx)("div",{style:{position:"absolute",left:10},ref:f}),(0,i.jsx)("div",{style:{position:"absolute",right:10},ref:l}),(0,i.jsx)("canvas",{ref:n})]}),(0,i.jsxs)("div",{children:[(0,i.jsx)("nav",{className:u().sourceFileNav,children:(0,i.jsx)("ul",{children:r.map((e,n)=>(0,i.jsx)("li",{children:(0,i.jsx)("a",{href:"#".concat(e.name),"data-active":b==e.name,onClick(){v(e.name)},children:e.name})},n))})}),r.map((e,n)=>(0,i.jsx)(e.Container,{className:u().sourceFileContainer,"data-active":b==e.name},n))]})]})},f=e=>(0,i.jsx)(c,{...e});function d(e,n){if(!e)throw Error(n)}},9385:function(e,n,t){"use strict";t.d(n,{b:function(){return r},q:function(){return o}});var i=t(6416);function r(e,n){let t=e.map(()=>[0,0,0]);return n.forEach(n=>{let[r,a,o]=n,s=e[r],l=e[a],u=e[o],c=i.R3.subtract(l,s),f=i.R3.subtract(u,s);i.R3.normalize(c,c),i.R3.normalize(f,f);let d=i.R3.cross(c,f);i.R3.add(t[r],d,t[r]),i.R3.add(t[a],d,t[a]),i.R3.add(t[o],d,t[o])}),t.forEach(e=>{i.R3.normalize(e,e)}),t}let a={xy:[0,1],xz:[0,2],yz:[1,2]};function o(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"xy",t=a[n],i=e.map(()=>[0,0]),r=[1/0,1/0],o=[-1/0,-1/0];return e.forEach((e,n)=>{i[n][0]=e[t[0]],i[n][1]=e[t[1]],r[0]=Math.min(e[t[0]],r[0]),r[1]=Math.min(e[t[1]],r[1]),o[0]=Math.max(e[t[0]],o[0]),o[1]=Math.max(e[t[1]],o[1])}),i.forEach(e=>{e[0]=(e[0]-r[0])/(o[0]-r[0]),e[1]=(e[1]-r[1])/(o[1]-r[1])}),i}},3073:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return p}});var i=t(6416),r=t(5671),a=t(8748),o=t(9385);let s={positions:a.m,triangles:a.g,normals:[]};s.normals=(0,o.b)(s.positions,s.triangles);var l="struct Uniforms {\n modelViewProjectionMatrix: mat4x4,\n};\n\n@binding(0) @group(0) var uniforms: Uniforms;\n\nstruct VertexOutput {\n @builtin(position) position: vec4,\n @location(0) @interpolate(flat) instance: u32\n};\n\n@vertex\nfn main_vs(@location(0) position: vec4, @builtin(instance_index) instance: u32) -> VertexOutput {\n var output: VertexOutput;\n\n // distribute instances into a staggered 4x4 grid\n const gridWidth = 125.0;\n const cellSize = gridWidth / 4.0;\n let row = instance / 2u;\n let col = instance % 2u;\n\n let xOffset = -gridWidth / 2.0 + cellSize / 2.0 + 2.0 * cellSize * f32(col) + f32(row % 2u != 0u) * cellSize;\n let zOffset = -gridWidth / 2.0 + cellSize / 2.0 + 2.0 + f32(row) * cellSize;\n\n let offsetPos = vec4(position.x + xOffset, position.y, position.z + zOffset, position.w);\n\n output.position = uniforms.modelViewProjectionMatrix * offsetPos;\n output.instance = instance;\n return output;\n}\n\n@fragment\nfn main_fs(@location(0) @interpolate(flat) instance: u32) -> @location(0) vec4 {\n const colors = array,6>(\n vec3(1.0, 0.0, 0.0),\n vec3(0.0, 1.0, 0.0),\n vec3(0.0, 0.0, 1.0),\n vec3(1.0, 0.0, 1.0),\n vec3(1.0, 1.0, 0.0),\n vec3(0.0, 1.0, 1.0),\n );\n\n return vec4(colors[instance % 6u], 1.0);\n}",u="struct Uniforms {\n modelViewProjectionMatrix: mat4x4,\n maxStorableFragments: u32,\n targetWidth: u32,\n};\n\nstruct SliceInfo {\n sliceStartY: i32\n};\n\nstruct Heads {\n numFragments: atomic,\n data: array>\n};\n\nstruct LinkedListElement {\n color: vec4,\n depth: f32,\n next: u32\n};\n\nstruct LinkedList {\n data: array\n};\n\n@binding(0) @group(0) var uniforms: Uniforms;\n@binding(1) @group(0) var heads: Heads;\n@binding(2) @group(0) var linkedList: LinkedList;\n@binding(3) @group(0) var opaqueDepthTexture: texture_depth_2d;\n@binding(4) @group(0) var sliceInfo: SliceInfo;\n\nstruct VertexOutput {\n @builtin(position) position: vec4,\n @location(0) @interpolate(flat) instance: u32\n};\n\n@vertex\nfn main_vs(@location(0) position: vec4, @builtin(instance_index) instance: u32) -> VertexOutput {\n var output: VertexOutput;\n\n // distribute instances into a staggered 4x4 grid\n const gridWidth = 125.0;\n const cellSize = gridWidth / 4.0;\n let row = instance / 2u;\n let col = instance % 2u;\n\n let xOffset = -gridWidth / 2.0 + cellSize / 2.0 + 2.0 * cellSize * f32(col) + f32(row % 2u == 0u) * cellSize;\n let zOffset = -gridWidth / 2.0 + cellSize / 2.0 + 2.0 + f32(row) * cellSize;\n\n let offsetPos = vec4(position.x + xOffset, position.y, position.z + zOffset, position.w);\n\n output.position = uniforms.modelViewProjectionMatrix * offsetPos;\n output.instance = instance;\n\n return output;\n}\n\n@fragment\nfn main_fs(@builtin(position) position: vec4, @location(0) @interpolate(flat) instance: u32) {\n const colors = array,6>(\n vec3(1.0, 0.0, 0.0),\n vec3(0.0, 1.0, 0.0),\n vec3(0.0, 0.0, 1.0),\n vec3(1.0, 0.0, 1.0),\n vec3(1.0, 1.0, 0.0),\n vec3(0.0, 1.0, 1.0),\n );\n\n let fragCoords = vec2(position.xy);\n let opaqueDepth = textureLoad(opaqueDepthTexture, fragCoords, 0);\n\n // reject fragments behind opaque objects\n if position.z >= opaqueDepth {\n discard;\n }\n\n // The index in the heads buffer corresponding to the head data for the fragment at\n // the current location.\n let headsIndex = u32(fragCoords.y - sliceInfo.sliceStartY) * uniforms.targetWidth + u32(fragCoords.x);\n\n // The index in the linkedList buffer at which to store the new fragment\n let fragIndex = atomicAdd(&heads.numFragments, 1u);\n\n // If we run out of space to store the fragments, we just lose them\n if fragIndex < uniforms.maxStorableFragments {\n let lastHead = atomicExchange(&heads.data[headsIndex], fragIndex);\n linkedList.data[fragIndex].depth = position.z;\n linkedList.data[fragIndex].next = lastHead;\n linkedList.data[fragIndex].color = vec4(colors[(instance + 3u) % 6u], 0.3);\n }\n}",c="struct Uniforms {\n modelViewProjectionMatrix: mat4x4,\n maxStorableFragments: u32,\n targetWidth: u32,\n};\n\nstruct SliceInfo {\n sliceStartY: i32\n};\n\nstruct Heads {\n numFragments: u32,\n data: array\n};\n\nstruct LinkedListElement {\n color: vec4,\n depth: f32,\n next: u32\n};\n\nstruct LinkedList {\n data: array\n};\n\n@binding(0) @group(0) var uniforms: Uniforms;\n@binding(1) @group(0) var heads: Heads;\n@binding(2) @group(0) var linkedList: LinkedList;\n@binding(3) @group(0) var sliceInfo: SliceInfo;\n\n// Output a full screen quad\n@vertex\nfn main_vs(@builtin(vertex_index) vertIndex: u32) -> @builtin(position) vec4 {\n const position = array, 6>(\n vec2(-1.0, -1.0),\n vec2(1.0, -1.0),\n vec2(1.0, 1.0),\n vec2(-1.0, -1.0),\n vec2(1.0, 1.0),\n vec2(-1.0, 1.0),\n );\n \n return vec4(position[vertIndex], 0.0, 1.0);\n}\n\n@fragment\nfn main_fs(@builtin(position) position: vec4) -> @location(0) vec4 {\n let fragCoords = vec2(position.xy);\n let headsIndex = u32(fragCoords.y - sliceInfo.sliceStartY) * uniforms.targetWidth + u32(fragCoords.x);\n\n // The maximum layers we can process for any pixel\n const maxLayers = 24u;\n\n var layers: array;\n\n var numLayers = 0u;\n var elementIndex = heads.data[headsIndex];\n\n // copy the list elements into an array up to the maximum amount of layers\n while elementIndex != 0xFFFFFFFFu && numLayers < maxLayers {\n layers[numLayers] = linkedList.data[elementIndex];\n numLayers++;\n elementIndex = linkedList.data[elementIndex].next;\n }\n\n if numLayers == 0u {\n discard;\n }\n \n // sort the fragments by depth\n for (var i = 1u; i < numLayers; i++) {\n let toInsert = layers[i];\n var j = i;\n\n while j > 0u && toInsert.depth > layers[j - 1u].depth {\n layers[j] = layers[j - 1u];\n j--;\n }\n\n layers[j] = toInsert;\n }\n\n // pre-multiply alpha for the first layer\n var color = vec4(layers[0].color.a * layers[0].color.rgb, layers[0].color.a);\n\n // blend the remaining layers\n for (var i = 1u; i < numLayers; i++) {\n let mixed = mix(color.rgb, layers[i].color.rgb, layers[i].color.aaa);\n color = vec4(mixed, color.a);\n }\n\n return color;\n}",f="src/sample/a-buffer/main.ts";let d=async e=>{let{canvas:n,pageState:t,gui:r}=e,a=await navigator.gpu.requestAdapter(),o=await a.requestDevice();if(!t.active)return;let f=n.getContext("webgpu"),d=navigator.gpu.getPreferredCanvasFormat();f.configure({device:o,format:d,alphaMode:"premultiplied"});let m=new URLSearchParams(window.location.search),p={memoryStrategy:m.get("memoryStrategy")||"multipass"},g=o.createBuffer({size:3*s.positions.length*Float32Array.BYTES_PER_ELEMENT,usage:GPUBufferUsage.VERTEX,mappedAtCreation:!0,label:"vertexBuffer"});{let h=new Float32Array(g.getMappedRange());for(let b=0;b{let e=window.devicePixelRatio||1;"clamp-pixel-ratio"===p.memoryStrategy&&(e=Math.min(window.devicePixelRatio,3)),n.width=n.clientWidth*e,n.height=n.clientHeight*e;let t=o.createTexture({size:[n.width,n.height],format:"depth24plus",usage:GPUTextureUsage.RENDER_ATTACHMENT|GPUTextureUsage.TEXTURE_BINDING,label:"depthTexture"}),r=t.createView({label:"depthTextureView"}),a=5*Float32Array.BYTES_PER_ELEMENT+1*Uint32Array.BYTES_PER_ELEMENT,l=4*n.width*a,u=Math.floor(o.limits.maxStorageBufferBindingSize/l),c=Math.ceil(n.height/u),d=Math.ceil(n.height/c),m=o.createBuffer({size:d*l,usage:GPUBufferUsage.STORAGE|GPUBufferUsage.COPY_DST,label:"linkedListBuffer"}),h=o.createBuffer({size:c*o.limits.minUniformBufferOffsetAlignment,usage:GPUBufferUsage.UNIFORM,mappedAtCreation:!0,label:"sliceInfoBuffer"});{let b=new Int32Array(h.getMappedRange()),v=o.limits.minUniformBufferOffsetAlignment/Int32Array.BYTES_PER_ELEMENT;for(let E=0;E{C=z()};r.add(p,"memoryStrategy",["multipass","clamp-pixel-ratio"]).onFinishChange(N),requestAnimationFrame(function e(){t.active&&(C(),requestAnimationFrame(e))})},m=()=>(0,r.Tl)({name:"A-Buffer",description:"Demonstrates order independent transparency using a per-pixel \n linked-list of translucent fragments. Provides a choice for \n limiting memory usage (when required).",gui:!0,init:d,sources:[{name:f.substring(20),contents:"import { mat4, vec3 } from 'wgpu-matrix';\nimport { makeSample, SampleInit } from '../../components/SampleLayout';\n\nimport { mesh } from '../../meshes/teapot';\n\nimport opaqueWGSL from './opaque.wgsl';\nimport translucentWGSL from './translucent.wgsl';\nimport compositeWGSL from './composite.wgsl';\n\nfunction roundUp(n: number, k: number): number {\n return Math.ceil(n / k) * k;\n}\n\nconst init: SampleInit = async ({ canvas, pageState, gui }) => {\n const adapter = await navigator.gpu.requestAdapter();\n const device = await adapter.requestDevice();\n\n if (!pageState.active) return;\n\n const context = canvas.getContext('webgpu') as GPUCanvasContext;\n const presentationFormat = navigator.gpu.getPreferredCanvasFormat();\n\n context.configure({\n device,\n format: presentationFormat,\n alphaMode: 'premultiplied',\n });\n\n const params = new URLSearchParams(window.location.search);\n\n const settings = {\n memoryStrategy: params.get('memoryStrategy') || 'multipass',\n };\n\n // Create the model vertex buffer\n const vertexBuffer = device.createBuffer({\n size: 3 * mesh.positions.length * Float32Array.BYTES_PER_ELEMENT,\n usage: GPUBufferUsage.VERTEX,\n mappedAtCreation: true,\n label: 'vertexBuffer',\n });\n {\n const mapping = new Float32Array(vertexBuffer.getMappedRange());\n for (let i = 0; i < mesh.positions.length; ++i) {\n mapping.set(mesh.positions[i], 3 * i);\n }\n vertexBuffer.unmap();\n }\n\n // Create the model index buffer\n const indexCount = mesh.triangles.length * 3;\n const indexBuffer = device.createBuffer({\n size: indexCount * Uint16Array.BYTES_PER_ELEMENT,\n usage: GPUBufferUsage.INDEX,\n mappedAtCreation: true,\n label: 'indexBuffer',\n });\n {\n const mapping = new Uint16Array(indexBuffer.getMappedRange());\n for (let i = 0; i < mesh.triangles.length; ++i) {\n mapping.set(mesh.triangles[i], 3 * i);\n }\n indexBuffer.unmap();\n }\n\n // Uniforms contains:\n // * modelViewProjectionMatrix: mat4x4\n // * maxStorableFragments: u32\n // * targetWidth: u32\n const uniformsSize = roundUp(\n 16 * Float32Array.BYTES_PER_ELEMENT + 2 * Uint32Array.BYTES_PER_ELEMENT,\n 16\n );\n\n const uniformBuffer = device.createBuffer({\n size: uniformsSize,\n usage: GPUBufferUsage.UNIFORM | GPUBufferUsage.COPY_DST,\n label: 'uniformBuffer',\n });\n\n const opaqueModule = device.createShaderModule({\n code: opaqueWGSL,\n label: 'opaqueModule',\n });\n\n const opaquePipeline = device.createRenderPipeline({\n layout: 'auto',\n vertex: {\n module: opaqueModule,\n entryPoint: 'main_vs',\n buffers: [\n {\n arrayStride: 3 * Float32Array.BYTES_PER_ELEMENT,\n attributes: [\n {\n // position\n format: 'float32x3',\n offset: 0,\n shaderLocation: 0,\n },\n ],\n },\n ],\n },\n fragment: {\n module: opaqueModule,\n entryPoint: 'main_fs',\n targets: [\n {\n format: presentationFormat,\n },\n ],\n },\n primitive: {\n topology: 'triangle-list',\n },\n depthStencil: {\n depthWriteEnabled: true,\n depthCompare: 'less',\n format: 'depth24plus',\n },\n label: 'opaquePipeline',\n });\n\n const opaquePassDescriptor: GPURenderPassDescriptor = {\n colorAttachments: [\n {\n view: undefined,\n clearValue: { r: 0, g: 0, b: 0, a: 1.0 },\n loadOp: 'clear',\n storeOp: 'store',\n },\n ],\n depthStencilAttachment: {\n view: undefined,\n depthClearValue: 1.0,\n depthLoadOp: 'clear',\n depthStoreOp: 'store',\n },\n label: 'opaquePassDescriptor',\n };\n\n const opaqueBindGroup = device.createBindGroup({\n layout: opaquePipeline.getBindGroupLayout(0),\n entries: [\n {\n binding: 0,\n resource: {\n buffer: uniformBuffer,\n size: 16 * Float32Array.BYTES_PER_ELEMENT,\n label: 'modelViewProjection',\n },\n },\n ],\n label: 'opaquePipeline',\n });\n\n const translucentModule = device.createShaderModule({\n code: translucentWGSL,\n label: 'translucentModule',\n });\n\n const translucentBindGroupLayout = device.createBindGroupLayout({\n label: 'translucentBindGroupLayout',\n entries: [\n {\n binding: 0,\n visibility: GPUShaderStage.VERTEX | GPUShaderStage.FRAGMENT,\n buffer: {\n type: 'uniform',\n },\n },\n {\n binding: 1,\n visibility: GPUShaderStage.FRAGMENT,\n buffer: {\n type: 'storage',\n },\n },\n {\n binding: 2,\n visibility: GPUShaderStage.FRAGMENT,\n buffer: {\n type: 'storage',\n },\n },\n {\n binding: 3,\n visibility: GPUShaderStage.FRAGMENT,\n texture: { sampleType: 'depth' },\n },\n {\n binding: 4,\n visibility: GPUShaderStage.FRAGMENT,\n buffer: {\n type: 'uniform',\n hasDynamicOffset: true,\n },\n },\n ],\n });\n\n const translucentPipeline = device.createRenderPipeline({\n layout: device.createPipelineLayout({\n bindGroupLayouts: [translucentBindGroupLayout],\n label: 'translucentPipelineLayout',\n }),\n vertex: {\n module: translucentModule,\n entryPoint: 'main_vs',\n buffers: [\n {\n arrayStride: 3 * Float32Array.BYTES_PER_ELEMENT,\n attributes: [\n {\n format: 'float32x3',\n offset: 0,\n shaderLocation: 0,\n },\n ],\n },\n ],\n },\n fragment: {\n module: translucentModule,\n entryPoint: 'main_fs',\n targets: [\n {\n format: presentationFormat,\n writeMask: 0x0,\n },\n ],\n },\n primitive: {\n topology: 'triangle-list',\n },\n label: 'translucentPipeline',\n });\n\n const translucentPassDescriptor: GPURenderPassDescriptor = {\n colorAttachments: [\n {\n loadOp: 'load',\n storeOp: 'store',\n view: undefined,\n },\n ],\n label: 'translucentPassDescriptor',\n };\n\n const compositeModule = device.createShaderModule({\n code: compositeWGSL,\n label: 'compositeModule',\n });\n\n const compositeBindGroupLayout = device.createBindGroupLayout({\n label: 'compositeBindGroupLayout',\n entries: [\n {\n binding: 0,\n visibility: GPUShaderStage.VERTEX | GPUShaderStage.FRAGMENT,\n buffer: {\n type: 'uniform',\n },\n },\n {\n binding: 1,\n visibility: GPUShaderStage.FRAGMENT,\n buffer: {\n type: 'storage',\n },\n },\n {\n binding: 2,\n visibility: GPUShaderStage.FRAGMENT,\n buffer: {\n type: 'storage',\n },\n },\n {\n binding: 3,\n visibility: GPUShaderStage.FRAGMENT,\n buffer: {\n type: 'uniform',\n hasDynamicOffset: true,\n },\n },\n ],\n });\n\n const compositePipeline = device.createRenderPipeline({\n layout: device.createPipelineLayout({\n bindGroupLayouts: [compositeBindGroupLayout],\n label: 'compositePipelineLayout',\n }),\n vertex: {\n module: compositeModule,\n entryPoint: 'main_vs',\n },\n fragment: {\n module: compositeModule,\n entryPoint: 'main_fs',\n targets: [\n {\n format: presentationFormat,\n blend: {\n color: {\n srcFactor: 'one',\n operation: 'add',\n dstFactor: 'one-minus-src-alpha',\n },\n alpha: {},\n },\n },\n ],\n },\n primitive: {\n topology: 'triangle-list',\n },\n label: 'compositePipeline',\n });\n\n const compositePassDescriptor: GPURenderPassDescriptor = {\n colorAttachments: [\n {\n view: undefined,\n loadOp: 'load',\n storeOp: 'store',\n },\n ],\n label: 'compositePassDescriptor',\n };\n\n const configure = () => {\n let devicePixelRatio = window.devicePixelRatio || 1;\n\n // The default maximum storage buffer binding size is 128Mib. The amount\n // of memory we need to store transparent fragments depends on the size\n // of the canvas and the average number of layers per fragment we want to\n // support. When the devicePixelRatio is 1, we know that 128Mib is enough\n // to store 4 layers per pixel at 600x600. However, when the device pixel\n // ratio is high enough we will exceed this limit.\n //\n // We provide 2 choices of mitigations to this issue:\n // 1) Clamp the device pixel ratio to a value which we know will not break\n // the limit. The tradeoff here is that the canvas resolution will not\n // match the native resolution and therefore may have a reduction in\n // quality.\n // 2) Break the frame into a series of horizontal slices using the scissor\n // functionality and process a single slice at a time. This limits memory\n // usage because we only need enough memory to process the dimensions\n // of the slice. The tradeoff is the performance reduction due to multiple\n // passes.\n if (settings.memoryStrategy === 'clamp-pixel-ratio') {\n devicePixelRatio = Math.min(window.devicePixelRatio, 3);\n }\n\n canvas.width = canvas.clientWidth * devicePixelRatio;\n canvas.height = canvas.clientHeight * devicePixelRatio;\n\n const depthTexture = device.createTexture({\n size: [canvas.width, canvas.height],\n format: 'depth24plus',\n usage:\n GPUTextureUsage.RENDER_ATTACHMENT | GPUTextureUsage.TEXTURE_BINDING,\n label: 'depthTexture',\n });\n\n const depthTextureView = depthTexture.createView({\n label: 'depthTextureView',\n });\n\n // Determines how much memory is allocated to store linked-list elements\n const averageLayersPerFragment = 4;\n\n // Each element stores\n // * color : vec4\n // * depth : f32\n // * index of next element in the list : u32\n const linkedListElementSize =\n 5 * Float32Array.BYTES_PER_ELEMENT + 1 * Uint32Array.BYTES_PER_ELEMENT;\n\n // We want to keep the linked-list buffer size under the maxStorageBufferBindingSize.\n // Split the frame into enough slices to meet that constraint.\n const bytesPerline =\n canvas.width * averageLayersPerFragment * linkedListElementSize;\n const maxLinesSupported = Math.floor(\n device.limits.maxStorageBufferBindingSize / bytesPerline\n );\n const numSlices = Math.ceil(canvas.height / maxLinesSupported);\n const sliceHeight = Math.ceil(canvas.height / numSlices);\n const linkedListBufferSize = sliceHeight * bytesPerline;\n\n const linkedListBuffer = device.createBuffer({\n size: linkedListBufferSize,\n usage: GPUBufferUsage.STORAGE | GPUBufferUsage.COPY_DST,\n label: 'linkedListBuffer',\n });\n\n // To slice up the frame we need to pass the starting fragment y position of the slice.\n // We do this using a uniform buffer with a dynamic offset.\n const sliceInfoBuffer = device.createBuffer({\n size: numSlices * device.limits.minUniformBufferOffsetAlignment,\n usage: GPUBufferUsage.UNIFORM,\n mappedAtCreation: true,\n label: 'sliceInfoBuffer',\n });\n {\n const mapping = new Int32Array(sliceInfoBuffer.getMappedRange());\n\n // This assumes minUniformBufferOffsetAlignment is a multiple of 4\n const stride =\n device.limits.minUniformBufferOffsetAlignment /\n Int32Array.BYTES_PER_ELEMENT;\n for (let i = 0; i < numSlices; ++i) {\n mapping[i * stride] = i * sliceHeight;\n }\n sliceInfoBuffer.unmap();\n }\n\n // `Heads` struct contains the start index of the linked-list of translucent fragments\n // for a given pixel.\n // * numFragments : u32\n // * data : array\n const headsBuffer = device.createBuffer({\n size: (1 + canvas.width * sliceHeight) * Uint32Array.BYTES_PER_ELEMENT,\n usage: GPUBufferUsage.STORAGE | GPUBufferUsage.COPY_DST,\n label: 'headsBuffer',\n });\n\n const headsInitBuffer = device.createBuffer({\n size: (1 + canvas.width * sliceHeight) * Uint32Array.BYTES_PER_ELEMENT,\n usage: GPUBufferUsage.COPY_SRC,\n mappedAtCreation: true,\n label: 'headsInitBuffer',\n });\n {\n const buffer = new Uint32Array(headsInitBuffer.getMappedRange());\n\n for (let i = 0; i < buffer.length; ++i) {\n buffer[i] = 0xffffffff;\n }\n\n headsInitBuffer.unmap();\n }\n\n const translucentBindGroup = device.createBindGroup({\n layout: translucentBindGroupLayout,\n entries: [\n {\n binding: 0,\n resource: {\n buffer: uniformBuffer,\n label: 'uniforms',\n },\n },\n {\n binding: 1,\n resource: {\n buffer: headsBuffer,\n label: 'headsBuffer',\n },\n },\n {\n binding: 2,\n resource: {\n buffer: linkedListBuffer,\n label: 'linkedListBuffer',\n },\n },\n {\n binding: 3,\n resource: depthTextureView,\n },\n {\n binding: 4,\n resource: {\n buffer: sliceInfoBuffer,\n size: device.limits.minUniformBufferOffsetAlignment,\n label: 'sliceInfoBuffer',\n },\n },\n ],\n label: 'translucentBindGroup',\n });\n\n const compositeBindGroup = device.createBindGroup({\n layout: compositePipeline.getBindGroupLayout(0),\n entries: [\n {\n binding: 0,\n resource: {\n buffer: uniformBuffer,\n label: 'uniforms',\n },\n },\n {\n binding: 1,\n resource: {\n buffer: headsBuffer,\n label: 'headsBuffer',\n },\n },\n {\n binding: 2,\n resource: {\n buffer: linkedListBuffer,\n label: 'linkedListBuffer',\n },\n },\n {\n binding: 3,\n resource: {\n buffer: sliceInfoBuffer,\n size: device.limits.minUniformBufferOffsetAlignment,\n label: 'sliceInfoBuffer',\n },\n },\n ],\n });\n\n opaquePassDescriptor.depthStencilAttachment.view = depthTextureView;\n\n // Rotates the camera around the origin based on time.\n function getCameraViewProjMatrix() {\n const aspect = canvas.width / canvas.height;\n\n const projectionMatrix = mat4.perspective(\n (2 * Math.PI) / 5,\n aspect,\n 1,\n 2000.0\n );\n\n const upVector = vec3.fromValues(0, 1, 0);\n const origin = vec3.fromValues(0, 0, 0);\n const eyePosition = vec3.fromValues(0, 5, -100);\n\n const rad = Math.PI * (Date.now() / 5000);\n const rotation = mat4.rotateY(mat4.translation(origin), rad);\n vec3.transformMat4(eyePosition, rotation, eyePosition);\n\n const viewMatrix = mat4.lookAt(eyePosition, origin, upVector);\n\n const viewProjMatrix = mat4.multiply(projectionMatrix, viewMatrix);\n return viewProjMatrix as Float32Array;\n }\n\n return function doDraw() {\n // update the uniform buffer\n {\n const buffer = new ArrayBuffer(uniformBuffer.size);\n\n new Float32Array(buffer).set(getCameraViewProjMatrix());\n new Uint32Array(buffer, 16 * Float32Array.BYTES_PER_ELEMENT).set([\n averageLayersPerFragment * canvas.width * sliceHeight,\n canvas.width,\n ]);\n\n device.queue.writeBuffer(uniformBuffer, 0, buffer);\n }\n\n const commandEncoder = device.createCommandEncoder();\n const textureView = context.getCurrentTexture().createView();\n\n // Draw the opaque objects\n opaquePassDescriptor.colorAttachments[0].view = textureView;\n const opaquePassEncoder =\n commandEncoder.beginRenderPass(opaquePassDescriptor);\n opaquePassEncoder.setPipeline(opaquePipeline);\n opaquePassEncoder.setBindGroup(0, opaqueBindGroup);\n opaquePassEncoder.setVertexBuffer(0, vertexBuffer);\n opaquePassEncoder.setIndexBuffer(indexBuffer, 'uint16');\n opaquePassEncoder.drawIndexed(mesh.triangles.length * 3, 8);\n opaquePassEncoder.end();\n\n for (let slice = 0; slice < numSlices; ++slice) {\n // initialize the heads buffer\n commandEncoder.copyBufferToBuffer(\n headsInitBuffer,\n 0,\n headsBuffer,\n 0,\n headsInitBuffer.size\n );\n\n const scissorX = 0;\n const scissorY = slice * sliceHeight;\n const scissorWidth = canvas.width;\n const scissorHeight =\n Math.min((slice + 1) * sliceHeight, canvas.height) -\n slice * sliceHeight;\n\n // Draw the translucent objects\n translucentPassDescriptor.colorAttachments[0].view = textureView;\n const translucentPassEncoder = commandEncoder.beginRenderPass(\n translucentPassDescriptor\n );\n\n // Set the scissor to only process a horizontal slice of the frame\n translucentPassEncoder.setScissorRect(\n scissorX,\n scissorY,\n scissorWidth,\n scissorHeight\n );\n\n translucentPassEncoder.setPipeline(translucentPipeline);\n translucentPassEncoder.setBindGroup(0, translucentBindGroup, [\n slice * device.limits.minUniformBufferOffsetAlignment,\n ]);\n translucentPassEncoder.setVertexBuffer(0, vertexBuffer);\n translucentPassEncoder.setIndexBuffer(indexBuffer, 'uint16');\n translucentPassEncoder.drawIndexed(mesh.triangles.length * 3, 8);\n translucentPassEncoder.end();\n\n // Composite the opaque and translucent objects\n compositePassDescriptor.colorAttachments[0].view = textureView;\n const compositePassEncoder = commandEncoder.beginRenderPass(\n compositePassDescriptor\n );\n\n // Set the scissor to only process a horizontal slice of the frame\n compositePassEncoder.setScissorRect(\n scissorX,\n scissorY,\n scissorWidth,\n scissorHeight\n );\n\n compositePassEncoder.setPipeline(compositePipeline);\n compositePassEncoder.setBindGroup(0, compositeBindGroup, [\n slice * device.limits.minUniformBufferOffsetAlignment,\n ]);\n compositePassEncoder.draw(6);\n compositePassEncoder.end();\n }\n\n device.queue.submit([commandEncoder.finish()]);\n };\n };\n\n let doDraw = configure();\n\n const updateSettings = () => {\n doDraw = configure();\n };\n\n gui\n .add(settings, 'memoryStrategy', ['multipass', 'clamp-pixel-ratio'])\n .onFinishChange(updateSettings);\n\n function frame() {\n // Sample is no longer the active page.\n if (!pageState.active) return;\n\n doDraw();\n\n requestAnimationFrame(frame);\n }\n\n requestAnimationFrame(frame);\n};\n\nconst ABuffer: () => JSX.Element = () =>\n makeSample({\n name: 'A-Buffer',\n description: `Demonstrates order independent transparency using a per-pixel \n linked-list of translucent fragments. Provides a choice for \n limiting memory usage (when required).`,\n gui: true,\n init,\n sources: [\n {\n name: __filename.substring(__dirname.length + 1),\n contents: __SOURCE__,\n },\n {\n name: 'opaque.wsgl',\n contents: opaqueWGSL,\n },\n {\n name: 'translucent.wsgl',\n contents: translucentWGSL,\n },\n {\n name: 'composite.wsgl',\n contents: compositeWGSL,\n },\n ],\n filename: __filename,\n });\n\nexport default ABuffer;\n"},{name:"opaque.wsgl",contents:l},{name:"translucent.wsgl",contents:u},{name:"composite.wsgl",contents:c}],filename:f});var p=m},9147:function(e){e.exports={canvasContainer:"SampleLayout_canvasContainer__zRR_l",sourceFileNav:"SampleLayout_sourceFileNav__ml48P",sourceFileContainer:"SampleLayout_sourceFileContainer__3s84x"}},8748:function(e,n){n.m=[[5.929688,4.125,0],[5.387188,4.125,2.7475],[5.2971,4.494141,2.70917],[5.832031,4.494141,0],[5.401602,4.617188,2.753633],[5.945313,4.617188,0],[5.614209,4.494141,2.844092],[6.175781,4.494141,0],[5.848437,4.125,2.94375],[6.429688,4.125,0],[3.899688,4.125,4.97],[3.830352,4.494141,4.900664],[3.910782,4.617188,4.981094],[4.074414,4.494141,5.144727],[4.254687,4.125,5.325],[1.677188,4.125,6.4575],[1.638858,4.494141,6.367412],[1.68332,4.617188,6.471914],[1.77378,4.494141,6.684522],[1.873438,4.125,6.91875],[-1.070312,4.125,7],[-1.070312,4.494141,6.902344],[-1.070312,4.617188,7.015625],[-1.070312,4.494141,7.246094],[-1.070312,4.125,7.5],[-1.070312,4.125,7],[-4.007656,4.125,6.4575],[-3.859572,4.494141,6.367412],[-1.070312,4.494141,6.902344],[-3.847676,4.617188,6.471914],[-1.070312,4.617188,7.015625],[-3.917371,4.494141,6.684522],[-1.070312,4.494141,7.246094],[-4.014062,4.125,6.91875],[-1.070312,4.125,7.5],[-6.209063,4.125,4.97],[-6.042168,4.494141,4.900664],[-6.0725,4.617188,4.981094],[-6.217675,4.494141,5.144727],[-6.395312,4.125,5.325],[-7.591093,4.125,2.7475],[-7.464421,4.494141,2.70917],[-7.550137,4.617188,2.753633],[-7.755822,4.494141,2.844092],[-7.989062,4.125,2.94375],[-8.070313,4.125,0],[-7.972656,4.494141,0],[-8.085938,4.617188,0],[-8.316406,4.494141,0],[-8.570313,4.125,0],[-8.070313,4.125,0],[-7.527812,4.125,-2.7475],[-7.437724,4.494141,-2.70917],[-7.972656,4.494141,0],[-7.542227,4.617188,-2.753633],[-8.085938,4.617188,0],[-7.754834,4.494141,-2.844092],[-8.316406,4.494141,0],[-7.989062,4.125,-2.94375],[-8.570313,4.125,0],[-6.040312,4.125,-4.97],[-5.970977,4.494141,-4.900664],[-6.051406,4.617188,-4.981094],[-6.215039,4.494141,-5.144727],[-6.395312,4.125,-5.325],[-3.817812,4.125,-6.4575],[-3.779482,4.494141,-6.367412],[-3.823945,4.617188,-6.471914],[-3.914404,4.494141,-6.684522],[-4.014062,4.125,-6.91875],[-1.070312,4.125,-7],[-1.070312,4.494141,-6.902344],[-1.070312,4.617188,-7.015625],[-1.070312,4.494141,-7.246094],[-1.070312,4.125,-7.5],[-1.070312,4.125,-7],[1.677188,4.125,-6.4575],[1.638858,4.494141,-6.367412],[-1.070312,4.494141,-6.902344],[1.68332,4.617188,-6.471914],[-1.070312,4.617188,-7.015625],[1.77378,4.494141,-6.684522],[-1.070312,4.494141,-7.246094],[1.873438,4.125,-6.91875],[-1.070312,4.125,-7.5],[3.899688,4.125,-4.97],[3.830352,4.494141,-4.900664],[3.910782,4.617188,-4.981094],[4.074414,4.494141,-5.144727],[4.254687,4.125,-5.325],[5.387188,4.125,-2.7475],[5.2971,4.494141,-2.70917],[5.401602,4.617188,-2.753633],[5.614209,4.494141,-2.844092],[5.848437,4.125,-2.94375],[5.929688,4.125,0],[5.832031,4.494141,0],[5.945313,4.617188,0],[6.175781,4.494141,0],[6.429688,4.125,0],[6.429688,4.125,0],[5.848437,4.125,2.94375],[6.695264,2.162109,3.304053],[7.347656,2.162109,0],[7.433985,.234375,3.61836],[8.148438,.234375,0],[7.956494,-1.623047,3.840674],[8.714844,-1.623047,0],[8.154688,-3.375,3.925],[8.929688,-3.375,0],[4.254687,4.125,5.325],[4.906446,2.162109,5.976758],[5.475,.234375,6.545312],[5.877149,-1.623047,6.947461],[6.029688,-3.375,7.1],[1.873438,4.125,6.91875],[2.23374,2.162109,7.765576],[2.548047,.234375,8.504297],[2.770362,-1.623047,9.026807],[2.854688,-3.375,9.225],[-1.070312,4.125,7.5],[-1.070312,2.162109,8.417969],[-1.070312,.234375,9.21875],[-1.070312,-1.623047,9.785156],[-1.070312,-3.375,10],[-1.070312,4.125,7.5],[-4.014062,4.125,6.91875],[-4.374365,2.162109,7.765576],[-1.070312,2.162109,8.417969],[-4.688672,.234375,8.504297],[-1.070312,.234375,9.21875],[-4.910986,-1.623047,9.026807],[-1.070312,-1.623047,9.785156],[-4.995313,-3.375,9.225],[-1.070312,-3.375,10],[-6.395312,4.125,5.325],[-7.047071,2.162109,5.976758],[-7.615624,.234375,6.545312],[-8.017773,-1.623047,6.947461],[-8.170312,-3.375,7.1],[-7.989062,4.125,2.94375],[-8.835889,2.162109,3.304053],[-9.57461,.234375,3.61836],[-10.097119,-1.623047,3.840674],[-10.295313,-3.375,3.925],[-8.570313,4.125,0],[-9.488281,2.162109,0],[-10.289063,.234375,0],[-10.855469,-1.623047,0],[-11.070313,-3.375,0],[-8.570313,4.125,0],[-7.989062,4.125,-2.94375],[-8.835889,2.162109,-3.304053],[-9.488281,2.162109,0],[-9.57461,.234375,-3.61836],[-10.289063,.234375,0],[-10.097119,-1.623047,-3.840674],[-10.855469,-1.623047,0],[-10.295313,-3.375,-3.925],[-11.070313,-3.375,0],[-6.395312,4.125,-5.325],[-7.047071,2.162109,-5.976758],[-7.615624,.234375,-6.545312],[-8.017773,-1.623047,-6.947461],[-8.170312,-3.375,-7.1],[-4.014062,4.125,-6.91875],[-4.374365,2.162109,-7.765576],[-4.688672,.234375,-8.504297],[-4.910986,-1.623047,-9.026807],[-4.995313,-3.375,-9.225],[-1.070312,4.125,-7.5],[-1.070312,2.162109,-8.417969],[-1.070312,.234375,-9.21875],[-1.070312,-1.623047,-9.785156],[-1.070312,-3.375,-10],[-1.070312,4.125,-7.5],[1.873438,4.125,-6.91875],[2.23374,2.162109,-7.765576],[-1.070312,2.162109,-8.417969],[2.548047,.234375,-8.504297],[-1.070312,.234375,-9.21875],[2.770362,-1.623047,-9.026807],[-1.070312,-1.623047,-9.785156],[2.854688,-3.375,-9.225],[-1.070312,-3.375,-10],[4.254687,4.125,-5.325],[4.906446,2.162109,-5.976758],[5.475,.234375,-6.545312],[5.877149,-1.623047,-6.947461],[6.029688,-3.375,-7.1],[5.848437,4.125,-2.94375],[6.695264,2.162109,-3.304053],[7.433985,.234375,-3.61836],[7.956494,-1.623047,-3.840674],[8.154688,-3.375,-3.925],[6.429688,4.125,0],[7.347656,2.162109,0],[8.148438,.234375,0],[8.714844,-1.623047,0],[8.929688,-3.375,0],[8.929688,-3.375,0],[8.154688,-3.375,3.925],[7.794336,-4.857422,3.77168],[8.539063,-4.857422,0],[7.001562,-5.953125,3.434375],[7.679688,-5.953125,0],[6.208789,-6.697266,3.09707],[6.820313,-6.697266,0],[5.848437,-7.125,2.94375],[6.429688,-7.125,0],[6.029688,-3.375,7.1],[5.752343,-4.857422,6.822656],[5.142187,-5.953125,6.2125],[4.532031,-6.697266,5.602344],[4.254687,-7.125,5.325],[2.854688,-3.375,9.225],[2.701367,-4.857422,8.864649],[2.364063,-5.953125,8.071875],[2.026758,-6.697266,7.279101],[1.873438,-7.125,6.91875],[-1.070312,-3.375,10],[-1.070312,-4.857422,9.609375],[-1.070312,-5.953125,8.75],[-1.070312,-6.697266,7.890625],[-1.070312,-7.125,7.5],[-1.070312,-3.375,10],[-4.995313,-3.375,9.225],[-4.841992,-4.857422,8.864649],[-1.070312,-4.857422,9.609375],[-4.504687,-5.953125,8.071875],[-1.070312,-5.953125,8.75],[-4.167383,-6.697266,7.279101],[-1.070312,-6.697266,7.890625],[-4.014062,-7.125,6.91875],[-1.070312,-7.125,7.5],[-8.170312,-3.375,7.1],[-7.892968,-4.857422,6.822656],[-7.282812,-5.953125,6.2125],[-6.672656,-6.697266,5.602344],[-6.395312,-7.125,5.325],[-10.295313,-3.375,3.925],[-9.934961,-4.857422,3.77168],[-9.142187,-5.953125,3.434375],[-8.349414,-6.697266,3.09707],[-7.989062,-7.125,2.94375],[-11.070313,-3.375,0],[-10.679688,-4.857422,0],[-9.820313,-5.953125,0],[-8.960938,-6.697266,0],[-8.570313,-7.125,0],[-11.070313,-3.375,0],[-10.295313,-3.375,-3.925],[-9.934961,-4.857422,-3.77168],[-10.679688,-4.857422,0],[-9.142187,-5.953125,-3.434375],[-9.820313,-5.953125,0],[-8.349414,-6.697266,-3.09707],[-8.960938,-6.697266,0],[-7.989062,-7.125,-2.94375],[-8.570313,-7.125,0],[-8.170312,-3.375,-7.1],[-7.892968,-4.857422,-6.822656],[-7.282812,-5.953125,-6.2125],[-6.672656,-6.697266,-5.602344],[-6.395312,-7.125,-5.325],[-4.995313,-3.375,-9.225],[-4.841992,-4.857422,-8.864649],[-4.504687,-5.953125,-8.071875],[-4.167383,-6.697266,-7.279101],[-4.014062,-7.125,-6.91875],[-1.070312,-3.375,-10],[-1.070312,-4.857422,-9.609375],[-1.070312,-5.953125,-8.75],[-1.070312,-6.697266,-7.890625],[-1.070312,-7.125,-7.5],[-1.070312,-3.375,-10],[2.854688,-3.375,-9.225],[2.701367,-4.857422,-8.864649],[-1.070312,-4.857422,-9.609375],[2.364063,-5.953125,-8.071875],[-1.070312,-5.953125,-8.75],[2.026758,-6.697266,-7.279101],[-1.070312,-6.697266,-7.890625],[1.873438,-7.125,-6.91875],[-1.070312,-7.125,-7.5],[6.029688,-3.375,-7.1],[5.752343,-4.857422,-6.822656],[5.142187,-5.953125,-6.2125],[4.532031,-6.697266,-5.602344],[4.254687,-7.125,-5.325],[8.154688,-3.375,-3.925],[7.794336,-4.857422,-3.77168],[7.001562,-5.953125,-3.434375],[6.208789,-6.697266,-3.09707],[5.848437,-7.125,-2.94375],[8.929688,-3.375,0],[8.539063,-4.857422,0],[7.679688,-5.953125,0],[6.820313,-6.697266,0],[6.429688,-7.125,0],[6.429688,-7.125,0],[5.848437,-7.125,2.94375],[5.691685,-7.400391,2.877056],[6.259766,-7.400391,0],[4.853868,-7.640625,2.520586],[5.351563,-7.640625,0],[2.783648,-7.810547,1.639761],[3.107422,-7.810547,0],[-1.070312,-7.875,0],[4.254687,-7.125,5.325],[4.134043,-7.400391,5.204355],[3.489219,-7.640625,4.559531],[1.895879,-7.810547,2.966191],[-1.070312,-7.875,0],[1.873438,-7.125,6.91875],[1.806743,-7.400391,6.761997],[1.450274,-7.640625,5.92418],[.569448,-7.810547,3.85396],[-1.070312,-7.875,0],[-1.070312,-7.125,7.5],[-1.070312,-7.400391,7.330078],[-1.070312,-7.640625,6.421875],[-1.070312,-7.810547,4.177734],[-1.070312,-7.875,0],[-1.070312,-7.125,7.5],[-4.014062,-7.125,6.91875],[-3.947368,-7.400391,6.761997],[-1.070312,-7.400391,7.330078],[-3.590898,-7.640625,5.92418],[-1.070312,-7.640625,6.421875],[-2.710073,-7.810547,3.85396],[-1.070312,-7.810547,4.177734],[-1.070312,-7.875,0],[-6.395312,-7.125,5.325],[-6.274668,-7.400391,5.204355],[-5.629844,-7.640625,4.559531],[-4.036504,-7.810547,2.966191],[-1.070312,-7.875,0],[-7.989062,-7.125,2.94375],[-7.832309,-7.400391,2.877056],[-6.994492,-7.640625,2.520586],[-4.924272,-7.810547,1.639761],[-1.070312,-7.875,0],[-8.570313,-7.125,0],[-8.400391,-7.400391,0],[-7.492188,-7.640625,0],[-5.248047,-7.810547,0],[-1.070312,-7.875,0],[-8.570313,-7.125,0],[-7.989062,-7.125,-2.94375],[-7.832309,-7.400391,-2.877056],[-8.400391,-7.400391,0],[-6.994492,-7.640625,-2.520586],[-7.492188,-7.640625,0],[-4.924272,-7.810547,-1.639761],[-5.248047,-7.810547,0],[-1.070312,-7.875,0],[-6.395312,-7.125,-5.325],[-6.274668,-7.400391,-5.204355],[-5.629844,-7.640625,-4.559531],[-4.036504,-7.810547,-2.966191],[-1.070312,-7.875,0],[-4.014062,-7.125,-6.91875],[-3.947368,-7.400391,-6.761997],[-3.590898,-7.640625,-5.92418],[-2.710073,-7.810547,-3.85396],[-1.070312,-7.875,0],[-1.070312,-7.125,-7.5],[-1.070312,-7.400391,-7.330078],[-1.070312,-7.640625,-6.421875],[-1.070312,-7.810547,-4.177734],[-1.070312,-7.875,0],[-1.070312,-7.125,-7.5],[1.873438,-7.125,-6.91875],[1.806743,-7.400391,-6.761997],[-1.070312,-7.400391,-7.330078],[1.450274,-7.640625,-5.92418],[-1.070312,-7.640625,-6.421875],[.569448,-7.810547,-3.85396],[-1.070312,-7.810547,-4.177734],[-1.070312,-7.875,0],[4.254687,-7.125,-5.325],[4.134043,-7.400391,-5.204355],[3.489219,-7.640625,-4.559531],[1.895879,-7.810547,-2.966191],[-1.070312,-7.875,0],[5.848437,-7.125,-2.94375],[5.691685,-7.400391,-2.877056],[4.853868,-7.640625,-2.520586],[2.783648,-7.810547,-1.639761],[-1.070312,-7.875,0],[6.429688,-7.125,0],[6.259766,-7.400391,0],[5.351563,-7.640625,0],[3.107422,-7.810547,0],[-1.070312,-7.875,0],[-9.070313,2.25,0],[-8.992188,2.425781,.84375],[-11.47583,2.405457,.84375],[-11.40625,2.232422,0],[-13.298828,2.263184,.84375],[-13.132813,2.109375,0],[-14.421631,1.877014,.84375],[-14.203125,1.775391,0],[-14.804688,1.125,.84375],[-14.570313,1.125,0],[-8.820313,2.8125,1.125],[-11.628906,2.786134,1.125],[-13.664063,2.601563,1.125],[-14.902344,2.100586,1.125],[-15.320313,1.125,1.125],[-8.648438,3.199219,.84375],[-11.781982,3.166809,.84375],[-14.029297,2.939941,.84375],[-15.383057,2.324158,.84375],[-15.835938,1.125,.84375],[-8.570313,3.375,0],[-11.851563,3.339844,0],[-14.195313,3.09375,0],[-15.601563,2.425781,0],[-16.070313,1.125,0],[-8.570313,3.375,0],[-8.648438,3.199219,-.84375],[-11.781982,3.166809,-.84375],[-11.851563,3.339844,0],[-14.029297,2.939941,-.84375],[-14.195313,3.09375,0],[-15.383057,2.324158,-.84375],[-15.601563,2.425781,0],[-15.835938,1.125,-.84375],[-16.070313,1.125,0],[-8.820313,2.8125,-1.125],[-11.628906,2.786134,-1.125],[-13.664063,2.601563,-1.125],[-14.902344,2.100586,-1.125],[-15.320313,1.125,-1.125],[-8.992188,2.425781,-.84375],[-11.47583,2.405457,-.84375],[-13.298828,2.263184,-.84375],[-14.421631,1.877014,-.84375],[-14.804688,1.125,-.84375],[-9.070313,2.25,0],[-11.40625,2.232422,0],[-13.132813,2.109375,0],[-14.203125,1.775391,0],[-14.570313,1.125,0],[-14.570313,1.125,0],[-14.804688,1.125,.84375],[-14.588013,.00705,.84375],[-14.375,.105469,0],[-13.90918,-1.275146,.84375],[-13.757813,-1.125,0],[-12.724976,-2.540863,.84375],[-12.671875,-2.355469,0],[-10.992188,-3.609375,.84375],[-11.070313,-3.375,0],[-15.320313,1.125,1.125],[-15.056641,-.209473,1.125],[-14.242188,-1.605469,1.125],[-12.841797,-2.94873,1.125],[-10.820313,-4.125,1.125],[-15.835938,1.125,.84375],[-15.525269,-.425995,.84375],[-14.575195,-1.935791,.84375],[-12.958618,-3.356598,.84375],[-10.648438,-4.640625,.84375],[-16.070313,1.125,0],[-15.738281,-.524414,0],[-14.726563,-2.085938,0],[-13.011719,-3.541992,0],[-10.570313,-4.875,0],[-16.070313,1.125,0],[-15.835938,1.125,-.84375],[-15.525269,-.425995,-.84375],[-15.738281,-.524414,0],[-14.575195,-1.935791,-.84375],[-14.726563,-2.085938,0],[-12.958618,-3.356598,-.84375],[-13.011719,-3.541992,0],[-10.648438,-4.640625,-.84375],[-10.570313,-4.875,0],[-15.320313,1.125,-1.125],[-15.056641,-.209473,-1.125],[-14.242188,-1.605469,-1.125],[-12.841797,-2.94873,-1.125],[-10.820313,-4.125,-1.125],[-14.804688,1.125,-.84375],[-14.588013,.00705,-.84375],[-13.90918,-1.275146,-.84375],[-12.724976,-2.540863,-.84375],[-10.992188,-3.609375,-.84375],[-14.570313,1.125,0],[-14.375,.105469,0],[-13.757813,-1.125,0],[-12.671875,-2.355469,0],[-11.070313,-3.375,0],[7.429688,-.75,0],[7.429688,-1.394531,1.85625],[10.01123,-.677124,1.676074],[9.828125,-.199219,0],[11.101563,.84668,1.279688],[10.867188,1.125,0],[11.723145,2.629761,.883301],[11.4375,2.730469,0],[12.898438,4.125,.703125],[12.429688,4.125,0],[7.429688,-2.8125,2.475],[10.414063,-1.728516,2.234766],[11.617188,.234375,1.70625],[12.351563,2.408203,1.177734],[13.929688,4.125,.9375],[7.429688,-4.230469,1.85625],[10.816895,-2.779907,1.676074],[12.132813,-.37793,1.279688],[12.97998,2.186646,.883301],[14.960938,4.125,.703125],[7.429688,-4.875,0],[11,-3.257813,0],[12.367188,-.65625,0],[13.265625,2.085938,0],[15.429688,4.125,0],[7.429688,-4.875,0],[7.429688,-4.230469,-1.85625],[10.816895,-2.779907,-1.676074],[11,-3.257813,0],[12.132813,-.37793,-1.279688],[12.367188,-.65625,0],[12.97998,2.186646,-.883301],[13.265625,2.085938,0],[14.960938,4.125,-.703125],[15.429688,4.125,0],[7.429688,-2.8125,-2.475],[10.414063,-1.728516,-2.234766],[11.617188,.234375,-1.70625],[12.351563,2.408203,-1.177734],[13.929688,4.125,-.9375],[7.429688,-1.394531,-1.85625],[10.01123,-.677124,-1.676074],[11.101563,.84668,-1.279688],[11.723145,2.629761,-.883301],[12.898438,4.125,-.703125],[7.429688,-.75,0],[9.828125,-.199219,0],[10.867188,1.125,0],[11.4375,2.730469,0],[12.429688,4.125,0],[12.429688,4.125,0],[12.898438,4.125,.703125],[13.291077,4.346237,.65918],[12.789063,4.335938,0],[13.525879,4.422729,.5625],[13.054688,4.40625,0],[13.532898,4.350357,.46582],[13.132813,4.335938,0],[13.242188,4.125,.421875],[12.929688,4.125,0],[13.929688,4.125,.9375],[14.395508,4.368896,.878906],[14.5625,4.458984,.75],[14.413086,4.38208,.621094],[13.929688,4.125,.5625],[14.960938,4.125,.703125],[15.499939,4.391556,.65918],[15.599121,4.495239,.5625],[15.293274,4.413804,.46582],[14.617188,4.125,.421875],[15.429688,4.125,0],[16.001953,4.401855,0],[16.070313,4.511719,0],[15.693359,4.428224,0],[14.929688,4.125,0],[15.429688,4.125,0],[14.960938,4.125,-.703125],[15.499939,4.391556,-.65918],[16.001953,4.401855,0],[15.599121,4.495239,-.5625],[16.070313,4.511719,0],[15.293274,4.413804,-.46582],[15.693359,4.428224,0],[14.617188,4.125,-.421875],[14.929688,4.125,0],[13.929688,4.125,-.9375],[14.395508,4.368896,-.878906],[14.5625,4.458984,-.75],[14.413086,4.38208,-.621094],[13.929688,4.125,-.5625],[12.898438,4.125,-.703125],[13.291077,4.346237,-.65918],[13.525879,4.422729,-.5625],[13.532898,4.350357,-.46582],[13.242188,4.125,-.421875],[12.429688,4.125,0],[12.789063,4.335938,0],[13.054688,4.40625,0],[13.132813,4.335938,0],[12.929688,4.125,0],[.501414,7.628906,.670256],[.632813,7.628906,0],[-1.070312,7.875,0],[.429278,7.03125,.639395],[.554688,7.03125,0],[-.162029,6.292969,.38696],[-.085937,6.292969,0],[-.147812,5.625,.3925],[-.070312,5.625,0],[.140489,7.628906,1.210801],[-1.070312,7.875,0],[.084844,7.03125,1.155156],[-.370879,6.292969,.699434],[-.360312,5.625,.71],[-.400056,7.628906,1.571726],[-1.070312,7.875,0],[-.430918,7.03125,1.49959],[-.683352,6.292969,.908284],[-.677812,5.625,.9225],[-1.070312,7.628906,1.703125],[-1.070312,7.875,0],[-1.070312,7.03125,1.625],[-1.070312,6.292969,.984375],[-1.070312,5.625,1],[-1.740569,7.628906,1.571726],[-1.070312,7.628906,1.703125],[-1.070312,7.875,0],[-1.709707,7.03125,1.49959],[-1.070312,7.03125,1.625],[-1.457273,6.292969,.908284],[-1.070312,6.292969,.984375],[-1.462812,5.625,.9225],[-1.070312,5.625,1],[-2.281113,7.628906,1.210801],[-1.070312,7.875,0],[-2.225469,7.03125,1.155156],[-1.769746,6.292969,.699434],[-1.780312,5.625,.71],[-2.642038,7.628906,.670256],[-1.070312,7.875,0],[-2.569902,7.03125,.639395],[-1.978596,6.292969,.38696],[-1.992812,5.625,.3925],[-2.773438,7.628906,0],[-1.070312,7.875,0],[-2.695313,7.03125,0],[-2.054687,6.292969,0],[-2.070312,5.625,0],[-2.642038,7.628906,-.670256],[-2.773438,7.628906,0],[-1.070312,7.875,0],[-2.569902,7.03125,-.639395],[-2.695313,7.03125,0],[-1.978596,6.292969,-.38696],[-2.054687,6.292969,0],[-1.992812,5.625,-.3925],[-2.070312,5.625,0],[-2.281113,7.628906,-1.210801],[-1.070312,7.875,0],[-2.225469,7.03125,-1.155156],[-1.769746,6.292969,-.699434],[-1.780312,5.625,-.71],[-1.740569,7.628906,-1.571726],[-1.070312,7.875,0],[-1.709707,7.03125,-1.49959],[-1.457273,6.292969,-.908284],[-1.462812,5.625,-.9225],[-1.070312,7.628906,-1.703125],[-1.070312,7.875,0],[-1.070312,7.03125,-1.625],[-1.070312,6.292969,-.984375],[-1.070312,5.625,-1],[-.400056,7.628906,-1.571726],[-1.070312,7.628906,-1.703125],[-1.070312,7.875,0],[-.430918,7.03125,-1.49959],[-1.070312,7.03125,-1.625],[-.683352,6.292969,-.908284],[-1.070312,6.292969,-.984375],[-.677812,5.625,-.9225],[-1.070312,5.625,-1],[.140489,7.628906,-1.210801],[-1.070312,7.875,0],[.084844,7.03125,-1.155156],[-.370879,6.292969,-.699434],[-.360312,5.625,-.71],[.501414,7.628906,-.670256],[-1.070312,7.875,0],[.429278,7.03125,-.639395],[-.162029,6.292969,-.38696],[-.147812,5.625,-.3925],[.632813,7.628906,0],[-1.070312,7.875,0],[.554688,7.03125,0],[-.085937,6.292969,0],[-.070312,5.625,0],[-.070312,5.625,0],[-.147812,5.625,.3925],[1.034141,5.179688,.895391],[1.210938,5.179688,0],[2.735,4.875,1.619062],[3.054688,4.875,0],[4.262891,4.570313,2.26914],[4.710938,4.570313,0],[4.925938,4.125,2.55125],[5.429688,4.125,0],[-.360312,5.625,.71],[.549375,5.179688,1.619688],[1.858438,4.875,2.92875],[3.034375,4.570313,4.104687],[3.544688,4.125,4.615],[-.677812,5.625,.9225],[-.174922,5.179688,2.104453],[.54875,4.875,3.805313],[1.198828,4.570313,5.333203],[1.480938,4.125,5.99625],[-1.070312,5.625,1],[-1.070312,5.179688,2.28125],[-1.070312,4.875,4.125],[-1.070312,4.570313,5.78125],[-1.070312,4.125,6.5],[-1.070312,5.625,1],[-1.462812,5.625,.9225],[-1.965703,5.179688,2.104453],[-1.070312,5.179688,2.28125],[-2.689375,4.875,3.805313],[-1.070312,4.875,4.125],[-3.339453,4.570313,5.333203],[-1.070312,4.570313,5.78125],[-3.621562,4.125,5.99625],[-1.070312,4.125,6.5],[-1.780312,5.625,.71],[-2.69,5.179688,1.619688],[-3.999062,4.875,2.92875],[-5.174999,4.570313,4.104687],[-5.685312,4.125,4.615],[-1.992812,5.625,.3925],[-3.174765,5.179688,.895391],[-4.875625,4.875,1.619062],[-6.403516,4.570313,2.26914],[-7.066563,4.125,2.55125],[-2.070312,5.625,0],[-3.351562,5.179688,0],[-5.195313,4.875,0],[-6.851563,4.570313,0],[-7.570313,4.125,0],[-2.070312,5.625,0],[-1.992812,5.625,-.3925],[-3.174765,5.179688,-.895391],[-3.351562,5.179688,0],[-4.875625,4.875,-1.619062],[-5.195313,4.875,0],[-6.403516,4.570313,-2.26914],[-6.851563,4.570313,0],[-7.066563,4.125,-2.55125],[-7.570313,4.125,0],[-1.780312,5.625,-.71],[-2.69,5.179688,-1.619688],[-3.999062,4.875,-2.92875],[-5.174999,4.570313,-4.104687],[-5.685312,4.125,-4.615],[-1.462812,5.625,-.9225],[-1.965703,5.179688,-2.104453],[-2.689375,4.875,-3.805313],[-3.339453,4.570313,-5.333203],[-3.621562,4.125,-5.99625],[-1.070312,5.625,-1],[-1.070312,5.179688,-2.28125],[-1.070312,4.875,-4.125],[-1.070312,4.570313,-5.78125],[-1.070312,4.125,-6.5],[-1.070312,5.625,-1],[-.677812,5.625,-.9225],[-.174922,5.179688,-2.104453],[-1.070312,5.179688,-2.28125],[.54875,4.875,-3.805313],[-1.070312,4.875,-4.125],[1.198828,4.570313,-5.333203],[-1.070312,4.570313,-5.78125],[1.480938,4.125,-5.99625],[-1.070312,4.125,-6.5],[-.360312,5.625,-.71],[.549375,5.179688,-1.619688],[1.858438,4.875,-2.92875],[3.034375,4.570313,-4.104687],[3.544688,4.125,-4.615],[-.147812,5.625,-.3925],[1.034141,5.179688,-.895391],[2.735,4.875,-1.619062],[4.262891,4.570313,-2.26914],[4.925938,4.125,-2.55125],[-.070312,5.625,0],[1.210938,5.179688,0],[3.054688,4.875,0],[4.710938,4.570313,0],[5.429688,4.125,0]],n.g=[[0,1,2],[2,3,0],[3,2,4],[4,5,3],[5,4,6],[6,7,5],[7,6,8],[8,9,7],[1,10,11],[11,2,1],[2,11,12],[12,4,2],[4,12,13],[13,6,4],[6,13,14],[14,8,6],[10,15,16],[16,11,10],[11,16,17],[17,12,11],[12,17,18],[18,13,12],[13,18,19],[19,14,13],[15,20,21],[21,16,15],[16,21,22],[22,17,16],[17,22,23],[23,18,17],[18,23,24],[24,19,18],[25,26,27],[27,28,25],[28,27,29],[29,30,28],[30,29,31],[31,32,30],[32,31,33],[33,34,32],[26,35,36],[36,27,26],[27,36,37],[37,29,27],[29,37,38],[38,31,29],[31,38,39],[39,33,31],[35,40,41],[41,36,35],[36,41,42],[42,37,36],[37,42,43],[43,38,37],[38,43,44],[44,39,38],[40,45,46],[46,41,40],[41,46,47],[47,42,41],[42,47,48],[48,43,42],[43,48,49],[49,44,43],[50,51,52],[52,53,50],[53,52,54],[54,55,53],[55,54,56],[56,57,55],[57,56,58],[58,59,57],[51,60,61],[61,52,51],[52,61,62],[62,54,52],[54,62,63],[63,56,54],[56,63,64],[64,58,56],[60,65,66],[66,61,60],[61,66,67],[67,62,61],[62,67,68],[68,63,62],[63,68,69],[69,64,63],[65,70,71],[71,66,65],[66,71,72],[72,67,66],[67,72,73],[73,68,67],[68,73,74],[74,69,68],[75,76,77],[77,78,75],[78,77,79],[79,80,78],[80,79,81],[81,82,80],[82,81,83],[83,84,82],[76,85,86],[86,77,76],[77,86,87],[87,79,77],[79,87,88],[88,81,79],[81,88,89],[89,83,81],[85,90,91],[91,86,85],[86,91,92],[92,87,86],[87,92,93],[93,88,87],[88,93,94],[94,89,88],[90,95,96],[96,91,90],[91,96,97],[97,92,91],[92,97,98],[98,93,92],[93,98,99],[99,94,93],[100,101,102],[102,103,100],[103,102,104],[104,105,103],[105,104,106],[106,107,105],[107,106,108],[108,109,107],[101,110,111],[111,102,101],[102,111,112],[112,104,102],[104,112,113],[113,106,104],[106,113,114],[114,108,106],[110,115,116],[116,111,110],[111,116,117],[117,112,111],[112,117,118],[118,113,112],[113,118,119],[119,114,113],[115,120,121],[121,116,115],[116,121,122],[122,117,116],[117,122,123],[123,118,117],[118,123,124],[124,119,118],[125,126,127],[127,128,125],[128,127,129],[129,130,128],[130,129,131],[131,132,130],[132,131,133],[133,134,132],[126,135,136],[136,127,126],[127,136,137],[137,129,127],[129,137,138],[138,131,129],[131,138,139],[139,133,131],[135,140,141],[141,136,135],[136,141,142],[142,137,136],[137,142,143],[143,138,137],[138,143,144],[144,139,138],[140,145,146],[146,141,140],[141,146,147],[147,142,141],[142,147,148],[148,143,142],[143,148,149],[149,144,143],[150,151,152],[152,153,150],[153,152,154],[154,155,153],[155,154,156],[156,157,155],[157,156,158],[158,159,157],[151,160,161],[161,152,151],[152,161,162],[162,154,152],[154,162,163],[163,156,154],[156,163,164],[164,158,156],[160,165,166],[166,161,160],[161,166,167],[167,162,161],[162,167,168],[168,163,162],[163,168,169],[169,164,163],[165,170,171],[171,166,165],[166,171,172],[172,167,166],[167,172,173],[173,168,167],[168,173,174],[174,169,168],[175,176,177],[177,178,175],[178,177,179],[179,180,178],[180,179,181],[181,182,180],[182,181,183],[183,184,182],[176,185,186],[186,177,176],[177,186,187],[187,179,177],[179,187,188],[188,181,179],[181,188,189],[189,183,181],[185,190,191],[191,186,185],[186,191,192],[192,187,186],[187,192,193],[193,188,187],[188,193,194],[194,189,188],[190,195,196],[196,191,190],[191,196,197],[197,192,191],[192,197,198],[198,193,192],[193,198,199],[199,194,193],[200,201,202],[202,203,200],[203,202,204],[204,205,203],[205,204,206],[206,207,205],[207,206,208],[208,209,207],[201,210,211],[211,202,201],[202,211,212],[212,204,202],[204,212,213],[213,206,204],[206,213,214],[214,208,206],[210,215,216],[216,211,210],[211,216,217],[217,212,211],[212,217,218],[218,213,212],[213,218,219],[219,214,213],[215,220,221],[221,216,215],[216,221,222],[222,217,216],[217,222,223],[223,218,217],[218,223,224],[224,219,218],[225,226,227],[227,228,225],[228,227,229],[229,230,228],[230,229,231],[231,232,230],[232,231,233],[233,234,232],[226,235,236],[236,227,226],[227,236,237],[237,229,227],[229,237,238],[238,231,229],[231,238,239],[239,233,231],[235,240,241],[241,236,235],[236,241,242],[242,237,236],[237,242,243],[243,238,237],[238,243,244],[244,239,238],[240,245,246],[246,241,240],[241,246,247],[247,242,241],[242,247,248],[248,243,242],[243,248,249],[249,244,243],[250,251,252],[252,253,250],[253,252,254],[254,255,253],[255,254,256],[256,257,255],[257,256,258],[258,259,257],[251,260,261],[261,252,251],[252,261,262],[262,254,252],[254,262,263],[263,256,254],[256,263,264],[264,258,256],[260,265,266],[266,261,260],[261,266,267],[267,262,261],[262,267,268],[268,263,262],[263,268,269],[269,264,263],[265,270,271],[271,266,265],[266,271,272],[272,267,266],[267,272,273],[273,268,267],[268,273,274],[274,269,268],[275,276,277],[277,278,275],[278,277,279],[279,280,278],[280,279,281],[281,282,280],[282,281,283],[283,284,282],[276,285,286],[286,277,276],[277,286,287],[287,279,277],[279,287,288],[288,281,279],[281,288,289],[289,283,281],[285,290,291],[291,286,285],[286,291,292],[292,287,286],[287,292,293],[293,288,287],[288,293,294],[294,289,288],[290,295,296],[296,291,290],[291,296,297],[297,292,291],[292,297,298],[298,293,292],[293,298,299],[299,294,293],[300,301,302],[302,303,300],[303,302,304],[304,305,303],[305,304,306],[306,307,305],[307,306,308],[301,309,310],[310,302,301],[302,310,311],[311,304,302],[304,311,312],[312,306,304],[306,312,313],[309,314,315],[315,310,309],[310,315,316],[316,311,310],[311,316,317],[317,312,311],[312,317,318],[314,319,320],[320,315,314],[315,320,321],[321,316,315],[316,321,322],[322,317,316],[317,322,323],[324,325,326],[326,327,324],[327,326,328],[328,329,327],[329,328,330],[330,331,329],[331,330,332],[325,333,334],[334,326,325],[326,334,335],[335,328,326],[328,335,336],[336,330,328],[330,336,337],[333,338,339],[339,334,333],[334,339,340],[340,335,334],[335,340,341],[341,336,335],[336,341,342],[338,343,344],[344,339,338],[339,344,345],[345,340,339],[340,345,346],[346,341,340],[341,346,347],[348,349,350],[350,351,348],[351,350,352],[352,353,351],[353,352,354],[354,355,353],[355,354,356],[349,357,358],[358,350,349],[350,358,359],[359,352,350],[352,359,360],[360,354,352],[354,360,361],[357,362,363],[363,358,357],[358,363,364],[364,359,358],[359,364,365],[365,360,359],[360,365,366],[362,367,368],[368,363,362],[363,368,369],[369,364,363],[364,369,370],[370,365,364],[365,370,371],[372,373,374],[374,375,372],[375,374,376],[376,377,375],[377,376,378],[378,379,377],[379,378,380],[373,381,382],[382,374,373],[374,382,383],[383,376,374],[376,383,384],[384,378,376],[378,384,385],[381,386,387],[387,382,381],[382,387,388],[388,383,382],[383,388,389],[389,384,383],[384,389,390],[386,391,392],[392,387,386],[387,392,393],[393,388,387],[388,393,394],[394,389,388],[389,394,395],[396,397,398],[398,399,396],[399,398,400],[400,401,399],[401,400,402],[402,403,401],[403,402,404],[404,405,403],[397,406,407],[407,398,397],[398,407,408],[408,400,398],[400,408,409],[409,402,400],[402,409,410],[410,404,402],[406,411,412],[412,407,406],[407,412,413],[413,408,407],[408,413,414],[414,409,408],[409,414,415],[415,410,409],[411,416,417],[417,412,411],[412,417,418],[418,413,412],[413,418,419],[419,414,413],[414,419,420],[420,415,414],[421,422,423],[423,424,421],[424,423,425],[425,426,424],[426,425,427],[427,428,426],[428,427,429],[429,430,428],[422,431,432],[432,423,422],[423,432,433],[433,425,423],[425,433,434],[434,427,425],[427,434,435],[435,429,427],[431,436,437],[437,432,431],[432,437,438],[438,433,432],[433,438,439],[439,434,433],[434,439,440],[440,435,434],[436,441,442],[442,437,436],[437,442,443],[443,438,437],[438,443,444],[444,439,438],[439,444,445],[445,440,439],[446,447,448],[448,449,446],[449,448,450],[450,451,449],[451,450,452],[452,453,451],[453,452,454],[454,455,453],[447,456,457],[457,448,447],[448,457,458],[458,450,448],[450,458,459],[459,452,450],[452,459,460],[460,454,452],[456,461,462],[462,457,456],[457,462,463],[463,458,457],[458,463,464],[464,459,458],[459,464,465],[465,460,459],[461,466,467],[467,462,461],[462,467,468],[468,463,462],[463,468,469],[469,464,463],[464,469,470],[470,465,464],[471,472,473],[473,474,471],[474,473,475],[475,476,474],[476,475,477],[477,478,476],[478,477,479],[479,480,478],[472,481,482],[482,473,472],[473,482,483],[483,475,473],[475,483,484],[484,477,475],[477,484,485],[485,479,477],[481,486,487],[487,482,481],[482,487,488],[488,483,482],[483,488,489],[489,484,483],[484,489,490],[490,485,484],[486,491,492],[492,487,486],[487,492,493],[493,488,487],[488,493,494],[494,489,488],[489,494,495],[495,490,489],[496,497,498],[498,499,496],[499,498,500],[500,501,499],[501,500,502],[502,503,501],[503,502,504],[504,505,503],[497,506,507],[507,498,497],[498,507,508],[508,500,498],[500,508,509],[509,502,500],[502,509,510],[510,504,502],[506,511,512],[512,507,506],[507,512,513],[513,508,507],[508,513,514],[514,509,508],[509,514,515],[515,510,509],[511,516,517],[517,512,511],[512,517,518],[518,513,512],[513,518,519],[519,514,513],[514,519,520],[520,515,514],[521,522,523],[523,524,521],[524,523,525],[525,526,524],[526,525,527],[527,528,526],[528,527,529],[529,530,528],[522,531,532],[532,523,522],[523,532,533],[533,525,523],[525,533,534],[534,527,525],[527,534,535],[535,529,527],[531,536,537],[537,532,531],[532,537,538],[538,533,532],[533,538,539],[539,534,533],[534,539,540],[540,535,534],[536,541,542],[542,537,536],[537,542,543],[543,538,537],[538,543,544],[544,539,538],[539,544,545],[545,540,539],[546,547,548],[548,549,546],[549,548,550],[550,551,549],[551,550,552],[552,553,551],[553,552,554],[554,555,553],[547,556,557],[557,548,547],[548,557,558],[558,550,548],[550,558,559],[559,552,550],[552,559,560],[560,554,552],[556,561,562],[562,557,556],[557,562,563],[563,558,557],[558,563,564],[564,559,558],[559,564,565],[565,560,559],[561,566,567],[567,562,561],[562,567,568],[568,563,562],[563,568,569],[569,564,563],[564,569,570],[570,565,564],[571,572,573],[573,574,571],[574,573,575],[575,576,574],[576,575,577],[577,578,576],[578,577,579],[579,580,578],[572,581,582],[582,573,572],[573,582,583],[583,575,573],[575,583,584],[584,577,575],[577,584,585],[585,579,577],[581,586,587],[587,582,581],[582,587,588],[588,583,582],[583,588,589],[589,584,583],[584,589,590],[590,585,584],[586,591,592],[592,587,586],[587,592,593],[593,588,587],[588,593,594],[594,589,588],[589,594,595],[595,590,589],[596,597,598],[597,596,599],[599,600,597],[600,599,601],[601,602,600],[602,601,603],[603,604,602],[605,596,606],[596,605,607],[607,599,596],[599,607,608],[608,601,599],[601,608,609],[609,603,601],[610,605,611],[605,610,612],[612,607,605],[607,612,613],[613,608,607],[608,613,614],[614,609,608],[615,610,616],[610,615,617],[617,612,610],[612,617,618],[618,613,612],[613,618,619],[619,614,613],[620,621,622],[621,620,623],[623,624,621],[624,623,625],[625,626,624],[626,625,627],[627,628,626],[629,620,630],[620,629,631],[631,623,620],[623,631,632],[632,625,623],[625,632,633],[633,627,625],[634,629,635],[629,634,636],[636,631,629],[631,636,637],[637,632,631],[632,637,638],[638,633,632],[639,634,640],[634,639,641],[641,636,634],[636,641,642],[642,637,636],[637,642,643],[643,638,637],[644,645,646],[645,644,647],[647,648,645],[648,647,649],[649,650,648],[650,649,651],[651,652,650],[653,644,654],[644,653,655],[655,647,644],[647,655,656],[656,649,647],[649,656,657],[657,651,649],[658,653,659],[653,658,660],[660,655,653],[655,660,661],[661,656,655],[656,661,662],[662,657,656],[663,658,664],[658,663,665],[665,660,658],[660,665,666],[666,661,660],[661,666,667],[667,662,661],[668,669,670],[669,668,671],[671,672,669],[672,671,673],[673,674,672],[674,673,675],[675,676,674],[677,668,678],[668,677,679],[679,671,668],[671,679,680],[680,673,671],[673,680,681],[681,675,673],[682,677,683],[677,682,684],[684,679,677],[679,684,685],[685,680,679],[680,685,686],[686,681,680],[687,682,688],[682,687,689],[689,684,682],[684,689,690],[690,685,684],[685,690,691],[691,686,685],[692,693,694],[694,695,692],[695,694,696],[696,697,695],[697,696,698],[698,699,697],[699,698,700],[700,701,699],[693,702,703],[703,694,693],[694,703,704],[704,696,694],[696,704,705],[705,698,696],[698,705,706],[706,700,698],[702,707,708],[708,703,702],[703,708,709],[709,704,703],[704,709,710],[710,705,704],[705,710,711],[711,706,705],[707,712,713],[713,708,707],[708,713,714],[714,709,708],[709,714,715],[715,710,709],[710,715,716],[716,711,710],[717,718,719],[719,720,717],[720,719,721],[721,722,720],[722,721,723],[723,724,722],[724,723,725],[725,726,724],[718,727,728],[728,719,718],[719,728,729],[729,721,719],[721,729,730],[730,723,721],[723,730,731],[731,725,723],[727,732,733],[733,728,727],[728,733,734],[734,729,728],[729,734,735],[735,730,729],[730,735,736],[736,731,730],[732,737,738],[738,733,732],[733,738,739],[739,734,733],[734,739,740],[740,735,734],[735,740,741],[741,736,735],[742,743,744],[744,745,742],[745,744,746],[746,747,745],[747,746,748],[748,749,747],[749,748,750],[750,751,749],[743,752,753],[753,744,743],[744,753,754],[754,746,744],[746,754,755],[755,748,746],[748,755,756],[756,750,748],[752,757,758],[758,753,752],[753,758,759],[759,754,753],[754,759,760],[760,755,754],[755,760,761],[761,756,755],[757,762,763],[763,758,757],[758,763,764],[764,759,758],[759,764,765],[765,760,759],[760,765,766],[766,761,760],[767,768,769],[769,770,767],[770,769,771],[771,772,770],[772,771,773],[773,774,772],[774,773,775],[775,776,774],[768,777,778],[778,769,768],[769,778,779],[779,771,769],[771,779,780],[780,773,771],[773,780,781],[781,775,773],[777,782,783],[783,778,777],[778,783,784],[784,779,778],[779,784,785],[785,780,779],[780,785,786],[786,781,780],[782,787,788],[788,783,782],[783,788,789],[789,784,783],[784,789,790],[790,785,784],[785,790,791],[791,786,785]]}}]); \ No newline at end of file diff --git a/_next/static/chunks/webpack-ab06f07e42fd237d.js b/_next/static/chunks/webpack-a358947a3be7ead5.js similarity index 97% rename from _next/static/chunks/webpack-ab06f07e42fd237d.js rename to _next/static/chunks/webpack-a358947a3be7ead5.js index f4b0dc5d..9ceda78d 100644 --- a/_next/static/chunks/webpack-ab06f07e42fd237d.js +++ b/_next/static/chunks/webpack-a358947a3be7ead5.js @@ -1 +1 @@ -!function(){"use strict";var e,t,r,n,a,o,f,i,u,c,d={},b={};function l(e){var t=b[e];if(void 0!==t)return t.exports;var r=b[e]={exports:{}},n=!0;try{d[e].call(r.exports,r,r.exports,l),n=!1}finally{n&&delete b[e]}return r.exports}l.m=d,e=[],l.O=function(t,r,n,a){if(r){a=a||0;for(var o=e.length;o>0&&e[o-1][2]>a;o--)e[o]=e[o-1];e[o]=[r,n,a];return}for(var f=1/0,o=0;o=a&&Object.keys(l.O).every(function(e){return l.O[e](r[u])})?r.splice(u--,1):(i=!1,a0&&e[o-1][2]>a;o--)e[o]=e[o-1];e[o]=[r,n,a];return}for(var f=1/0,o=0;o=a&&Object.keys(l.O).every(function(e){return l.O[e](r[u])})?r.splice(u--,1):(i=!1,aWebGPU Samples \ No newline at end of file +WebGPU Samples \ No newline at end of file diff --git a/samples/A-buffer.html b/samples/A-buffer.html index b3074d0a..465927d0 100644 --- a/samples/A-buffer.html +++ b/samples/A-buffer.html @@ -8,4 +8,8 @@ height: auto !important; overflow: visible !important; } - A-Buffer - WebGPU Samples \ No newline at end of file + A-Buffer - WebGPU Samples \ No newline at end of file diff --git a/samples/animometer.html b/samples/animometer.html index 9a8c02a7..0d77178b 100644 --- a/samples/animometer.html +++ b/samples/animometer.html @@ -8,4 +8,4 @@ height: auto !important; overflow: visible !important; } - Animometer - WebGPU Samples \ No newline at end of file + Animometer - WebGPU Samples \ No newline at end of file diff --git a/samples/cameras.html b/samples/cameras.html index 70bd85e4..85056781 100644 --- a/samples/cameras.html +++ b/samples/cameras.html @@ -8,4 +8,4 @@ height: auto !important; overflow: visible !important; } - Cameras - WebGPU Samples \ No newline at end of file + Cameras - WebGPU Samples \ No newline at end of file diff --git a/samples/computeBoids.html b/samples/computeBoids.html index 8dd9b3cf..e1bb2812 100644 --- a/samples/computeBoids.html +++ b/samples/computeBoids.html @@ -8,4 +8,4 @@ height: auto !important; overflow: visible !important; } - Compute Boids - WebGPU Samples \ No newline at end of file + Compute Boids - WebGPU Samples \ No newline at end of file diff --git a/samples/cornell.html b/samples/cornell.html index 02a75fde..5340eb90 100644 --- a/samples/cornell.html +++ b/samples/cornell.html @@ -8,4 +8,4 @@ height: auto !important; overflow: visible !important; } - Cornell box - WebGPU Samples \ No newline at end of file + Cornell box - WebGPU Samples \ No newline at end of file diff --git a/samples/cubemap.html b/samples/cubemap.html index c4ccc586..d0615e02 100644 --- a/samples/cubemap.html +++ b/samples/cubemap.html @@ -8,4 +8,4 @@ height: auto !important; overflow: visible !important; } - Cubemap - WebGPU Samples \ No newline at end of file + Cubemap - WebGPU Samples \ No newline at end of file diff --git a/samples/deferredRendering.html b/samples/deferredRendering.html index d54940c1..5a7467cd 100644 --- a/samples/deferredRendering.html +++ b/samples/deferredRendering.html @@ -16,7 +16,7 @@ We also update light position in a compute shader, where further operations like tile/cluster culling could happen. The debug view shows the depth buffer on the left (flipped and scaled a bit to make it more visible), the normal G buffer in the middle, and the albedo G-buffer on the right side of the screen. - "/>

Deferred Rendering

See it on Github!

This example shows how to do deferred rendering with webgpu. + "/>

Deferred Rendering

See it on Github!

This example shows how to do deferred rendering with webgpu. Render geometry info to multiple targets in the gBuffers in the first pass. In this sample we have 2 gBuffers for normals and albedo, along with a depth texture. And then do the lighting in a second pass with per fragment data read from gBuffers so it's independent of scene complexity. @@ -24,4 +24,4 @@ We also update light position in a compute shader, where further operations like tile/cluster culling could happen. The debug view shows the depth buffer on the left (flipped and scaled a bit to make it more visible), the normal G buffer in the middle, and the albedo G-buffer on the right side of the screen. -

\ No newline at end of file +

\ No newline at end of file diff --git a/samples/fractalCube.html b/samples/fractalCube.html index 4d1a05a2..cc27e65b 100644 --- a/samples/fractalCube.html +++ b/samples/fractalCube.html @@ -8,4 +8,4 @@ height: auto !important; overflow: visible !important; } - Fractal Cube - WebGPU Samples \ No newline at end of file + Fractal Cube - WebGPU Samples \ No newline at end of file diff --git a/samples/gameOfLife.html b/samples/gameOfLife.html index 2ea0e7a8..5156d068 100644 --- a/samples/gameOfLife.html +++ b/samples/gameOfLife.html @@ -8,4 +8,4 @@ height: auto !important; overflow: visible !important; } - Conway's Game of Life - WebGPU Samples \ No newline at end of file + Conway's Game of Life - WebGPU Samples \ No newline at end of file diff --git a/samples/helloTriangle.html b/samples/helloTriangle.html index 893b78be..a97bb2a9 100644 --- a/samples/helloTriangle.html +++ b/samples/helloTriangle.html @@ -8,4 +8,4 @@ height: auto !important; overflow: visible !important; } - Hello Triangle - WebGPU Samples \ No newline at end of file + Hello Triangle - WebGPU Samples \ No newline at end of file diff --git a/samples/helloTriangleMSAA.html b/samples/helloTriangleMSAA.html index 9a89c087..54445769 100644 --- a/samples/helloTriangleMSAA.html +++ b/samples/helloTriangleMSAA.html @@ -8,4 +8,4 @@ height: auto !important; overflow: visible !important; } - Hello Triangle MSAA - WebGPU Samples \ No newline at end of file + Hello Triangle MSAA - WebGPU Samples \ No newline at end of file diff --git a/samples/imageBlur.html b/samples/imageBlur.html index 1ddc8b7a..128056e8 100644 --- a/samples/imageBlur.html +++ b/samples/imageBlur.html @@ -8,4 +8,4 @@ height: auto !important; overflow: visible !important; } - Image Blur - WebGPU Samples \ No newline at end of file + Image Blur - WebGPU Samples \ No newline at end of file diff --git a/samples/instancedCube.html b/samples/instancedCube.html index dfde6e9f..a6b96017 100644 --- a/samples/instancedCube.html +++ b/samples/instancedCube.html @@ -8,4 +8,4 @@ height: auto !important; overflow: visible !important; } - Instanced Cube - WebGPU Samples \ No newline at end of file + Instanced Cube - WebGPU Samples \ No newline at end of file diff --git a/samples/particles.html b/samples/particles.html index 30c57544..1a692f85 100644 --- a/samples/particles.html +++ b/samples/particles.html @@ -8,4 +8,4 @@ height: auto !important; overflow: visible !important; } - Particles - WebGPU Samples \ No newline at end of file + Particles - WebGPU Samples \ No newline at end of file diff --git a/samples/renderBundles.html b/samples/renderBundles.html index 2770872f..6705cc36 100644 --- a/samples/renderBundles.html +++ b/samples/renderBundles.html @@ -11,7 +11,7 @@ Render Bundles - WebGPU Samples

Render Bundles

See it on Github!

This example shows how to use render bundles. It renders a large number of + of instancing to reduce draw overhead.)"/>

Render Bundles

See it on Github!

This example shows how to use render bundles. It renders a large number of meshes individually as a proxy for a more complex scene in order to demonstrate the reduction in JavaScript time spent to issue render commands. (Typically a scene like this would make use - of instancing to reduce draw overhead.)

\ No newline at end of file + of instancing to reduce draw overhead.)

\ No newline at end of file diff --git a/samples/resizeCanvas.html b/samples/resizeCanvas.html index deae4471..04d29ae0 100644 --- a/samples/resizeCanvas.html +++ b/samples/resizeCanvas.html @@ -8,4 +8,4 @@ height: auto !important; overflow: visible !important; } - Resize Canvas - WebGPU Samples \ No newline at end of file + Resize Canvas - WebGPU Samples \ No newline at end of file diff --git a/samples/reversedZ.html b/samples/reversedZ.html index c2111a4e..4a212d47 100644 --- a/samples/reversedZ.html +++ b/samples/reversedZ.html @@ -17,7 +17,7 @@ Related reading: https://developer.nvidia.com/content/depth-precision-visualized https://thxforthefish.com/posts/reverse_z/ - "/>

Reversed Z

See it on Github!

This example shows the use of reversed z technique for better utilization of depth buffer precision. + "/>

Reversed Z

See it on Github!

This example shows the use of reversed z technique for better utilization of depth buffer precision. The left column uses regular method, while the right one uses reversed z technique. Both are using depth32float as their depth buffer format. A set of red and green planes are positioned very close to each other. Higher sets are placed further from camera (and are scaled for better visual purpose). @@ -26,4 +26,4 @@ Related reading: https://developer.nvidia.com/content/depth-precision-visualized https://thxforthefish.com/posts/reverse_z/ -

\ No newline at end of file +

\ No newline at end of file diff --git a/samples/rotatingCube.html b/samples/rotatingCube.html index b5fc1c2a..c53bc776 100644 --- a/samples/rotatingCube.html +++ b/samples/rotatingCube.html @@ -8,4 +8,4 @@ height: auto !important; overflow: visible !important; } - Rotating Cube - WebGPU Samples \ No newline at end of file + Rotating Cube - WebGPU Samples \ No newline at end of file diff --git a/samples/samplerParameters.html b/samples/samplerParameters.html index 7e7b5572..d583ea7c 100644 --- a/samples/samplerParameters.html +++ b/samples/samplerParameters.html @@ -8,4 +8,4 @@ height: auto !important; overflow: visible !important; } - Sampler Parameters - WebGPU Samples

Sampler Parameters

See it on Github!

Visualizes what all the sampler parameters do. Shows a textured plane at various scales (rotated, head-on, in perspective, and in vanishing perspective). The bottom-right view shows the raw contents of the 4 mipmap levels of the test texture (16x16, 8x8, 4x4, and 2x2).

\ No newline at end of file + Sampler Parameters - WebGPU Samples

Sampler Parameters

See it on Github!

Visualizes what all the sampler parameters do. Shows a textured plane at various scales (rotated, head-on, in perspective, and in vanishing perspective). The bottom-right view shows the raw contents of the 4 mipmap levels of the test texture (16x16, 8x8, 4x4, and 2x2).

\ No newline at end of file diff --git a/samples/shadowMapping.html b/samples/shadowMapping.html index c7e4cbe8..78a23931 100644 --- a/samples/shadowMapping.html +++ b/samples/shadowMapping.html @@ -8,4 +8,4 @@ height: auto !important; overflow: visible !important; } - Shadow Mapping - WebGPU Samples \ No newline at end of file + Shadow Mapping - WebGPU Samples \ No newline at end of file diff --git a/samples/texturedCube.html b/samples/texturedCube.html index 348542e6..0ea0ca23 100644 --- a/samples/texturedCube.html +++ b/samples/texturedCube.html @@ -8,4 +8,4 @@ height: auto !important; overflow: visible !important; } - Textured Cube - WebGPU Samples \ No newline at end of file + Textured Cube - WebGPU Samples \ No newline at end of file diff --git a/samples/twoCubes.html b/samples/twoCubes.html index 0a9076db..5ae306a9 100644 --- a/samples/twoCubes.html +++ b/samples/twoCubes.html @@ -8,4 +8,4 @@ height: auto !important; overflow: visible !important; } - Two Cubes - WebGPU Samples \ No newline at end of file + Two Cubes - WebGPU Samples \ No newline at end of file diff --git a/samples/videoUploading.html b/samples/videoUploading.html index 76db84ec..898ecf4d 100644 --- a/samples/videoUploading.html +++ b/samples/videoUploading.html @@ -8,4 +8,4 @@ height: auto !important; overflow: visible !important; } - Video Uploading - WebGPU Samples \ No newline at end of file + Video Uploading - WebGPU Samples \ No newline at end of file diff --git a/samples/videoUploadingWebCodecs.html b/samples/videoUploadingWebCodecs.html index 877c2436..f793d9e0 100644 --- a/samples/videoUploadingWebCodecs.html +++ b/samples/videoUploadingWebCodecs.html @@ -8,4 +8,4 @@ height: auto !important; overflow: visible !important; } - Video Uploading with WebCodecs - WebGPU Samples \ No newline at end of file + Video Uploading with WebCodecs - WebGPU Samples \ No newline at end of file diff --git a/samples/worker.html b/samples/worker.html index 6b4cbde3..540d22e3 100644 --- a/samples/worker.html +++ b/samples/worker.html @@ -10,6 +10,6 @@ } WebGPU in a Worker - WebGPU Samples

WebGPU in a Worker

See it on Github!

This example shows one method of using WebGPU in a web worker and presenting to + which is then transferred to the worker where all the WebGPU calls are made."/>

\ No newline at end of file + which is then transferred to the worker where all the WebGPU calls are made.

\ No newline at end of file