typegpu 0.8.0 → 0.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{chunk-6WF2EZIT.js → chunk-6U5HPHCJ.js} +2 -2
- package/{chunk-B254XDWG.js → chunk-CGQB3SER.js} +2 -2
- package/{chunk-XEUNEHAZ.js → chunk-CRZWTZM2.js} +6 -6
- package/chunk-CRZWTZM2.js.map +1 -0
- package/chunk-ECR2EGZX.js +7 -0
- package/chunk-ECR2EGZX.js.map +1 -0
- package/chunk-PWBIFP67.js +2 -0
- package/chunk-PWBIFP67.js.map +1 -0
- package/common/index.d.ts +1 -1
- package/common/index.js +1 -1
- package/data/index.d.ts +3 -3
- package/data/index.js +1 -1
- package/index.d.ts +2 -2
- package/index.js +40 -40
- package/index.js.map +1 -1
- package/{matrix-C6mMH7pB.d.ts → matrix-DIfOiRyz.d.ts} +1 -1
- package/package.json +5 -13
- package/std/index.d.ts +2 -2
- package/std/index.js +1 -1
- package/std/index.js.map +1 -1
- package/{tgpuConstant-DzGgwe0I.d.ts → tgpuConstant-BTQFNlQH.d.ts} +13 -8
- package/chunk-A5APHF7K.cjs +0 -10
- package/chunk-A5APHF7K.cjs.map +0 -1
- package/chunk-LL6NPRFE.cjs +0 -7
- package/chunk-LL6NPRFE.cjs.map +0 -1
- package/chunk-M2P3FJT7.cjs +0 -2
- package/chunk-M2P3FJT7.cjs.map +0 -1
- package/chunk-PO6SIMTQ.js +0 -2
- package/chunk-PO6SIMTQ.js.map +0 -1
- package/chunk-T2GBOTUH.js +0 -7
- package/chunk-T2GBOTUH.js.map +0 -1
- package/chunk-TRAG63HY.cjs +0 -3
- package/chunk-TRAG63HY.cjs.map +0 -1
- package/chunk-U3CXOCRG.cjs +0 -2
- package/chunk-U3CXOCRG.cjs.map +0 -1
- package/chunk-XEUNEHAZ.js.map +0 -1
- package/common/index.cjs +0 -7
- package/common/index.cjs.map +0 -1
- package/common/index.d.cts +0 -24
- package/data/index.cjs +0 -2
- package/data/index.cjs.map +0 -1
- package/data/index.d.cts +0 -402
- package/index.cjs +0 -192
- package/index.cjs.map +0 -1
- package/index.d.cts +0 -369
- package/matrix-Cn2jQILV.d.cts +0 -122
- package/std/index.cjs +0 -2
- package/std/index.cjs.map +0 -1
- package/std/index.d.cts +0 -639
- package/tgpuConstant-DzGgwe0I.d.cts +0 -5196
- /package/{chunk-6WF2EZIT.js.map → chunk-6U5HPHCJ.js.map} +0 -0
- /package/{chunk-B254XDWG.js.map → chunk-CGQB3SER.js.map} +0 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{U as q,V as W,W as u,Y as _}from"./chunk-ECR2EGZX.js";import{$ as v,$a as U,Ea as r,Ha as B,La as h,Na as c,Qa as x,Ra as o,Ta as i,Ua as n,Xa as R,Za as F,a as V,aa as y,ab as k,cb as N,eb as D,fb as a,hb as p,ib as f,jb as E,r as z,v as w}from"./chunk-CRZWTZM2.js";var ae=c({name:"bitcastU32toF32",normalImpl:(e=>typeof e=="number"?q(e):u.bitcastU32toF32[e.kind](e)),codegenImpl:e=>r`bitcast<f32>(${e})`,signature:(...e)=>{let t=B(e,[o])??e;return{argTypes:t,returnType:w(t[0])?t[0].type==="vec2u"?R:t[0].type==="vec3u"?k:a:n}}}),ne=c({name:"bitcastU32toI32",normalImpl:(e=>typeof e=="number"?W(e):u.bitcastU32toI32[e.kind](e)),codegenImpl:e=>r`bitcast<i32>(${e})`,signature:(...e)=>{let t=B(e,[o])??e;return{argTypes:t,returnType:w(t[0])?t[0].type==="vec2u"?F:t[0].type==="vec3u"?N:p:i}}});import*as m from"typed-binary";var ie=h(e=>{let t=new ArrayBuffer(4);new m.BufferWriter(t).writeUint32(e);let l=new m.BufferReader(t);return R(l.readFloat16(),l.readFloat16())},e=>y(r`unpack2x16float(${e})`,R),"unpack2x16float"),pe=h(e=>{let t=new ArrayBuffer(4),s=new m.BufferWriter(t);s.writeFloat16(e.x),s.writeFloat16(e.y);let l=new m.BufferReader(t);return o(l.readUint32())},e=>y(r`pack2x16float(${e})`,o),"pack2x16float"),fe=h(e=>{let t=new ArrayBuffer(4);new m.BufferWriter(t).writeUint32(e);let l=new m.BufferReader(t);return a(l.readUint8()/255,l.readUint8()/255,l.readUint8()/255,l.readUint8()/255)},e=>y(r`unpack4x8unorm(${e})`,a),"unpack4x8unorm"),ue=h(e=>{let t=new ArrayBuffer(4),s=new m.BufferWriter(t);s.writeUint8(e.x*255),s.writeUint8(e.y*255),s.writeUint8(e.z*255),s.writeUint8(e.w*255);let l=new m.BufferReader(t);return o(l.readUint32())},e=>y(r`pack4x8unorm(${e})`,o),"pack4x8unorm");function T(e){return e.type.includes("2")?U:e.type.includes("3")?D:E}var Ae=c({name:"allEq",signature:(...e)=>({argTypes:e,returnType:x}),normalImpl:(e,t)=>$(A(e,t)),codegenImpl:(e,t)=>r`all(${e} == ${t})`}),A=(e,t)=>u.eq[e.kind](e,t),Se=c({name:"eq",signature:(...e)=>({argTypes:e,returnType:T(e[0])}),normalImpl:A,codegenImpl:(e,t)=>r`(${e} == ${t})`}),Me=c({name:"ne",signature:(...e)=>({argTypes:e,returnType:T(e[0])}),normalImpl:(e,t)=>d(A(e,t)),codegenImpl:(e,t)=>r`(${e} != ${t})`}),M=(e,t)=>u.lt[e.kind](e,t),ze=c({name:"lt",signature:(...e)=>({argTypes:e,returnType:T(e[0])}),normalImpl:M,codegenImpl:(e,t)=>r`(${e} < ${t})`}),we=c({name:"le",signature:(...e)=>({argTypes:e,returnType:T(e[0])}),normalImpl:(e,t)=>I(M(e,t),A(e,t)),codegenImpl:(e,t)=>r`(${e} <= ${t})`}),Ie=c({name:"gt",signature:(...e)=>({argTypes:e,returnType:T(e[0])}),normalImpl:(e,t)=>O(d(M(e,t)),d(A(e,t))),codegenImpl:(e,t)=>r`(${e} > ${t})`}),$e=c({name:"ge",signature:(...e)=>({argTypes:e,returnType:T(e[0])}),normalImpl:(e,t)=>d(M(e,t)),codegenImpl:(e,t)=>r`(${e} >= ${t})`}),d=e=>u.neg[e.kind](e),Ve=c({name:"not",signature:(...e)=>({argTypes:e,returnType:e[0]}),normalImpl:d,codegenImpl:e=>r`!(${e})`}),I=(e,t)=>u.or[e.kind](e,t),Fe=c({name:"or",signature:(...e)=>({argTypes:e,returnType:e[0]}),normalImpl:I,codegenImpl:(e,t)=>r`(${e} | ${t})`}),O=(e,t)=>d(I(d(e),d(t))),Ue=c({name:"and",signature:(...e)=>({argTypes:e,returnType:e[0]}),normalImpl:O,codegenImpl:(e,t)=>r`(${e} & ${t})`}),$=e=>u.all[e.kind](e),ke=c({name:"all",signature:(...e)=>({argTypes:e,returnType:x}),normalImpl:$,codegenImpl:e=>r`all(${e})`}),Ne=c({name:"any",signature:(...e)=>({argTypes:e,returnType:x}),normalImpl:e=>!$(d(e)),codegenImpl:e=>r`any(${e})`}),De=c({name:"isCloseTo",signature:(...e)=>({argTypes:e,returnType:x}),normalImpl:(e,t,s=.01)=>typeof e=="number"&&typeof t=="number"?Math.abs(e-t)<s:z(e)&&z(t)?u.isCloseToZero[e.kind](_[V].jsImpl(e,t),s):!1,codegenImpl:(e,t,s=y(.01,n))=>v(e)&&v(t)?r`(abs(f32(${e}) - f32(${t})) <= ${s})`:!v(e)&&!v(t)?r`all(abs(${e} - ${t}) <= (${e} - ${e}) + ${s})`:"false"});function j(e,t,s){return typeof s=="boolean"?s?t:e:u.select[e.kind](e,t,s)}var Ee=c({name:"select",signature:(e,t,s)=>{let[l,b]=B([e,t])??[e,t];return{argTypes:[l,b,s],returnType:l}},normalImpl:j,codegenImpl:(e,t,s)=>r`select(${e}, ${t}, ${s})`});var L={r8unorm:{channelType:n,vectorType:a,texelSize:1,sampleTypes:["float","unfilterable-float"],aspects:["color"],canRenderAttachment:!0,canBlend:!0,canMultisample:!0,canResolve:!0,storageBindings:["write-only","read-only","read-write"]},r8snorm:{channelType:n,vectorType:a,texelSize:1,sampleTypes:["float","unfilterable-float"],aspects:["color"],canRenderAttachment:!1,canBlend:!1,canMultisample:!1,canResolve:!1,storageBindings:["write-only","read-only"]},r8uint:{channelType:o,vectorType:f,texelSize:1,sampleTypes:["uint"],aspects:["color"],canRenderAttachment:!0,canBlend:!1,canMultisample:!0,canResolve:!1,storageBindings:["write-only","read-only","read-write"]},r8sint:{channelType:i,vectorType:p,texelSize:1,sampleTypes:["sint"],aspects:["color"],canRenderAttachment:!0,canBlend:!1,canMultisample:!0,canResolve:!1,storageBindings:["write-only","read-only","read-write"]},rg8unorm:{channelType:n,vectorType:a,texelSize:2,sampleTypes:["float","unfilterable-float"],aspects:["color"],canRenderAttachment:!0,canBlend:!0,canMultisample:!0,canResolve:!0,storageBindings:["write-only","read-only"]},rg8snorm:{channelType:n,vectorType:a,texelSize:2,sampleTypes:["float","unfilterable-float"],aspects:["color"],canRenderAttachment:!1,canBlend:!1,canMultisample:!1,canResolve:!1,storageBindings:["write-only","read-only"]},rg8uint:{channelType:o,vectorType:f,texelSize:2,sampleTypes:["uint"],aspects:["color"],canRenderAttachment:!0,canBlend:!1,canMultisample:!0,canResolve:!1,storageBindings:["write-only","read-only"]},rg8sint:{channelType:i,vectorType:p,texelSize:2,sampleTypes:["sint"],aspects:["color"],canRenderAttachment:!0,canBlend:!1,canMultisample:!0,canResolve:!1,storageBindings:["write-only","read-only"]},rgba8unorm:{channelType:n,vectorType:a,texelSize:4,sampleTypes:["float","unfilterable-float"],aspects:["color"],canRenderAttachment:!0,canBlend:!0,canMultisample:!0,canResolve:!0,storageBindings:["write-only","read-only","read-write"]},"rgba8unorm-srgb":{channelType:n,vectorType:a,texelSize:4,sampleTypes:["float","unfilterable-float"],aspects:["color"],canRenderAttachment:!0,canBlend:!0,canMultisample:!0,canResolve:!0,storageBindings:null},rgba8snorm:{channelType:n,vectorType:a,texelSize:4,sampleTypes:["float","unfilterable-float"],aspects:["color"],canRenderAttachment:!0,canBlend:!1,canMultisample:!0,canResolve:!1,storageBindings:["write-only","read-only"]},rgba8uint:{channelType:o,vectorType:f,texelSize:4,sampleTypes:["uint"],aspects:["color"],canRenderAttachment:!0,canBlend:!1,canMultisample:!0,canResolve:!1,storageBindings:["write-only","read-only","read-write"]},rgba8sint:{channelType:i,vectorType:p,texelSize:4,sampleTypes:["sint"],aspects:["color"],canRenderAttachment:!0,canBlend:!1,canMultisample:!0,canResolve:!1,storageBindings:["write-only","read-only","read-write"]},bgra8unorm:{channelType:n,vectorType:a,texelSize:4,sampleTypes:["float","unfilterable-float"],aspects:["color"],canRenderAttachment:!0,canBlend:!0,canMultisample:!0,canResolve:!0,storageBindings:["write-only"]},"bgra8unorm-srgb":{channelType:n,vectorType:a,texelSize:4,sampleTypes:["float","unfilterable-float"],aspects:["color"],canRenderAttachment:!0,canBlend:!0,canMultisample:!0,canResolve:!0,storageBindings:null},r16unorm:{channelType:n,vectorType:a,texelSize:2,sampleTypes:["unfilterable-float"],aspects:["color"],canRenderAttachment:!0,canBlend:!0,canMultisample:!0,canResolve:!1,storageBindings:["write-only","read-only"]},r16snorm:{channelType:n,vectorType:a,texelSize:2,sampleTypes:["unfilterable-float"],aspects:["color"],canRenderAttachment:!0,canBlend:!0,canMultisample:!0,canResolve:!1,storageBindings:["write-only","read-only"]},r16uint:{channelType:o,vectorType:f,texelSize:2,sampleTypes:["uint"],aspects:["color"],canRenderAttachment:!0,canBlend:!1,canMultisample:!0,canResolve:!1,storageBindings:["write-only","read-only","read-write"]},r16sint:{channelType:i,vectorType:p,texelSize:2,sampleTypes:["sint"],aspects:["color"],canRenderAttachment:!0,canBlend:!1,canMultisample:!0,canResolve:!1,storageBindings:["write-only","read-only","read-write"]},r16float:{channelType:n,vectorType:a,texelSize:2,sampleTypes:["float","unfilterable-float"],aspects:["color"],canRenderAttachment:!0,canBlend:!0,canMultisample:!0,canResolve:!0,storageBindings:["write-only","read-only","read-write"]},rg16unorm:{channelType:n,vectorType:a,texelSize:4,sampleTypes:["unfilterable-float"],aspects:["color"],canRenderAttachment:!0,canBlend:!0,canMultisample:!0,canResolve:!1,storageBindings:["write-only","read-only"]},rg16snorm:{channelType:n,vectorType:a,texelSize:4,sampleTypes:["unfilterable-float"],aspects:["color"],canRenderAttachment:!0,canBlend:!0,canMultisample:!0,canResolve:!1,storageBindings:["write-only","read-only"]},rg16uint:{channelType:o,vectorType:f,texelSize:4,sampleTypes:["uint"],aspects:["color"],canRenderAttachment:!0,canBlend:!1,canMultisample:!0,canResolve:!1,storageBindings:["write-only","read-only"]},rg16sint:{channelType:i,vectorType:p,texelSize:4,sampleTypes:["sint"],aspects:["color"],canRenderAttachment:!0,canBlend:!1,canMultisample:!0,canResolve:!1,storageBindings:["write-only","read-only"]},rg16float:{channelType:n,vectorType:a,texelSize:4,sampleTypes:["float","unfilterable-float"],aspects:["color"],canRenderAttachment:!0,canBlend:!0,canMultisample:!0,canResolve:!0,storageBindings:["write-only","read-only"]},rgba16unorm:{channelType:n,vectorType:a,texelSize:8,sampleTypes:["unfilterable-float"],aspects:["color"],canRenderAttachment:!0,canBlend:!0,canMultisample:!0,canResolve:!1,storageBindings:["write-only","read-only"]},rgba16snorm:{channelType:n,vectorType:a,texelSize:8,sampleTypes:["unfilterable-float"],aspects:["color"],canRenderAttachment:!0,canBlend:!0,canMultisample:!0,canResolve:!1,storageBindings:["write-only","read-only"]},rgba16uint:{channelType:o,vectorType:f,texelSize:8,sampleTypes:["uint"],aspects:["color"],canRenderAttachment:!0,canBlend:!1,canMultisample:!0,canResolve:!1,storageBindings:["write-only","read-only","read-write"]},rgba16sint:{channelType:i,vectorType:p,texelSize:8,sampleTypes:["sint"],aspects:["color"],canRenderAttachment:!0,canBlend:!1,canMultisample:!0,canResolve:!1,storageBindings:["write-only","read-only","read-write"]},rgba16float:{channelType:n,vectorType:a,texelSize:8,sampleTypes:["float","unfilterable-float"],aspects:["color"],canRenderAttachment:!0,canBlend:!0,canMultisample:!0,canResolve:!0,storageBindings:["write-only","read-only","read-write"]},r32uint:{channelType:o,vectorType:f,texelSize:4,sampleTypes:["uint"],aspects:["color"],canRenderAttachment:!0,canBlend:!1,canMultisample:!1,canResolve:!1,storageBindings:["write-only","read-only","read-write"]},r32sint:{channelType:i,vectorType:p,texelSize:4,sampleTypes:["sint"],aspects:["color"],canRenderAttachment:!0,canBlend:!1,canMultisample:!1,canResolve:!1,storageBindings:["write-only","read-only","read-write"]},r32float:{channelType:n,vectorType:a,texelSize:4,sampleTypes:["float","unfilterable-float"],aspects:["color"],canRenderAttachment:!0,canBlend:!0,canMultisample:!0,canResolve:!1,storageBindings:["write-only","read-only","read-write"]},rg32uint:{channelType:o,vectorType:f,texelSize:8,sampleTypes:["uint"],aspects:["color"],canRenderAttachment:!0,canBlend:!1,canMultisample:!1,canResolve:!1,storageBindings:["write-only","read-only"]},rg32sint:{channelType:i,vectorType:p,texelSize:8,sampleTypes:["sint"],aspects:["color"],canRenderAttachment:!0,canBlend:!1,canMultisample:!1,canResolve:!1,storageBindings:["write-only","read-only"]},rg32float:{channelType:n,vectorType:a,texelSize:8,sampleTypes:["float","unfilterable-float"],aspects:["color"],canRenderAttachment:!0,canBlend:!0,canMultisample:!1,canResolve:!1,storageBindings:["write-only","read-only","read-write"]},rgba32uint:{channelType:o,vectorType:f,texelSize:16,sampleTypes:["uint"],aspects:["color"],canRenderAttachment:!0,canBlend:!1,canMultisample:!1,canResolve:!1,storageBindings:["write-only","read-only","read-write"]},rgba32sint:{channelType:i,vectorType:p,texelSize:16,sampleTypes:["sint"],aspects:["color"],canRenderAttachment:!0,canBlend:!1,canMultisample:!1,canResolve:!1,storageBindings:["write-only","read-only","read-write"]},rgba32float:{channelType:n,vectorType:a,texelSize:16,sampleTypes:["float","unfilterable-float"],aspects:["color"],canRenderAttachment:!0,canBlend:!0,canMultisample:!1,canResolve:!1,storageBindings:["write-only","read-only","read-write"]},rgb10a2uint:{channelType:o,vectorType:f,texelSize:4,sampleTypes:["uint"],aspects:["color"],canRenderAttachment:!0,canBlend:!1,canMultisample:!0,canResolve:!1,storageBindings:["write-only","read-only"]},rgb10a2unorm:{channelType:n,vectorType:a,texelSize:4,sampleTypes:["float","unfilterable-float"],aspects:["color"],canRenderAttachment:!0,canBlend:!0,canMultisample:!0,canResolve:!0,storageBindings:["write-only","read-only"]},rg11b10ufloat:{channelType:n,vectorType:a,texelSize:4,sampleTypes:["float","unfilterable-float"],aspects:["color"],canRenderAttachment:!0,canBlend:!0,canMultisample:!0,canResolve:!0,storageBindings:["write-only","read-only"]},rgb9e5ufloat:{channelType:n,vectorType:a,texelSize:4,sampleTypes:["float","unfilterable-float"],aspects:["color"],canRenderAttachment:!1,canBlend:!1,canMultisample:!1,canResolve:!1,storageBindings:null},stencil8:{channelType:o,vectorType:f,texelSize:1,sampleTypes:["uint"],aspects:["stencil"],canRenderAttachment:!0,canBlend:!1,canMultisample:!0,canResolve:!1,storageBindings:null},depth16unorm:{channelType:n,vectorType:a,texelSize:2,sampleTypes:["depth","unfilterable-float"],aspects:["depth"],canRenderAttachment:!0,canBlend:!1,canMultisample:!0,canResolve:!1,storageBindings:null},depth24plus:{channelType:n,vectorType:a,texelSize:4,sampleTypes:["depth","unfilterable-float"],aspects:["depth"],canRenderAttachment:!0,canBlend:!1,canMultisample:!0,canResolve:!1,storageBindings:null},"depth24plus-stencil8":{channelType:n,vectorType:a,texelSize:4,sampleTypes:["depth","unfilterable-float"],aspects:["depth","stencil"],canRenderAttachment:!0,canBlend:!1,canMultisample:!0,canResolve:!1,storageBindings:null},depth32float:{channelType:n,vectorType:a,texelSize:4,sampleTypes:["depth","unfilterable-float"],aspects:["depth"],canRenderAttachment:!0,canBlend:!1,canMultisample:!0,canResolve:!1,storageBindings:null},"depth32float-stencil8":{channelType:n,vectorType:a,texelSize:4,sampleTypes:["depth","unfilterable-float"],aspects:["depth","stencil"],canRenderAttachment:!0,canBlend:!1,canMultisample:!0,canResolve:!1,storageBindings:null},"bc1-rgba-unorm":{channelType:n,vectorType:a,texelSize:8,sampleTypes:["float","unfilterable-float"],aspects:["color"],canRenderAttachment:!1,canBlend:!1,canMultisample:!1,canResolve:!1,storageBindings:null},"bc1-rgba-unorm-srgb":{channelType:n,vectorType:a,texelSize:8,sampleTypes:["float","unfilterable-float"],aspects:["color"],canRenderAttachment:!1,canBlend:!1,canMultisample:!1,canResolve:!1,storageBindings:null},"bc2-rgba-unorm":{channelType:n,vectorType:a,texelSize:16,sampleTypes:["float","unfilterable-float"],aspects:["color"],canRenderAttachment:!1,canBlend:!1,canMultisample:!1,canResolve:!1,storageBindings:null},"bc2-rgba-unorm-srgb":{channelType:n,vectorType:a,texelSize:16,sampleTypes:["float","unfilterable-float"],aspects:["color"],canRenderAttachment:!1,canBlend:!1,canMultisample:!1,canResolve:!1,storageBindings:null},"bc3-rgba-unorm":{channelType:n,vectorType:a,texelSize:16,sampleTypes:["float","unfilterable-float"],aspects:["color"],canRenderAttachment:!1,canBlend:!1,canMultisample:!1,canResolve:!1,storageBindings:null},"bc3-rgba-unorm-srgb":{channelType:n,vectorType:a,texelSize:16,sampleTypes:["float","unfilterable-float"],aspects:["color"],canRenderAttachment:!1,canBlend:!1,canMultisample:!1,canResolve:!1,storageBindings:null},"bc4-r-unorm":{channelType:n,vectorType:a,texelSize:8,sampleTypes:["float","unfilterable-float"],aspects:["color"],canRenderAttachment:!1,canBlend:!1,canMultisample:!1,canResolve:!1,storageBindings:null},"bc4-r-snorm":{channelType:n,vectorType:a,texelSize:8,sampleTypes:["float","unfilterable-float"],aspects:["color"],canRenderAttachment:!1,canBlend:!1,canMultisample:!1,canResolve:!1,storageBindings:null},"bc5-rg-unorm":{channelType:n,vectorType:a,texelSize:16,sampleTypes:["float","unfilterable-float"],aspects:["color"],canRenderAttachment:!1,canBlend:!1,canMultisample:!1,canResolve:!1,storageBindings:null},"bc5-rg-snorm":{channelType:n,vectorType:a,texelSize:16,sampleTypes:["float","unfilterable-float"],aspects:["color"],canRenderAttachment:!1,canBlend:!1,canMultisample:!1,canResolve:!1,storageBindings:null},"bc6h-rgb-ufloat":{channelType:n,vectorType:a,texelSize:16,sampleTypes:["float","unfilterable-float"],aspects:["color"],canRenderAttachment:!1,canBlend:!1,canMultisample:!1,canResolve:!1,storageBindings:null},"bc6h-rgb-float":{channelType:n,vectorType:a,texelSize:16,sampleTypes:["float","unfilterable-float"],aspects:["color"],canRenderAttachment:!1,canBlend:!1,canMultisample:!1,canResolve:!1,storageBindings:null},"bc7-rgba-unorm":{channelType:n,vectorType:a,texelSize:16,sampleTypes:["float","unfilterable-float"],aspects:["color"],canRenderAttachment:!1,canBlend:!1,canMultisample:!1,canResolve:!1,storageBindings:null},"bc7-rgba-unorm-srgb":{channelType:n,vectorType:a,texelSize:16,sampleTypes:["float","unfilterable-float"],aspects:["color"],canRenderAttachment:!1,canBlend:!1,canMultisample:!1,canResolve:!1,storageBindings:null},"etc2-rgb8unorm":{channelType:n,vectorType:a,texelSize:8,sampleTypes:["float","unfilterable-float"],aspects:["color"],canRenderAttachment:!1,canBlend:!1,canMultisample:!1,canResolve:!1,storageBindings:null},"etc2-rgb8unorm-srgb":{channelType:n,vectorType:a,texelSize:8,sampleTypes:["float","unfilterable-float"],aspects:["color"],canRenderAttachment:!1,canBlend:!1,canMultisample:!1,canResolve:!1,storageBindings:null},"etc2-rgb8a1unorm":{channelType:n,vectorType:a,texelSize:8,sampleTypes:["float","unfilterable-float"],aspects:["color"],canRenderAttachment:!1,canBlend:!1,canMultisample:!1,canResolve:!1,storageBindings:null},"etc2-rgb8a1unorm-srgb":{channelType:n,vectorType:a,texelSize:8,sampleTypes:["float","unfilterable-float"],aspects:["color"],canRenderAttachment:!1,canBlend:!1,canMultisample:!1,canResolve:!1,storageBindings:null},"etc2-rgba8unorm":{channelType:n,vectorType:a,texelSize:16,sampleTypes:["float","unfilterable-float"],aspects:["color"],canRenderAttachment:!1,canBlend:!1,canMultisample:!1,canResolve:!1,storageBindings:null},"etc2-rgba8unorm-srgb":{channelType:n,vectorType:a,texelSize:16,sampleTypes:["float","unfilterable-float"],aspects:["color"],canRenderAttachment:!1,canBlend:!1,canMultisample:!1,canResolve:!1,storageBindings:null},"eac-r11unorm":{channelType:n,vectorType:a,texelSize:8,sampleTypes:["float","unfilterable-float"],aspects:["color"],canRenderAttachment:!1,canBlend:!1,canMultisample:!1,canResolve:!1,storageBindings:null},"eac-r11snorm":{channelType:n,vectorType:a,texelSize:8,sampleTypes:["float","unfilterable-float"],aspects:["color"],canRenderAttachment:!1,canBlend:!1,canMultisample:!1,canResolve:!1,storageBindings:null},"eac-rg11unorm":{channelType:n,vectorType:a,texelSize:16,sampleTypes:["float","unfilterable-float"],aspects:["color"],canRenderAttachment:!1,canBlend:!1,canMultisample:!1,canResolve:!1,storageBindings:null},"eac-rg11snorm":{channelType:n,vectorType:a,texelSize:16,sampleTypes:["float","unfilterable-float"],aspects:["color"],canRenderAttachment:!1,canBlend:!1,canMultisample:!1,canResolve:!1,storageBindings:null},"astc-4x4-unorm":{channelType:n,vectorType:a,texelSize:16,sampleTypes:["float","unfilterable-float"],aspects:["color"],canRenderAttachment:!1,canBlend:!1,canMultisample:!1,canResolve:!1,storageBindings:null},"astc-4x4-unorm-srgb":{channelType:n,vectorType:a,texelSize:16,sampleTypes:["float","unfilterable-float"],aspects:["color"],canRenderAttachment:!1,canBlend:!1,canMultisample:!1,canResolve:!1,storageBindings:null},"astc-5x4-unorm":{channelType:n,vectorType:a,texelSize:16,sampleTypes:["float","unfilterable-float"],aspects:["color"],canRenderAttachment:!1,canBlend:!1,canMultisample:!1,canResolve:!1,storageBindings:null},"astc-5x4-unorm-srgb":{channelType:n,vectorType:a,texelSize:16,sampleTypes:["float","unfilterable-float"],aspects:["color"],canRenderAttachment:!1,canBlend:!1,canMultisample:!1,canResolve:!1,storageBindings:null},"astc-5x5-unorm":{channelType:n,vectorType:a,texelSize:16,sampleTypes:["float","unfilterable-float"],aspects:["color"],canRenderAttachment:!1,canBlend:!1,canMultisample:!1,canResolve:!1,storageBindings:null},"astc-5x5-unorm-srgb":{channelType:n,vectorType:a,texelSize:16,sampleTypes:["float","unfilterable-float"],aspects:["color"],canRenderAttachment:!1,canBlend:!1,canMultisample:!1,canResolve:!1,storageBindings:null},"astc-6x5-unorm":{channelType:n,vectorType:a,texelSize:16,sampleTypes:["float","unfilterable-float"],aspects:["color"],canRenderAttachment:!1,canBlend:!1,canMultisample:!1,canResolve:!1,storageBindings:null},"astc-6x5-unorm-srgb":{channelType:n,vectorType:a,texelSize:16,sampleTypes:["float","unfilterable-float"],aspects:["color"],canRenderAttachment:!1,canBlend:!1,canMultisample:!1,canResolve:!1,storageBindings:null},"astc-6x6-unorm":{channelType:n,vectorType:a,texelSize:16,sampleTypes:["float","unfilterable-float"],aspects:["color"],canRenderAttachment:!1,canBlend:!1,canMultisample:!1,canResolve:!1,storageBindings:null},"astc-6x6-unorm-srgb":{channelType:n,vectorType:a,texelSize:16,sampleTypes:["float","unfilterable-float"],aspects:["color"],canRenderAttachment:!1,canBlend:!1,canMultisample:!1,canResolve:!1,storageBindings:null},"astc-8x5-unorm":{channelType:n,vectorType:a,texelSize:16,sampleTypes:["float","unfilterable-float"],aspects:["color"],canRenderAttachment:!1,canBlend:!1,canMultisample:!1,canResolve:!1,storageBindings:null},"astc-8x5-unorm-srgb":{channelType:n,vectorType:a,texelSize:16,sampleTypes:["float","unfilterable-float"],aspects:["color"],canRenderAttachment:!1,canBlend:!1,canMultisample:!1,canResolve:!1,storageBindings:null},"astc-8x6-unorm":{channelType:n,vectorType:a,texelSize:16,sampleTypes:["float","unfilterable-float"],aspects:["color"],canRenderAttachment:!1,canBlend:!1,canMultisample:!1,canResolve:!1,storageBindings:null},"astc-8x6-unorm-srgb":{channelType:n,vectorType:a,texelSize:16,sampleTypes:["float","unfilterable-float"],aspects:["color"],canRenderAttachment:!1,canBlend:!1,canMultisample:!1,canResolve:!1,storageBindings:null},"astc-8x8-unorm":{channelType:n,vectorType:a,texelSize:16,sampleTypes:["float","unfilterable-float"],aspects:["color"],canRenderAttachment:!1,canBlend:!1,canMultisample:!1,canResolve:!1,storageBindings:null},"astc-8x8-unorm-srgb":{channelType:n,vectorType:a,texelSize:16,sampleTypes:["float","unfilterable-float"],aspects:["color"],canRenderAttachment:!1,canBlend:!1,canMultisample:!1,canResolve:!1,storageBindings:null},"astc-10x5-unorm":{channelType:n,vectorType:a,texelSize:16,sampleTypes:["float","unfilterable-float"],aspects:["color"],canRenderAttachment:!1,canBlend:!1,canMultisample:!1,canResolve:!1,storageBindings:null},"astc-10x5-unorm-srgb":{channelType:n,vectorType:a,texelSize:16,sampleTypes:["float","unfilterable-float"],aspects:["color"],canRenderAttachment:!1,canBlend:!1,canMultisample:!1,canResolve:!1,storageBindings:null},"astc-10x6-unorm":{channelType:n,vectorType:a,texelSize:16,sampleTypes:["float","unfilterable-float"],aspects:["color"],canRenderAttachment:!1,canBlend:!1,canMultisample:!1,canResolve:!1,storageBindings:null},"astc-10x6-unorm-srgb":{channelType:n,vectorType:a,texelSize:16,sampleTypes:["float","unfilterable-float"],aspects:["color"],canRenderAttachment:!1,canBlend:!1,canMultisample:!1,canResolve:!1,storageBindings:null},"astc-10x8-unorm":{channelType:n,vectorType:a,texelSize:16,sampleTypes:["float","unfilterable-float"],aspects:["color"],canRenderAttachment:!1,canBlend:!1,canMultisample:!1,canResolve:!1,storageBindings:null},"astc-10x8-unorm-srgb":{channelType:n,vectorType:a,texelSize:16,sampleTypes:["float","unfilterable-float"],aspects:["color"],canRenderAttachment:!1,canBlend:!1,canMultisample:!1,canResolve:!1,storageBindings:null},"astc-10x10-unorm":{channelType:n,vectorType:a,texelSize:16,sampleTypes:["float","unfilterable-float"],aspects:["color"],canRenderAttachment:!1,canBlend:!1,canMultisample:!1,canResolve:!1,storageBindings:null},"astc-10x10-unorm-srgb":{channelType:n,vectorType:a,texelSize:16,sampleTypes:["float","unfilterable-float"],aspects:["color"],canRenderAttachment:!1,canBlend:!1,canMultisample:!1,canResolve:!1,storageBindings:null},"astc-12x10-unorm":{channelType:n,vectorType:a,texelSize:16,sampleTypes:["float","unfilterable-float"],aspects:["color"],canRenderAttachment:!1,canBlend:!1,canMultisample:!1,canResolve:!1,storageBindings:null},"astc-12x10-unorm-srgb":{channelType:n,vectorType:a,texelSize:16,sampleTypes:["float","unfilterable-float"],aspects:["color"],canRenderAttachment:!1,canBlend:!1,canMultisample:!1,canResolve:!1,storageBindings:null},"astc-12x12-unorm":{channelType:n,vectorType:a,texelSize:16,sampleTypes:["float","unfilterable-float"],aspects:["color"],canRenderAttachment:!1,canBlend:!1,canMultisample:!1,canResolve:!1,storageBindings:null},"astc-12x12-unorm-srgb":{channelType:n,vectorType:a,texelSize:16,sampleTypes:["float","unfilterable-float"],aspects:["color"],canRenderAttachment:!1,canBlend:!1,canMultisample:!1,canResolve:!1,storageBindings:null}};function Oe(e,t){let s=L[e];if(!s)throw new Error(`Unknown texture format: ${e}`);let l={...s};switch(e){case"r32float":case"rg32float":case"rgba32float":t.features.has("float32-filterable")||(l={...l,sampleTypes:s.sampleTypes.filter(b=>b!=="float")}),t.features.has("float32-blendable")||(l={...l,canBlend:!1});break;case"bgra8unorm":t.features.has("bgra8unorm-storage")||(l={...l,storageBindings:null});break;case"rg11b10ufloat":t.features.has("rg11b10ufloat-renderable")||(l={...l,canRenderAttachment:!1,canBlend:!1,canMultisample:!1,canResolve:!1});break}if(l.storageBindings){let b=t.features.has("texture-formats-tier1"),G=t.features.has("texture-formats-tier2"),g=[...l.storageBindings],P=["r8unorm","r8uint","r8sint","r16uint","r16sint","r16float","rgba8unorm","rgba8uint","rgba8sint","rgba16uint","rgba16sint","rgba16float","r32uint","r32sint","r32float","rgba32uint","rgba32sint","rgba32float"],C=["r8snorm","rg8unorm","rg8snorm","rg8uint","rg8sint","rgba8snorm","r16unorm","r16snorm","rg16unorm","rg16snorm","rg16uint","rg16sint","rg16float","rgba16unorm","rgba16snorm","rgb10a2uint","rgb10a2unorm","rg11b10ufloat"];P.includes(e)&&!G&&(g=g.filter(S=>S!=="read-write")),C.includes(e)&&!b&&(g=g.filter(S=>S!=="write-only"&&S!=="read-only")),l={...l,storageBindings:g.length>0?g:null}}return l}var Pe=["f16","clip_distances","dual_source_blending","subgroups","primitive_index"],Ce={f16:"shader-f16",clip_distances:"clip-distances",dual_source_blending:"dual-source-blending",subgroups:"subgroups",primitive_index:"primitive-index"};export{L as a,Oe as b,ae as c,ne as d,ie as e,pe as f,fe as g,ue as h,Pe as i,Ce as j,Ae as k,Se as l,Me as m,ze as n,we as o,Ie as p,$e as q,Ve as r,Fe as s,Ue as t,ke as u,Ne as v,De as w,Ee as x};
|
|
2
|
+
//# sourceMappingURL=chunk-PWBIFP67.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/std/bitcast.ts","../src/std/packing.ts","../src/std/boolean.ts","../src/core/texture/textureFormats.ts","../src/wgslExtensions.ts"],"sourcesContent":["import { dualImpl } from '../core/function/dualImpl.ts';\nimport { stitch } from '../core/resolve/stitch.ts';\nimport { bitcastU32toF32Impl, bitcastU32toI32Impl } from '../data/numberOps.ts';\nimport { f32, i32, u32 } from '../data/numeric.ts';\nimport { isVec } from '../data/wgslTypes.ts';\nimport { vec2f, vec2i, vec3f, vec3i, vec4f, vec4i } from '../data/vector.ts';\nimport { VectorOps } from '../data/vectorOps.ts';\nimport type {\n v2f,\n v2i,\n v2u,\n v3f,\n v3i,\n v3u,\n v4f,\n v4i,\n v4u,\n} from '../data/wgslTypes.ts';\nimport { unify } from '../tgsl/conversion.ts';\n\nexport type BitcastU32toF32Overload =\n & ((value: number) => number)\n & ((value: v2u) => v2f)\n & ((value: v3u) => v3f)\n & ((value: v4u) => v4f);\n\nexport const bitcastU32toF32 = dualImpl({\n name: 'bitcastU32toF32',\n normalImpl: ((value) => {\n if (typeof value === 'number') {\n return bitcastU32toF32Impl(value);\n }\n return VectorOps.bitcastU32toF32[value.kind](value);\n }) as BitcastU32toF32Overload,\n codegenImpl: (n) => stitch`bitcast<f32>(${n})`,\n signature: (...arg) => {\n const uargs = unify(arg, [u32]) ?? arg;\n return {\n argTypes: uargs,\n returnType: isVec(uargs[0])\n ? uargs[0].type === 'vec2u'\n ? vec2f\n : uargs[0].type === 'vec3u'\n ? vec3f\n : vec4f\n : f32,\n };\n },\n});\n\nexport type BitcastU32toI32Overload =\n & ((value: number) => number)\n & ((value: v2u) => v2i)\n & ((value: v3u) => v3i)\n & ((value: v4u) => v4i);\n\nexport const bitcastU32toI32 = dualImpl({\n name: 'bitcastU32toI32',\n normalImpl: ((value) => {\n if (typeof value === 'number') {\n return bitcastU32toI32Impl(value);\n }\n return VectorOps.bitcastU32toI32[value.kind](value);\n }) as BitcastU32toI32Overload,\n codegenImpl: (n) => stitch`bitcast<i32>(${n})`,\n signature: (...arg) => {\n const uargs = unify(arg, [u32]) ?? arg;\n return {\n argTypes: uargs,\n returnType: isVec(uargs[0])\n ? uargs[0].type === 'vec2u'\n ? vec2i\n : uargs[0].type === 'vec3u'\n ? vec3i\n : vec4i\n : i32,\n };\n },\n});\n","import * as TB from 'typed-binary';\nimport { u32 } from '../data/numeric.ts';\nimport { vec2f, vec4f } from '../data/vector.ts';\nimport type { v2f, v4f } from '../data/wgslTypes.ts';\nimport { createDualImpl } from '../core/function/dualImpl.ts';\nimport { stitch } from '../core/resolve/stitch.ts';\nimport { snip } from '../data/snippet.ts';\n\n/**\n * @privateRemarks\n * https://gpuweb.github.io/gpuweb/wgsl/#unpack2x16float-builtin\n */\nexport const unpack2x16float = createDualImpl(\n // CPU implementation\n (e: number): v2f => {\n const buffer = new ArrayBuffer(4);\n const writer = new TB.BufferWriter(buffer);\n writer.writeUint32(e);\n const reader = new TB.BufferReader(buffer);\n return vec2f(reader.readFloat16(), reader.readFloat16());\n },\n // GPU implementation\n (e) => snip(stitch`unpack2x16float(${e})`, vec2f),\n 'unpack2x16float',\n);\n\n/**\n * @privateRemarks\n * https://gpuweb.github.io/gpuweb/wgsl/#pack2x16float-builtin\n */\nexport const pack2x16float = createDualImpl(\n // CPU implementation\n (e: v2f): number => {\n const buffer = new ArrayBuffer(4);\n const writer = new TB.BufferWriter(buffer);\n writer.writeFloat16(e.x);\n writer.writeFloat16(e.y);\n const reader = new TB.BufferReader(buffer);\n return u32(reader.readUint32());\n },\n // GPU implementation\n (e) => snip(stitch`pack2x16float(${e})`, u32),\n 'pack2x16float',\n);\n\n/**\n * @privateRemarks\n * https://gpuweb.github.io/gpuweb/wgsl/#unpack4x8unorm-builtin\n */\nexport const unpack4x8unorm = createDualImpl(\n // CPU implementation\n (e: number): v4f => {\n const buffer = new ArrayBuffer(4);\n const writer = new TB.BufferWriter(buffer);\n writer.writeUint32(e);\n const reader = new TB.BufferReader(buffer);\n return vec4f(\n reader.readUint8() / 255,\n reader.readUint8() / 255,\n reader.readUint8() / 255,\n reader.readUint8() / 255,\n );\n },\n // GPU implementation\n (e) => snip(stitch`unpack4x8unorm(${e})`, vec4f),\n 'unpack4x8unorm',\n);\n\n/**\n * @privateRemarks\n * https://gpuweb.github.io/gpuweb/wgsl/#pack4x8unorm-builtin\n */\nexport const pack4x8unorm = createDualImpl(\n // CPU implementation\n (e: v4f): number => {\n const buffer = new ArrayBuffer(4);\n const writer = new TB.BufferWriter(buffer);\n writer.writeUint8(e.x * 255);\n writer.writeUint8(e.y * 255);\n writer.writeUint8(e.z * 255);\n writer.writeUint8(e.w * 255);\n const reader = new TB.BufferReader(buffer);\n return u32(reader.readUint32());\n },\n // GPU implementation\n (e) => snip(stitch`pack4x8unorm(${e})`, u32),\n 'pack4x8unorm',\n);\n","import { dualImpl } from '../core/function/dualImpl.ts';\nimport { stitch } from '../core/resolve/stitch.ts';\nimport type { AnyData } from '../data/dataTypes.ts';\nimport { bool, f32 } from '../data/numeric.ts';\nimport { isSnippetNumeric, snip } from '../data/snippet.ts';\nimport { vec2b, vec3b, vec4b } from '../data/vector.ts';\nimport { VectorOps } from '../data/vectorOps.ts';\nimport {\n type AnyBooleanVecInstance,\n type AnyFloatVecInstance,\n type AnyNumericVecInstance,\n type AnyVec2Instance,\n type AnyVec3Instance,\n type AnyVecInstance,\n type AnyWgslData,\n isVecInstance,\n type v2b,\n type v3b,\n type v4b,\n} from '../data/wgslTypes.ts';\nimport { $internal } from '../shared/symbols.ts';\nimport { unify } from '../tgsl/conversion.ts';\nimport { sub } from './operators.ts';\n\nfunction correspondingBooleanVectorSchema(dataType: AnyData) {\n if (dataType.type.includes('2')) {\n return vec2b;\n }\n if (dataType.type.includes('3')) {\n return vec3b;\n }\n return vec4b;\n}\n\n// comparison\n\n/**\n * Checks whether `lhs == rhs` on all components.\n * Equivalent to `all(eq(lhs, rhs))`.\n * @example\n * allEq(vec2f(0.0, 1.0), vec2f(0.0, 2.0)) // returns false\n * allEq(vec3u(0, 1, 2), vec3u(0, 1, 2)) // returns true\n */\nexport const allEq = dualImpl({\n name: 'allEq',\n signature: (...argTypes) => ({ argTypes, returnType: bool }),\n normalImpl: <T extends AnyVecInstance>(lhs: T, rhs: T) =>\n cpuAll(cpuEq(lhs, rhs)),\n codegenImpl: (lhs, rhs) => stitch`all(${lhs} == ${rhs})`,\n});\n\nconst cpuEq = <T extends AnyVecInstance>(lhs: T, rhs: T) =>\n VectorOps.eq[lhs.kind](lhs, rhs);\n\n/**\n * Checks **component-wise** whether `lhs == rhs`.\n * This function does **not** return `bool`, for that use-case, wrap the result in `all`, or use `allEq`.\n * @example\n * eq(vec2f(0.0, 1.0), vec2f(0.0, 2.0)) // returns vec2b(true, false)\n * eq(vec3u(0, 1, 2), vec3u(2, 1, 0)) // returns vec3b(false, true, false)\n * all(eq(vec4i(4, 3, 2, 1), vec4i(4, 3, 2, 1))) // returns true\n * allEq(vec4i(4, 3, 2, 1), vec4i(4, 3, 2, 1)) // returns true\n */\nexport const eq = dualImpl({\n name: 'eq',\n signature: (...argTypes) => ({\n argTypes,\n returnType: correspondingBooleanVectorSchema(argTypes[0]),\n }),\n normalImpl: cpuEq,\n codegenImpl: (lhs, rhs) => stitch`(${lhs} == ${rhs})`,\n});\n\n/**\n * Checks **component-wise** whether `lhs != rhs`.\n * This function does **not** return `bool`, for that use-case, wrap the result in `any`.\n * @example\n * ne(vec2f(0.0, 1.0), vec2f(0.0, 2.0)) // returns vec2b(false, true)\n * ne(vec3u(0, 1, 2), vec3u(2, 1, 0)) // returns vec3b(true, false, true)\n * any(ne(vec4i(4, 3, 2, 1), vec4i(4, 2, 2, 1))) // returns true\n */\nexport const ne = dualImpl({\n name: 'ne',\n signature: (...argTypes) => ({\n argTypes,\n returnType: correspondingBooleanVectorSchema(argTypes[0]),\n }),\n normalImpl: <T extends AnyVecInstance>(lhs: T, rhs: T) =>\n cpuNot(cpuEq(lhs, rhs)),\n codegenImpl: (lhs, rhs) => stitch`(${lhs} != ${rhs})`,\n});\n\nconst cpuLt = <T extends AnyNumericVecInstance>(lhs: T, rhs: T) =>\n VectorOps.lt[lhs.kind](lhs, rhs);\n\n/**\n * Checks **component-wise** whether `lhs < rhs`.\n * This function does **not** return `bool`, for that use-case, wrap the result in `all`.\n * @example\n * lt(vec2f(0.0, 0.0), vec2f(0.0, 1.0)) // returns vec2b(false, true)\n * lt(vec3u(0, 1, 2), vec3u(2, 1, 0)) // returns vec3b(true, false, false)\n * all(lt(vec4i(1, 2, 3, 4), vec4i(2, 3, 4, 5))) // returns true\n */\nexport const lt = dualImpl({\n name: 'lt',\n signature: (...argTypes) => ({\n argTypes,\n returnType: correspondingBooleanVectorSchema(argTypes[0]),\n }),\n normalImpl: cpuLt,\n codegenImpl: (lhs, rhs) => stitch`(${lhs} < ${rhs})`,\n});\n\n/**\n * Checks **component-wise** whether `lhs <= rhs`.\n * This function does **not** return `bool`, for that use-case, wrap the result in `all`.\n * @example\n * le(vec2f(0.0, 0.0), vec2f(0.0, 1.0)) // returns vec2b(true, true)\n * le(vec3u(0, 1, 2), vec3u(2, 1, 0)) // returns vec3b(true, true, false)\n * all(le(vec4i(1, 2, 3, 4), vec4i(2, 3, 3, 5))) // returns true\n */\nexport const le = dualImpl({\n name: 'le',\n signature: (...argTypes) => ({\n argTypes,\n returnType: correspondingBooleanVectorSchema(argTypes[0]),\n }),\n normalImpl: <T extends AnyNumericVecInstance>(lhs: T, rhs: T) =>\n cpuOr(cpuLt(lhs, rhs), cpuEq(lhs, rhs)),\n codegenImpl: (lhs, rhs) => stitch`(${lhs} <= ${rhs})`,\n});\n\n/**\n * Checks **component-wise** whether `lhs > rhs`.\n * This function does **not** return `bool`, for that use-case, wrap the result in `all`.\n * @example\n * gt(vec2f(0.0, 0.0), vec2f(0.0, 1.0)) // returns vec2b(false, false)\n * gt(vec3u(0, 1, 2), vec3u(2, 1, 0)) // returns vec3b(false, false, true)\n * all(gt(vec4i(2, 3, 4, 5), vec4i(1, 2, 3, 4))) // returns true\n */\nexport const gt = dualImpl({\n name: 'gt',\n signature: (...argTypes) => ({\n argTypes,\n returnType: correspondingBooleanVectorSchema(argTypes[0]),\n }),\n normalImpl: <T extends AnyNumericVecInstance>(lhs: T, rhs: T) =>\n cpuAnd(cpuNot(cpuLt(lhs, rhs)), cpuNot(cpuEq(lhs, rhs))),\n codegenImpl: (lhs, rhs) => stitch`(${lhs} > ${rhs})`,\n});\n\n/**\n * Checks **component-wise** whether `lhs >= rhs`.\n * This function does **not** return `bool`, for that use-case, wrap the result in `all`.\n * @example\n * ge(vec2f(0.0, 0.0), vec2f(0.0, 1.0)) // returns vec2b(true, false)\n * ge(vec3u(0, 1, 2), vec3u(2, 1, 0)) // returns vec3b(false, true, true)\n * all(ge(vec4i(2, 2, 4, 5), vec4i(1, 2, 3, 4))) // returns true\n */\nexport const ge = dualImpl({\n name: 'ge',\n signature: (...argTypes) => ({\n argTypes: argTypes,\n returnType: correspondingBooleanVectorSchema(argTypes[0]),\n }),\n normalImpl: <T extends AnyNumericVecInstance>(lhs: T, rhs: T) =>\n cpuNot(cpuLt(lhs, rhs)),\n codegenImpl: (lhs, rhs) => stitch`(${lhs} >= ${rhs})`,\n});\n\n// logical ops\n\nconst cpuNot = <T extends AnyBooleanVecInstance>(value: T): T =>\n VectorOps.neg[value.kind](value);\n\n/**\n * Returns **component-wise** `!value`.\n * @example\n * not(vec2b(false, true)) // returns vec2b(true, false)\n * not(vec3b(true, true, false)) // returns vec3b(false, false, true)\n */\nexport const not = dualImpl({\n name: 'not',\n signature: (...argTypes) => ({ argTypes, returnType: argTypes[0] }),\n normalImpl: cpuNot,\n codegenImpl: (arg) => stitch`!(${arg})`,\n});\n\nconst cpuOr = <T extends AnyBooleanVecInstance>(lhs: T, rhs: T) =>\n VectorOps.or[lhs.kind](lhs, rhs);\n\n/**\n * Returns **component-wise** logical `or` result.\n * @example\n * or(vec2b(false, true), vec2b(false, false)) // returns vec2b(false, true)\n * or(vec3b(true, true, false), vec3b(false, true, false)) // returns vec3b(true, true, false)\n */\nexport const or = dualImpl({\n name: 'or',\n signature: (...argTypes) => ({ argTypes, returnType: argTypes[0] }),\n normalImpl: cpuOr,\n codegenImpl: (lhs, rhs) => stitch`(${lhs} | ${rhs})`,\n});\n\nconst cpuAnd = <T extends AnyBooleanVecInstance>(lhs: T, rhs: T) =>\n cpuNot(cpuOr(cpuNot(lhs), cpuNot(rhs)));\n\n/**\n * Returns **component-wise** logical `and` result.\n * @example\n * and(vec2b(false, true), vec2b(true, true)) // returns vec2b(false, true)\n * and(vec3b(true, true, false), vec3b(false, true, false)) // returns vec3b(false, true, false)\n */\nexport const and = dualImpl({\n name: 'and',\n signature: (...argTypes) => ({ argTypes, returnType: argTypes[0] }),\n normalImpl: cpuAnd,\n codegenImpl: (lhs, rhs) => stitch`(${lhs} & ${rhs})`,\n});\n\n// logical aggregation\n\nconst cpuAll = (value: AnyBooleanVecInstance) =>\n VectorOps.all[value.kind](value);\n\n/**\n * Returns `true` if each component of `value` is true.\n * @example\n * all(vec2b(false, true)) // returns false\n * all(vec3b(true, true, true)) // returns true\n */\nexport const all = dualImpl({\n name: 'all',\n signature: (...argTypes) => ({ argTypes, returnType: bool }),\n normalImpl: cpuAll,\n codegenImpl: (value) => stitch`all(${value})`,\n});\n\n/**\n * Returns `true` if any component of `value` is true.\n * @example\n * any(vec2b(false, true)) // returns true\n * any(vec3b(false, false, false)) // returns false\n */\nexport const any = dualImpl({\n name: 'any',\n signature: (...argTypes) => ({ argTypes, returnType: bool }),\n normalImpl: (value: AnyBooleanVecInstance) => !cpuAll(cpuNot(value)),\n codegenImpl: (arg) => stitch`any(${arg})`,\n});\n\n// other\n\n/**\n * Checks whether the given elements differ by at most the `precision` value.\n * Checks all elements of `lhs` and `rhs` if arguments are vectors.\n * @example\n * isCloseTo(0, 0.1) // returns false\n * isCloseTo(vec3f(0, 0, 0), vec3f(0.002, -0.009, 0)) // returns true\n *\n * @param {number} precision argument that specifies the maximum allowed difference, 0.01 by default.\n */\nexport const isCloseTo = dualImpl({\n name: 'isCloseTo',\n signature: (...args) => ({\n argTypes: args as AnyWgslData[],\n returnType: bool,\n }),\n // CPU implementation\n normalImpl: <T extends AnyFloatVecInstance | number>(\n lhs: T,\n rhs: T,\n precision = 0.01,\n ): boolean => {\n if (typeof lhs === 'number' && typeof rhs === 'number') {\n return Math.abs(lhs - rhs) < precision;\n }\n if (isVecInstance(lhs) && isVecInstance(rhs)) {\n return VectorOps.isCloseToZero[lhs.kind](\n sub[$internal].jsImpl(lhs, rhs),\n precision,\n );\n }\n return false;\n },\n // GPU implementation\n codegenImpl: (lhs, rhs, precision = snip(0.01, f32)) => {\n if (isSnippetNumeric(lhs) && isSnippetNumeric(rhs)) {\n return stitch`(abs(f32(${lhs}) - f32(${rhs})) <= ${precision})`;\n }\n if (!isSnippetNumeric(lhs) && !isSnippetNumeric(rhs)) {\n // https://www.w3.org/TR/WGSL/#vector-multi-component:~:text=Binary%20arithmetic%20expressions%20with%20mixed%20scalar%20and%20vector%20operands\n // (a-a)+prec creates a vector of a.length elements, all equal to prec\n return stitch`all(abs(${lhs} - ${rhs}) <= (${lhs} - ${lhs}) + ${precision})`;\n }\n return 'false';\n },\n});\n\nfunction cpuSelect(f: boolean, t: boolean, cond: boolean): boolean;\nfunction cpuSelect(f: number, t: number, cond: boolean): number;\nfunction cpuSelect<T extends AnyVecInstance>(\n f: T,\n t: T,\n cond:\n | boolean\n | (T extends AnyVec2Instance ? v2b\n : T extends AnyVec3Instance ? v3b\n : v4b),\n): T;\nfunction cpuSelect<T extends number | boolean | AnyVecInstance>(\n f: T,\n t: T,\n cond: AnyBooleanVecInstance | boolean,\n) {\n if (typeof cond === 'boolean') {\n return cond ? t : f;\n }\n return VectorOps.select[(f as AnyVecInstance).kind](\n f as AnyVecInstance,\n t as AnyVecInstance,\n cond,\n );\n}\n\n/**\n * Returns `t` if `cond` is `true`, and `f` otherwise.\n * Component-wise if `cond` is a vector.\n * @example\n * select(1, 2, false) // returns 1\n * select(1, 2, true) // returns 2\n * select(vec2i(1, 2), vec2i(3, 4), true) // returns vec2i(3, 4)\n * select(vec2i(1, 2), vec2i(3, 4), vec2b(false, true)) // returns vec2i(1, 4)\n */\nexport const select = dualImpl({\n name: 'select',\n signature: (f, t, cond) => {\n const [uf, ut] = unify([f, t]) ?? [f, t] as const;\n return ({ argTypes: [uf, ut, cond], returnType: uf });\n },\n normalImpl: cpuSelect,\n codegenImpl: (f, t, cond) => stitch`select(${f}, ${t}, ${cond})`,\n});\n","import { f32, i32, u32 } from '../../data/numeric.ts';\nimport { vec4f, vec4i, vec4u } from '../../data/vector.ts';\nimport type { F32, I32, U32 } from '../../data/wgslTypes.ts';\n\nexport type ViewDimensionToDimension = {\n '1d': '1d';\n '2d': '2d';\n '2d-array': '2d';\n '3d': '3d';\n cube: '2d';\n 'cube-array': '2d';\n};\n\n/**\n * https://www.w3.org/TR/WGSL/#storage-texel-formats\n */\nexport type StorageTextureFormats =\n | 'rgba8unorm'\n | 'rgba8snorm'\n | 'rgba8uint'\n | 'rgba8sint'\n | 'rgba16unorm'\n | 'rgba16snorm'\n | 'rgba16uint'\n | 'rgba16sint'\n | 'rgba16float'\n | 'rg8unorm'\n | 'rg8snorm'\n | 'rg8uint'\n | 'rg8sint'\n | 'rg16unorm'\n | 'rg16snorm'\n | 'rg16uint'\n | 'rg16sint'\n | 'rg16float'\n | 'r32uint'\n | 'r32sint'\n | 'r32float'\n | 'rg32uint'\n | 'rg32sint'\n | 'rg32float'\n | 'rgba32uint'\n | 'rgba32sint'\n | 'rgba32float'\n | 'bgra8unorm'\n | 'r8unorm'\n | 'r8snorm'\n | 'r8uint'\n | 'r8sint'\n | 'r16unorm'\n | 'r16snorm'\n | 'r16uint'\n | 'r16sint'\n | 'r16float'\n | 'rgb10a2unorm'\n | 'rgb10a2uint'\n | 'rg11b10ufloat';\n\n// TODO: use this for texture view validation\n// deno-fmt-ignore - this is not really meant to be read\nexport const textureFormats = {\n // 8-bit formats\n 'r8unorm': { channelType: f32, vectorType: vec4f, texelSize: 1, sampleTypes: ['float', 'unfilterable-float'], aspects: ['color'], canRenderAttachment: true, canBlend: true, canMultisample: true, canResolve: true, storageBindings: ['write-only', 'read-only', 'read-write'] },\n 'r8snorm': { channelType: f32, vectorType: vec4f, texelSize: 1, sampleTypes: ['float', 'unfilterable-float'], aspects: ['color'], canRenderAttachment: false, canBlend: false, canMultisample: false, canResolve: false, storageBindings: ['write-only', 'read-only'] },\n 'r8uint': { channelType: u32, vectorType: vec4u, texelSize: 1, sampleTypes: ['uint'], aspects: ['color'], canRenderAttachment: true, canBlend: false, canMultisample: true, canResolve: false, storageBindings: ['write-only', 'read-only', 'read-write'] },\n 'r8sint': { channelType: i32, vectorType: vec4i, texelSize: 1, sampleTypes: ['sint'], aspects: ['color'], canRenderAttachment: true, canBlend: false, canMultisample: true, canResolve: false, storageBindings: ['write-only', 'read-only', 'read-write'] },\n\n 'rg8unorm': { channelType: f32, vectorType: vec4f, texelSize: 2, sampleTypes: ['float', 'unfilterable-float'], aspects: ['color'], canRenderAttachment: true, canBlend: true, canMultisample: true, canResolve: true, storageBindings: ['write-only', 'read-only'] },\n 'rg8snorm': { channelType: f32, vectorType: vec4f, texelSize: 2, sampleTypes: ['float', 'unfilterable-float'], aspects: ['color'], canRenderAttachment: false, canBlend: false, canMultisample: false, canResolve: false, storageBindings: ['write-only', 'read-only'] },\n 'rg8uint': { channelType: u32, vectorType: vec4u, texelSize: 2, sampleTypes: ['uint'], aspects: ['color'], canRenderAttachment: true, canBlend: false, canMultisample: true, canResolve: false, storageBindings: ['write-only', 'read-only'] },\n 'rg8sint': { channelType: i32, vectorType: vec4i, texelSize: 2, sampleTypes: ['sint'], aspects: ['color'], canRenderAttachment: true, canBlend: false, canMultisample: true, canResolve: false, storageBindings: ['write-only', 'read-only'] },\n\n 'rgba8unorm': { channelType: f32, vectorType: vec4f, texelSize: 4, sampleTypes: ['float', 'unfilterable-float'], aspects: ['color'], canRenderAttachment: true, canBlend: true, canMultisample: true, canResolve: true, storageBindings: ['write-only', 'read-only', 'read-write'] },\n 'rgba8unorm-srgb': { channelType: f32, vectorType: vec4f, texelSize: 4, sampleTypes: ['float', 'unfilterable-float'], aspects: ['color'], canRenderAttachment: true, canBlend: true, canMultisample: true, canResolve: true, storageBindings: null },\n 'rgba8snorm': { channelType: f32, vectorType: vec4f, texelSize: 4, sampleTypes: ['float', 'unfilterable-float'], aspects: ['color'], canRenderAttachment: true, canBlend: false, canMultisample: true, canResolve: false, storageBindings: ['write-only', 'read-only'] },\n 'rgba8uint': { channelType: u32, vectorType: vec4u, texelSize: 4, sampleTypes: ['uint'], aspects: ['color'], canRenderAttachment: true, canBlend: false, canMultisample: true, canResolve: false, storageBindings: ['write-only', 'read-only', 'read-write'] },\n 'rgba8sint': { channelType: i32, vectorType: vec4i, texelSize: 4, sampleTypes: ['sint'], aspects: ['color'], canRenderAttachment: true, canBlend: false, canMultisample: true, canResolve: false, storageBindings: ['write-only', 'read-only', 'read-write'] },\n\n 'bgra8unorm': { channelType: f32, vectorType: vec4f, texelSize: 4, sampleTypes: ['float', 'unfilterable-float'], aspects: ['color'], canRenderAttachment: true, canBlend: true, canMultisample: true, canResolve: true, storageBindings: ['write-only'] },\n 'bgra8unorm-srgb': { channelType: f32, vectorType: vec4f, texelSize: 4, sampleTypes: ['float', 'unfilterable-float'], aspects: ['color'], canRenderAttachment: true, canBlend: true, canMultisample: true, canResolve: true, storageBindings: null },\n\n // 16-bit formats\n 'r16unorm': { channelType: f32, vectorType: vec4f, texelSize: 2, sampleTypes: ['unfilterable-float'], aspects: ['color'], canRenderAttachment: true, canBlend: true, canMultisample: true, canResolve: false, storageBindings: ['write-only', 'read-only'] },\n 'r16snorm': { channelType: f32, vectorType: vec4f, texelSize: 2, sampleTypes: ['unfilterable-float'], aspects: ['color'], canRenderAttachment: true, canBlend: true, canMultisample: true, canResolve: false, storageBindings: ['write-only', 'read-only'] },\n 'r16uint': { channelType: u32, vectorType: vec4u, texelSize: 2, sampleTypes: ['uint'], aspects: ['color'], canRenderAttachment: true, canBlend: false, canMultisample: true, canResolve: false, storageBindings: ['write-only', 'read-only', 'read-write'] },\n 'r16sint': { channelType: i32, vectorType: vec4i, texelSize: 2, sampleTypes: ['sint'], aspects: ['color'], canRenderAttachment: true, canBlend: false, canMultisample: true, canResolve: false, storageBindings: ['write-only', 'read-only', 'read-write'] },\n 'r16float': { channelType: f32, vectorType: vec4f, texelSize: 2, sampleTypes: ['float', 'unfilterable-float'], aspects: ['color'], canRenderAttachment: true, canBlend: true, canMultisample: true, canResolve: true, storageBindings: ['write-only', 'read-only', 'read-write'] },\n\n 'rg16unorm': { channelType: f32, vectorType: vec4f, texelSize: 4, sampleTypes: ['unfilterable-float'], aspects: ['color'], canRenderAttachment: true, canBlend: true, canMultisample: true, canResolve: false, storageBindings: ['write-only', 'read-only'] },\n 'rg16snorm': { channelType: f32, vectorType: vec4f, texelSize: 4, sampleTypes: ['unfilterable-float'], aspects: ['color'], canRenderAttachment: true, canBlend: true, canMultisample: true, canResolve: false, storageBindings: ['write-only', 'read-only'] },\n 'rg16uint': { channelType: u32, vectorType: vec4u, texelSize: 4, sampleTypes: ['uint'], aspects: ['color'], canRenderAttachment: true, canBlend: false, canMultisample: true, canResolve: false, storageBindings: ['write-only', 'read-only'] },\n 'rg16sint': { channelType: i32, vectorType: vec4i, texelSize: 4, sampleTypes: ['sint'], aspects: ['color'], canRenderAttachment: true, canBlend: false, canMultisample: true, canResolve: false, storageBindings: ['write-only', 'read-only'] },\n 'rg16float': { channelType: f32, vectorType: vec4f, texelSize: 4, sampleTypes: ['float', 'unfilterable-float'], aspects: ['color'], canRenderAttachment: true, canBlend: true, canMultisample: true, canResolve: true, storageBindings: ['write-only', 'read-only'] },\n\n 'rgba16unorm': { channelType: f32, vectorType: vec4f, texelSize: 8, sampleTypes: ['unfilterable-float'], aspects: ['color'], canRenderAttachment: true, canBlend: true, canMultisample: true, canResolve: false, storageBindings: ['write-only', 'read-only'] },\n 'rgba16snorm': { channelType: f32, vectorType: vec4f, texelSize: 8, sampleTypes: ['unfilterable-float'], aspects: ['color'], canRenderAttachment: true, canBlend: true, canMultisample: true, canResolve: false, storageBindings: ['write-only', 'read-only'] },\n 'rgba16uint': { channelType: u32, vectorType: vec4u, texelSize: 8, sampleTypes: ['uint'], aspects: ['color'], canRenderAttachment: true, canBlend: false, canMultisample: true, canResolve: false, storageBindings: ['write-only', 'read-only', 'read-write'] },\n 'rgba16sint': { channelType: i32, vectorType: vec4i, texelSize: 8, sampleTypes: ['sint'], aspects: ['color'], canRenderAttachment: true, canBlend: false, canMultisample: true, canResolve: false, storageBindings: ['write-only', 'read-only', 'read-write'] },\n 'rgba16float': { channelType: f32, vectorType: vec4f, texelSize: 8, sampleTypes: ['float', 'unfilterable-float'], aspects: ['color'], canRenderAttachment: true, canBlend: true, canMultisample: true, canResolve: true, storageBindings: ['write-only', 'read-only', 'read-write'] },\n\n // 32-bit formats\n 'r32uint': { channelType: u32, vectorType: vec4u, texelSize: 4, sampleTypes: ['uint'], aspects: ['color'], canRenderAttachment: true, canBlend: false, canMultisample: false, canResolve: false, storageBindings: ['write-only', 'read-only', 'read-write'] },\n 'r32sint': { channelType: i32, vectorType: vec4i, texelSize: 4, sampleTypes: ['sint'], aspects: ['color'], canRenderAttachment: true, canBlend: false, canMultisample: false, canResolve: false, storageBindings: ['write-only', 'read-only', 'read-write'] },\n 'r32float': { channelType: f32, vectorType: vec4f, texelSize: 4, sampleTypes: ['float', 'unfilterable-float'], aspects: ['color'], canRenderAttachment: true, canBlend: true, canMultisample: true, canResolve: false, storageBindings: ['write-only', 'read-only', 'read-write'] },\n\n 'rg32uint': { channelType: u32, vectorType: vec4u, texelSize: 8, sampleTypes: ['uint'], aspects: ['color'], canRenderAttachment: true, canBlend: false, canMultisample: false, canResolve: false, storageBindings: ['write-only', 'read-only'] },\n 'rg32sint': { channelType: i32, vectorType: vec4i, texelSize: 8, sampleTypes: ['sint'], aspects: ['color'], canRenderAttachment: true, canBlend: false, canMultisample: false, canResolve: false, storageBindings: ['write-only', 'read-only'] },\n 'rg32float': { channelType: f32, vectorType: vec4f, texelSize: 8, sampleTypes: ['float', 'unfilterable-float'], aspects: ['color'], canRenderAttachment: true, canBlend: true, canMultisample: false, canResolve: false, storageBindings: ['write-only', 'read-only', 'read-write'] },\n\n 'rgba32uint': { channelType: u32, vectorType: vec4u, texelSize: 16, sampleTypes: ['uint'], aspects: ['color'], canRenderAttachment: true, canBlend: false, canMultisample: false, canResolve: false, storageBindings: ['write-only', 'read-only', 'read-write'] },\n 'rgba32sint': { channelType: i32, vectorType: vec4i, texelSize: 16, sampleTypes: ['sint'], aspects: ['color'], canRenderAttachment: true, canBlend: false, canMultisample: false, canResolve: false, storageBindings: ['write-only', 'read-only', 'read-write'] },\n 'rgba32float': { channelType: f32, vectorType: vec4f, texelSize: 16, sampleTypes: ['float', 'unfilterable-float'], aspects: ['color'], canRenderAttachment: true, canBlend: true, canMultisample: false, canResolve: false, storageBindings: ['write-only', 'read-only', 'read-write'] },\n\n // Mixed component formats\n 'rgb10a2uint': { channelType: u32, vectorType: vec4u, texelSize: 4, sampleTypes: ['uint'], aspects: ['color'], canRenderAttachment: true, canBlend: false, canMultisample: true, canResolve: false, storageBindings: ['write-only', 'read-only'] },\n 'rgb10a2unorm': { channelType: f32, vectorType: vec4f, texelSize: 4, sampleTypes: ['float', 'unfilterable-float'], aspects: ['color'], canRenderAttachment: true, canBlend: true, canMultisample: true, canResolve: true, storageBindings: ['write-only', 'read-only'] },\n 'rg11b10ufloat': { channelType: f32, vectorType: vec4f, texelSize: 4, sampleTypes: ['float', 'unfilterable-float'], aspects: ['color'], canRenderAttachment: true, canBlend: true, canMultisample: true, canResolve: true, storageBindings: ['write-only', 'read-only'] },\n\n // Special formats\n 'rgb9e5ufloat': { channelType: f32, vectorType: vec4f, texelSize: 4, sampleTypes: ['float', 'unfilterable-float'], aspects: ['color'], canRenderAttachment: false, canBlend: false, canMultisample: false, canResolve: false, storageBindings: null },\n\n // Depth/Stencil formats\n 'stencil8': { channelType: u32, vectorType: vec4u, texelSize: 1, sampleTypes: ['uint'], aspects: ['stencil'], canRenderAttachment: true, canBlend: false, canMultisample: true, canResolve: false, storageBindings: null },\n 'depth16unorm': { channelType: f32, vectorType: vec4f, texelSize: 2, sampleTypes: ['depth', 'unfilterable-float'], aspects: ['depth'], canRenderAttachment: true, canBlend: false, canMultisample: true, canResolve: false, storageBindings: null },\n 'depth24plus': { channelType: f32, vectorType: vec4f, texelSize: 4, sampleTypes: ['depth', 'unfilterable-float'], aspects: ['depth'], canRenderAttachment: true, canBlend: false, canMultisample: true, canResolve: false, storageBindings: null },\n 'depth24plus-stencil8': { channelType: f32, vectorType: vec4f, texelSize: 4, sampleTypes: ['depth', 'unfilterable-float'], aspects: ['depth', 'stencil'], canRenderAttachment: true, canBlend: false, canMultisample: true, canResolve: false, storageBindings: null },\n 'depth32float': { channelType: f32, vectorType: vec4f, texelSize: 4, sampleTypes: ['depth', 'unfilterable-float'], aspects: ['depth'], canRenderAttachment: true, canBlend: false, canMultisample: true, canResolve: false, storageBindings: null },\n 'depth32float-stencil8': { channelType: f32, vectorType: vec4f, texelSize: 4, sampleTypes: ['depth', 'unfilterable-float'], aspects: ['depth', 'stencil'], canRenderAttachment: true, canBlend: false, canMultisample: true, canResolve: false, storageBindings: null },\n\n // BC compressed formats\n 'bc1-rgba-unorm': { channelType: f32, vectorType: vec4f, texelSize: 8, sampleTypes: ['float', 'unfilterable-float'], aspects: ['color'], canRenderAttachment: false, canBlend: false, canMultisample: false, canResolve: false, storageBindings: null },\n 'bc1-rgba-unorm-srgb': { channelType: f32, vectorType: vec4f, texelSize: 8, sampleTypes: ['float', 'unfilterable-float'], aspects: ['color'], canRenderAttachment: false, canBlend: false, canMultisample: false, canResolve: false, storageBindings: null },\n 'bc2-rgba-unorm': { channelType: f32, vectorType: vec4f, texelSize: 16, sampleTypes: ['float', 'unfilterable-float'], aspects: ['color'], canRenderAttachment: false, canBlend: false, canMultisample: false, canResolve: false, storageBindings: null },\n 'bc2-rgba-unorm-srgb': { channelType: f32, vectorType: vec4f, texelSize: 16, sampleTypes: ['float', 'unfilterable-float'], aspects: ['color'], canRenderAttachment: false, canBlend: false, canMultisample: false, canResolve: false, storageBindings: null },\n 'bc3-rgba-unorm': { channelType: f32, vectorType: vec4f, texelSize: 16, sampleTypes: ['float', 'unfilterable-float'], aspects: ['color'], canRenderAttachment: false, canBlend: false, canMultisample: false, canResolve: false, storageBindings: null },\n 'bc3-rgba-unorm-srgb': { channelType: f32, vectorType: vec4f, texelSize: 16, sampleTypes: ['float', 'unfilterable-float'], aspects: ['color'], canRenderAttachment: false, canBlend: false, canMultisample: false, canResolve: false, storageBindings: null },\n 'bc4-r-unorm': { channelType: f32, vectorType: vec4f, texelSize: 8, sampleTypes: ['float', 'unfilterable-float'], aspects: ['color'], canRenderAttachment: false, canBlend: false, canMultisample: false, canResolve: false, storageBindings: null },\n 'bc4-r-snorm': { channelType: f32, vectorType: vec4f, texelSize: 8, sampleTypes: ['float', 'unfilterable-float'], aspects: ['color'], canRenderAttachment: false, canBlend: false, canMultisample: false, canResolve: false, storageBindings: null },\n 'bc5-rg-unorm': { channelType: f32, vectorType: vec4f, texelSize: 16, sampleTypes: ['float', 'unfilterable-float'], aspects: ['color'], canRenderAttachment: false, canBlend: false, canMultisample: false, canResolve: false, storageBindings: null },\n 'bc5-rg-snorm': { channelType: f32, vectorType: vec4f, texelSize: 16, sampleTypes: ['float', 'unfilterable-float'], aspects: ['color'], canRenderAttachment: false, canBlend: false, canMultisample: false, canResolve: false, storageBindings: null },\n 'bc6h-rgb-ufloat': { channelType: f32, vectorType: vec4f, texelSize: 16, sampleTypes: ['float', 'unfilterable-float'], aspects: ['color'], canRenderAttachment: false, canBlend: false, canMultisample: false, canResolve: false, storageBindings: null },\n 'bc6h-rgb-float': { channelType: f32, vectorType: vec4f, texelSize: 16, sampleTypes: ['float', 'unfilterable-float'], aspects: ['color'], canRenderAttachment: false, canBlend: false, canMultisample: false, canResolve: false, storageBindings: null },\n 'bc7-rgba-unorm': { channelType: f32, vectorType: vec4f, texelSize: 16, sampleTypes: ['float', 'unfilterable-float'], aspects: ['color'], canRenderAttachment: false, canBlend: false, canMultisample: false, canResolve: false, storageBindings: null },\n 'bc7-rgba-unorm-srgb': { channelType: f32, vectorType: vec4f, texelSize: 16, sampleTypes: ['float', 'unfilterable-float'], aspects: ['color'], canRenderAttachment: false, canBlend: false, canMultisample: false, canResolve: false, storageBindings: null },\n\n // ETC2/EAC compressed formats\n 'etc2-rgb8unorm': { channelType: f32, vectorType: vec4f, texelSize: 8, sampleTypes: ['float', 'unfilterable-float'], aspects: ['color'], canRenderAttachment: false, canBlend: false, canMultisample: false, canResolve: false, storageBindings: null },\n 'etc2-rgb8unorm-srgb': { channelType: f32, vectorType: vec4f, texelSize: 8, sampleTypes: ['float', 'unfilterable-float'], aspects: ['color'], canRenderAttachment: false, canBlend: false, canMultisample: false, canResolve: false, storageBindings: null },\n 'etc2-rgb8a1unorm': { channelType: f32, vectorType: vec4f, texelSize: 8, sampleTypes: ['float', 'unfilterable-float'], aspects: ['color'], canRenderAttachment: false, canBlend: false, canMultisample: false, canResolve: false, storageBindings: null },\n 'etc2-rgb8a1unorm-srgb': { channelType: f32, vectorType: vec4f, texelSize: 8, sampleTypes: ['float', 'unfilterable-float'], aspects: ['color'], canRenderAttachment: false, canBlend: false, canMultisample: false, canResolve: false, storageBindings: null },\n 'etc2-rgba8unorm': { channelType: f32, vectorType: vec4f, texelSize: 16, sampleTypes: ['float', 'unfilterable-float'], aspects: ['color'], canRenderAttachment: false, canBlend: false, canMultisample: false, canResolve: false, storageBindings: null },\n 'etc2-rgba8unorm-srgb': { channelType: f32, vectorType: vec4f, texelSize: 16, sampleTypes: ['float', 'unfilterable-float'], aspects: ['color'], canRenderAttachment: false, canBlend: false, canMultisample: false, canResolve: false, storageBindings: null },\n 'eac-r11unorm': { channelType: f32, vectorType: vec4f, texelSize: 8, sampleTypes: ['float', 'unfilterable-float'], aspects: ['color'], canRenderAttachment: false, canBlend: false, canMultisample: false, canResolve: false, storageBindings: null },\n 'eac-r11snorm': { channelType: f32, vectorType: vec4f, texelSize: 8, sampleTypes: ['float', 'unfilterable-float'], aspects: ['color'], canRenderAttachment: false, canBlend: false, canMultisample: false, canResolve: false, storageBindings: null },\n 'eac-rg11unorm': { channelType: f32, vectorType: vec4f, texelSize: 16, sampleTypes: ['float', 'unfilterable-float'], aspects: ['color'], canRenderAttachment: false, canBlend: false, canMultisample: false, canResolve: false, storageBindings: null },\n 'eac-rg11snorm': { channelType: f32, vectorType: vec4f, texelSize: 16, sampleTypes: ['float', 'unfilterable-float'], aspects: ['color'], canRenderAttachment: false, canBlend: false, canMultisample: false, canResolve: false, storageBindings: null },\n\n // ASTC compressed formats\n 'astc-4x4-unorm': { channelType: f32, vectorType: vec4f, texelSize: 16, sampleTypes: ['float', 'unfilterable-float'], aspects: ['color'], canRenderAttachment: false, canBlend: false, canMultisample: false, canResolve: false, storageBindings: null },\n 'astc-4x4-unorm-srgb': { channelType: f32, vectorType: vec4f, texelSize: 16, sampleTypes: ['float', 'unfilterable-float'], aspects: ['color'], canRenderAttachment: false, canBlend: false, canMultisample: false, canResolve: false, storageBindings: null },\n 'astc-5x4-unorm': { channelType: f32, vectorType: vec4f, texelSize: 16, sampleTypes: ['float', 'unfilterable-float'], aspects: ['color'], canRenderAttachment: false, canBlend: false, canMultisample: false, canResolve: false, storageBindings: null },\n 'astc-5x4-unorm-srgb': { channelType: f32, vectorType: vec4f, texelSize: 16, sampleTypes: ['float', 'unfilterable-float'], aspects: ['color'], canRenderAttachment: false, canBlend: false, canMultisample: false, canResolve: false, storageBindings: null },\n 'astc-5x5-unorm': { channelType: f32, vectorType: vec4f, texelSize: 16, sampleTypes: ['float', 'unfilterable-float'], aspects: ['color'], canRenderAttachment: false, canBlend: false, canMultisample: false, canResolve: false, storageBindings: null },\n 'astc-5x5-unorm-srgb': { channelType: f32, vectorType: vec4f, texelSize: 16, sampleTypes: ['float', 'unfilterable-float'], aspects: ['color'], canRenderAttachment: false, canBlend: false, canMultisample: false, canResolve: false, storageBindings: null },\n 'astc-6x5-unorm': { channelType: f32, vectorType: vec4f, texelSize: 16, sampleTypes: ['float', 'unfilterable-float'], aspects: ['color'], canRenderAttachment: false, canBlend: false, canMultisample: false, canResolve: false, storageBindings: null },\n 'astc-6x5-unorm-srgb': { channelType: f32, vectorType: vec4f, texelSize: 16, sampleTypes: ['float', 'unfilterable-float'], aspects: ['color'], canRenderAttachment: false, canBlend: false, canMultisample: false, canResolve: false, storageBindings: null },\n 'astc-6x6-unorm': { channelType: f32, vectorType: vec4f, texelSize: 16, sampleTypes: ['float', 'unfilterable-float'], aspects: ['color'], canRenderAttachment: false, canBlend: false, canMultisample: false, canResolve: false, storageBindings: null },\n 'astc-6x6-unorm-srgb': { channelType: f32, vectorType: vec4f, texelSize: 16, sampleTypes: ['float', 'unfilterable-float'], aspects: ['color'], canRenderAttachment: false, canBlend: false, canMultisample: false, canResolve: false, storageBindings: null },\n 'astc-8x5-unorm': { channelType: f32, vectorType: vec4f, texelSize: 16, sampleTypes: ['float', 'unfilterable-float'], aspects: ['color'], canRenderAttachment: false, canBlend: false, canMultisample: false, canResolve: false, storageBindings: null },\n 'astc-8x5-unorm-srgb': { channelType: f32, vectorType: vec4f, texelSize: 16, sampleTypes: ['float', 'unfilterable-float'], aspects: ['color'], canRenderAttachment: false, canBlend: false, canMultisample: false, canResolve: false, storageBindings: null },\n 'astc-8x6-unorm': { channelType: f32, vectorType: vec4f, texelSize: 16, sampleTypes: ['float', 'unfilterable-float'], aspects: ['color'], canRenderAttachment: false, canBlend: false, canMultisample: false, canResolve: false, storageBindings: null },\n 'astc-8x6-unorm-srgb': { channelType: f32, vectorType: vec4f, texelSize: 16, sampleTypes: ['float', 'unfilterable-float'], aspects: ['color'], canRenderAttachment: false, canBlend: false, canMultisample: false, canResolve: false, storageBindings: null },\n 'astc-8x8-unorm': { channelType: f32, vectorType: vec4f, texelSize: 16, sampleTypes: ['float', 'unfilterable-float'], aspects: ['color'], canRenderAttachment: false, canBlend: false, canMultisample: false, canResolve: false, storageBindings: null },\n 'astc-8x8-unorm-srgb': { channelType: f32, vectorType: vec4f, texelSize: 16, sampleTypes: ['float', 'unfilterable-float'], aspects: ['color'], canRenderAttachment: false, canBlend: false, canMultisample: false, canResolve: false, storageBindings: null },\n 'astc-10x5-unorm': { channelType: f32, vectorType: vec4f, texelSize: 16, sampleTypes: ['float', 'unfilterable-float'], aspects: ['color'], canRenderAttachment: false, canBlend: false, canMultisample: false, canResolve: false, storageBindings: null },\n 'astc-10x5-unorm-srgb': { channelType: f32, vectorType: vec4f, texelSize: 16, sampleTypes: ['float', 'unfilterable-float'], aspects: ['color'], canRenderAttachment: false, canBlend: false, canMultisample: false, canResolve: false, storageBindings: null },\n 'astc-10x6-unorm': { channelType: f32, vectorType: vec4f, texelSize: 16, sampleTypes: ['float', 'unfilterable-float'], aspects: ['color'], canRenderAttachment: false, canBlend: false, canMultisample: false, canResolve: false, storageBindings: null },\n 'astc-10x6-unorm-srgb': { channelType: f32, vectorType: vec4f, texelSize: 16, sampleTypes: ['float', 'unfilterable-float'], aspects: ['color'], canRenderAttachment: false, canBlend: false, canMultisample: false, canResolve: false, storageBindings: null },\n 'astc-10x8-unorm': { channelType: f32, vectorType: vec4f, texelSize: 16, sampleTypes: ['float', 'unfilterable-float'], aspects: ['color'], canRenderAttachment: false, canBlend: false, canMultisample: false, canResolve: false, storageBindings: null },\n 'astc-10x8-unorm-srgb': { channelType: f32, vectorType: vec4f, texelSize: 16, sampleTypes: ['float', 'unfilterable-float'], aspects: ['color'], canRenderAttachment: false, canBlend: false, canMultisample: false, canResolve: false, storageBindings: null },\n 'astc-10x10-unorm': { channelType: f32, vectorType: vec4f, texelSize: 16, sampleTypes: ['float', 'unfilterable-float'], aspects: ['color'], canRenderAttachment: false, canBlend: false, canMultisample: false, canResolve: false, storageBindings: null },\n 'astc-10x10-unorm-srgb': { channelType: f32, vectorType: vec4f, texelSize: 16, sampleTypes: ['float', 'unfilterable-float'], aspects: ['color'], canRenderAttachment: false, canBlend: false, canMultisample: false, canResolve: false, storageBindings: null },\n 'astc-12x10-unorm': { channelType: f32, vectorType: vec4f, texelSize: 16, sampleTypes: ['float', 'unfilterable-float'], aspects: ['color'], canRenderAttachment: false, canBlend: false, canMultisample: false, canResolve: false, storageBindings: null },\n 'astc-12x10-unorm-srgb': { channelType: f32, vectorType: vec4f, texelSize: 16, sampleTypes: ['float', 'unfilterable-float'], aspects: ['color'], canRenderAttachment: false, canBlend: false, canMultisample: false, canResolve: false, storageBindings: null },\n 'astc-12x12-unorm': { channelType: f32, vectorType: vec4f, texelSize: 16, sampleTypes: ['float', 'unfilterable-float'], aspects: ['color'], canRenderAttachment: false, canBlend: false, canMultisample: false, canResolve: false, storageBindings: null },\n 'astc-12x12-unorm-srgb': { channelType: f32, vectorType: vec4f, texelSize: 16, sampleTypes: ['float', 'unfilterable-float'], aspects: ['color'], canRenderAttachment: false, canBlend: false, canMultisample: false, canResolve: false, storageBindings: null },\n} as const satisfies Record<GPUTextureFormat, TextureFormatInfo>;\n\nexport type TextureFormatInfo = {\n readonly channelType: F32 | I32 | U32;\n readonly vectorType: typeof vec4f | typeof vec4i | typeof vec4u;\n readonly texelSize: number;\n readonly sampleTypes: readonly string[];\n readonly aspects: readonly string[];\n readonly canRenderAttachment: boolean;\n readonly canBlend: boolean;\n readonly canMultisample: boolean;\n readonly canResolve: boolean;\n readonly storageBindings: readonly string[] | null;\n};\n\nexport type TextureFormats = typeof textureFormats;\n\nexport function getDeviceTextureFormatInfo<T extends GPUTextureFormat>(\n format: T,\n device: GPUDevice,\n): typeof textureFormats[T] {\n const baseInfo = textureFormats[format];\n\n if (!baseInfo) {\n throw new Error(`Unknown texture format: ${format}`);\n }\n\n let filteredInfo = { ...baseInfo } as TextureFormatInfo;\n switch (format) {\n case 'r32float':\n case 'rg32float':\n case 'rgba32float':\n if (!device.features.has('float32-filterable')) {\n filteredInfo = {\n ...filteredInfo,\n sampleTypes: baseInfo.sampleTypes.filter((type) => type !== 'float'),\n } as TextureFormatInfo;\n }\n if (!device.features.has('float32-blendable')) {\n filteredInfo = {\n ...filteredInfo,\n canBlend: false,\n };\n }\n break;\n\n case 'bgra8unorm':\n if (!device.features.has('bgra8unorm-storage')) {\n filteredInfo = {\n ...filteredInfo,\n storageBindings: null,\n };\n }\n break;\n\n case 'rg11b10ufloat':\n if (!device.features.has('rg11b10ufloat-renderable')) {\n filteredInfo = {\n ...filteredInfo,\n canRenderAttachment: false,\n canBlend: false,\n canMultisample: false,\n canResolve: false,\n };\n }\n break;\n }\n\n if (filteredInfo.storageBindings) {\n const hasTexture1 = device.features.has('texture-formats-tier1');\n const hasTexture2 = device.features.has('texture-formats-tier2');\n\n let availableBindings = [...filteredInfo.storageBindings];\n\n // deno-fmt-ignore\n const tier2RequiredFormats = [\n 'r8unorm', 'r8uint', 'r8sint',\n 'r16uint', 'r16sint', 'r16float',\n 'rgba8unorm', 'rgba8uint', 'rgba8sint',\n 'rgba16uint', 'rgba16sint', 'rgba16float',\n 'r32uint', 'r32sint', 'r32float',\n 'rgba32uint', 'rgba32sint', 'rgba32float',\n ];\n\n // deno-fmt-ignore\n const tier1RequiredFormats = [\n 'r8snorm',\n 'rg8unorm', 'rg8snorm', 'rg8uint', 'rg8sint',\n 'rgba8snorm',\n 'r16unorm', 'r16snorm',\n 'rg16unorm', 'rg16snorm', 'rg16uint', 'rg16sint', 'rg16float',\n 'rgba16unorm', 'rgba16snorm',\n 'rgb10a2uint', 'rgb10a2unorm', 'rg11b10ufloat',\n ];\n\n if (tier2RequiredFormats.includes(format) && !hasTexture2) {\n availableBindings = availableBindings.filter((binding) =>\n binding !== 'read-write'\n );\n }\n\n if (tier1RequiredFormats.includes(format) && !hasTexture1) {\n availableBindings = availableBindings.filter(\n (binding) => binding !== 'write-only' && binding !== 'read-only',\n );\n }\n\n filteredInfo = {\n ...filteredInfo,\n storageBindings: availableBindings.length > 0 ? availableBindings : null,\n };\n }\n\n return filteredInfo as typeof textureFormats[T];\n}\n","export const wgslExtensions = [\n 'f16',\n 'clip_distances',\n 'dual_source_blending',\n 'subgroups',\n 'primitive_index',\n] as const;\nexport type WgslExtension = (typeof wgslExtensions)[number];\n\nexport const wgslExtensionToFeatureName: Record<WgslExtension, GPUFeatureName> =\n {\n f16: 'shader-f16',\n clip_distances: 'clip-distances',\n dual_source_blending: 'dual-source-blending',\n subgroups: 'subgroups',\n primitive_index: 'primitive-index' as GPUFeatureName,\n };\n"],"mappings":"kRA0BO,IAAMA,GAAkBC,EAAS,CACtC,KAAM,kBACN,YAAcC,GACR,OAAOA,GAAU,SACZC,EAAoBD,CAAK,EAE3BE,EAAU,gBAAgBF,EAAM,IAAI,EAAEA,CAAK,GAEpD,YAAcG,GAAMC,iBAAsBD,CAAC,IAC3C,UAAW,IAAIE,IAAQ,CACrB,IAAMC,EAAQC,EAAMF,EAAK,CAACG,CAAG,CAAC,GAAKH,EACnC,MAAO,CACL,SAAUC,EACV,WAAYG,EAAMH,EAAM,CAAC,CAAC,EACtBA,EAAM,CAAC,EAAE,OAAS,QAChBI,EACAJ,EAAM,CAAC,EAAE,OAAS,QAClBK,EACAC,EACFC,CACN,CACF,CACF,CAAC,EAQYC,GAAkBf,EAAS,CACtC,KAAM,kBACN,YAAcC,GACR,OAAOA,GAAU,SACZe,EAAoBf,CAAK,EAE3BE,EAAU,gBAA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uB,CAC3B,UAAW,SAAU,SACrB,UAAW,UAAW,WACtB,aAAc,YAAa,YAC3B,aAAc,aAAc,cAC5B,UAAW,UAAW,WACtB,aAAc,aAAc,aAC9B,EAGMC,EAAuB,CAC3B,UACA,WAAY,WAAY,UAAW,UACnC,aACA,WAAY,WACZ,YAAa,YAAa,WAAY,WAAY,YAClD,cAAe,cACf,cAAe,eAAgB,eACjC,EAEID,EAAqB,SAASR,CAAM,GAAK,CAACM,IAC5CC,EAAoBA,EAAkB,OAAQG,GAC5CA,IAAY,YACd,GAGED,EAAqB,SAAST,CAAM,GAAK,CAACK,IAC5CE,EAAoBA,EAAkB,OACnCG,GAAYA,IAAY,cAAgBA,IAAY,WACvD,GAGFP,EAAe,CACb,GAAGA,EACH,gBAAiBI,EAAkB,OAAS,EAAIA,EAAoB,IACtE,CACF,CAEA,OAAOJ,CACT,CC5SO,IAAMQ,GAAiB,CAC5B,MACA,iBACA,uBACA,YACA,iBACF,EAGaC,GACX,CACE,IAAK,aACL,eAAgB,iBAChB,qBAAsB,uBACtB,UAAW,YACX,gBAAiB,iBACnB","names":["bitcastU32toF32","dualImpl","value","bitcastU32toF32Impl","VectorOps","n","stitch","arg","uargs","unify","u32","isVec","vec2f","vec3f","vec4f","f32","bitcastU32toI32","bitcastU32toI32Impl","vec2i","vec3i","vec4i","i32","TB","unpack2x16float","createDualImpl","buffer","reader","vec2f","snip","stitch","pack2x16float","writer","u32","unpack4x8unorm","vec4f","pack4x8unorm","correspondingBooleanVectorSchema","dataType","vec2b","vec3b","vec4b","allEq","dualImpl","argTypes","bool","lhs","rhs","cpuAll","cpuEq","stitch","VectorOps","eq","ne","cpuNot","cpuLt","lt","le","cpuOr","gt","cpuAnd","ge","value","not","arg","or","and","all","any","isCloseTo","args","precision","isVecInstance","sub","$internal","snip","f32","isSnippetNumeric","cpuSelect","f","cond","select","uf","ut","unify","textureFormats","f32","vec4f","u32","vec4u","i32","vec4i","getDeviceTextureFormatInfo","format","device","baseInfo","filteredInfo","type","hasTexture1","hasTexture2","availableBindings","tier2RequiredFormats","tier1RequiredFormats","binding","wgslExtensions","wgslExtensionToFeatureName"]}
|
package/common/index.d.ts
CHANGED
package/common/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{h as n}from"../chunk-
|
|
1
|
+
import{h as n}from"../chunk-CGQB3SER.js";import{Xa as r,uc as e}from"../chunk-CRZWTZM2.js";var o=n({in:{vertexIndex:e.vertexIndex},out:{pos:e.position,uv:r}})`{
|
|
2
2
|
const pos = array<vec2f, 3>(vec2f(-1, -1), vec2f(3, -1), vec2f(-1, 3));
|
|
3
3
|
const uv = array<vec2f, 3>(vec2f(0, 1), vec2f(2, 1), vec2f(0, -1));
|
|
4
4
|
|
package/data/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { aQ as Vec2b, aP as Vec2f, aR as Vec2h, aS as Vec2i, aT as Vec2u, aU as Vec3b, aV as Vec3f, aW as Vec3h, aX as Vec3i, aY as Vec3u, aZ as Vec4b, a_ as Vec4f, a$ as Vec4h, b0 as Vec4i, b1 as Vec4u, b2 as Bool, b3 as F16, b4 as F32, b5 as I32, b6 as U16, b7 as U32, j as AnyWgslData, b8 as WgslStruct, b9 as DualFn, o as WgslArray, ba as StorableData, bb as Ptr, A as AnyData, D as Disarray, bc as BaseData, bd as Unstruct, be as Atomic } from '../tgpuConstant-
|
|
2
|
-
export { br as Align, cx as AnyAttribute, cL as AnyBuiltin, bR as AnyLooseData, bs as AnyVecInstance, bt as AnyWgslStruct, bu as Builtin, cM as BuiltinClipDistances, cN as BuiltinFragDepth, cO as BuiltinFrontFacing, cP as BuiltinGlobalInvocationId, cQ as BuiltinInstanceIndex, cR as BuiltinLocalInvocationId, cS as BuiltinLocalInvocationIndex, cT as BuiltinNumWorkgroups, cU as BuiltinPosition, cV as BuiltinSampleIndex, cW as BuiltinSampleMask, cX as BuiltinVertexIndex, cY as BuiltinWorkgroupId, bv as Decorated, c$ as FormatToWGSLType, cy as HasCustomLocation, I as Infer, cZ as InferGPU, c_ as InferPartial, bw as Interpolate, cB as IsBuiltin, bx as Location, bS as LooseDecorated, bB as Mat2x2f, bC as Mat3x3f, bD as Mat4x4f, dJ as PackedData, bE as Size, d0 as TgpuVertexFormatData, bq as Void, cu as WgslComparisonSampler, c8 as WgslExternalTexture, cv as WgslSampler, c9 as WgslStorageTexture, ca as WgslStorageTexture1d, cb as WgslStorageTexture2d, cc as WgslStorageTexture2dArray, cd as WgslStorageTexture3d, ce as WgslStorageTextureProps, cf as WgslTexture, cg as WgslTexture1d, ch as WgslTexture2d, ci as WgslTexture2dArray, cj as WgslTexture3d, ck as WgslTextureCube, cl as WgslTextureCubeArray, cm as WgslTextureDepth2d, cn as WgslTextureDepth2dArray, co as WgslTextureDepthCube, cp as WgslTextureDepthCubeArray, cq as WgslTextureDepthMultisampled2d, cr as WgslTextureMultisampled2d, cw as align, cK as builtin, cs as comparisonSampler, ds as float16, dt as float16x2, du as float16x4, dv as float32, dw as float32x2, dx as float32x3, dy as float32x4, d1 as formatToWGSLType, cz as interpolate, cA as invariant, bf as isAlignAttrib, bg as isAtomic, cC as isBuiltin, bh as isBuiltinAttrib, cF as isData, bi as isDecorated, cG as isDisarray, bj as isInterpolateAttrib, bk as isLocationAttrib, cH as isLooseData, cI as isLooseDecorated, dK as isPackedData, bl as isPtr, bm as isSizeAttrib, cJ as isUnstruct, bn as isWgslArray, bo as isWgslData, bp as isWgslStruct, cD as location, by as m2x2f, bz as m3x3f, bA as m4x4f, d2 as packedFormats, ct as sampler, di as sint16, dj as sint16x2, dk as sint16x4, dD as sint32, dE as sint32x2, dF as sint32x3, dG as sint32x4, d6 as sint8, d7 as sint8x2, d8 as sint8x4, cE as size, dp as snorm16, dq as snorm16x2, dr as snorm16x4, dc as snorm8, dd as snorm8x2, de as snorm8x4, bT as texture1d, bU as texture2d, bV as texture2dArray, bW as texture3d, bX as textureCube, bY as textureCubeArray, bZ as textureDepth2d, b_ as textureDepth2dArray, b$ as textureDepthCube, c0 as textureDepthCubeArray, c1 as textureDepthMultisampled2d, c2 as textureExternal, c3 as textureMultisampled2d, c4 as textureStorage1d, c5 as textureStorage2d, c6 as textureStorage2dArray, c7 as textureStorage3d, df as uint16, dg as uint16x2, dh as uint16x4, dz as uint32, dA as uint32x2, dB as uint32x3, dC as uint32x4, d3 as uint8, d4 as uint8x2, d5 as uint8x4, dH as unorm10_10_10_2, dl as unorm16, dm as unorm16x2, dn as unorm16x4, d9 as unorm8, da as unorm8x2, db as unorm8x4, dI as unorm8x4_bgra, bF as v2b, bG as v2f, bH as v2i, bI as v2u, bJ as v3b, bK as v3f, bL as v3i, bM as v3u, bN as v4b, bO as v4f, bP as v4i, bQ as v4u } from '../tgpuConstant-
|
|
3
|
-
export { m as mat2x2f, a as mat3x3f, b as mat4x4f, c as matToArray } from '../matrix-
|
|
1
|
+
import { aQ as Vec2b, aP as Vec2f, aR as Vec2h, aS as Vec2i, aT as Vec2u, aU as Vec3b, aV as Vec3f, aW as Vec3h, aX as Vec3i, aY as Vec3u, aZ as Vec4b, a_ as Vec4f, a$ as Vec4h, b0 as Vec4i, b1 as Vec4u, b2 as Bool, b3 as F16, b4 as F32, b5 as I32, b6 as U16, b7 as U32, j as AnyWgslData, b8 as WgslStruct, b9 as DualFn, o as WgslArray, ba as StorableData, bb as Ptr, A as AnyData, D as Disarray, bc as BaseData, bd as Unstruct, be as Atomic } from '../tgpuConstant-BTQFNlQH.js';
|
|
2
|
+
export { br as Align, cx as AnyAttribute, cL as AnyBuiltin, bR as AnyLooseData, bs as AnyVecInstance, bt as AnyWgslStruct, bu as Builtin, cM as BuiltinClipDistances, cN as BuiltinFragDepth, cO as BuiltinFrontFacing, cP as BuiltinGlobalInvocationId, cQ as BuiltinInstanceIndex, cR as BuiltinLocalInvocationId, cS as BuiltinLocalInvocationIndex, cT as BuiltinNumWorkgroups, cU as BuiltinPosition, cV as BuiltinSampleIndex, cW as BuiltinSampleMask, cX as BuiltinVertexIndex, cY as BuiltinWorkgroupId, bv as Decorated, c$ as FormatToWGSLType, cy as HasCustomLocation, I as Infer, cZ as InferGPU, c_ as InferPartial, bw as Interpolate, cB as IsBuiltin, bx as Location, bS as LooseDecorated, bB as Mat2x2f, bC as Mat3x3f, bD as Mat4x4f, dJ as PackedData, bE as Size, d0 as TgpuVertexFormatData, bq as Void, cu as WgslComparisonSampler, c8 as WgslExternalTexture, cv as WgslSampler, c9 as WgslStorageTexture, ca as WgslStorageTexture1d, cb as WgslStorageTexture2d, cc as WgslStorageTexture2dArray, cd as WgslStorageTexture3d, ce as WgslStorageTextureProps, cf as WgslTexture, cg as WgslTexture1d, ch as WgslTexture2d, ci as WgslTexture2dArray, cj as WgslTexture3d, ck as WgslTextureCube, cl as WgslTextureCubeArray, cm as WgslTextureDepth2d, cn as WgslTextureDepth2dArray, co as WgslTextureDepthCube, cp as WgslTextureDepthCubeArray, cq as WgslTextureDepthMultisampled2d, cr as WgslTextureMultisampled2d, cw as align, cK as builtin, cs as comparisonSampler, ds as float16, dt as float16x2, du as float16x4, dv as float32, dw as float32x2, dx as float32x3, dy as float32x4, d1 as formatToWGSLType, cz as interpolate, cA as invariant, bf as isAlignAttrib, bg as isAtomic, cC as isBuiltin, bh as isBuiltinAttrib, cF as isData, bi as isDecorated, cG as isDisarray, bj as isInterpolateAttrib, bk as isLocationAttrib, cH as isLooseData, cI as isLooseDecorated, dK as isPackedData, bl as isPtr, bm as isSizeAttrib, cJ as isUnstruct, bn as isWgslArray, bo as isWgslData, bp as isWgslStruct, cD as location, by as m2x2f, bz as m3x3f, bA as m4x4f, d2 as packedFormats, ct as sampler, di as sint16, dj as sint16x2, dk as sint16x4, dD as sint32, dE as sint32x2, dF as sint32x3, dG as sint32x4, d6 as sint8, d7 as sint8x2, d8 as sint8x4, cE as size, dp as snorm16, dq as snorm16x2, dr as snorm16x4, dc as snorm8, dd as snorm8x2, de as snorm8x4, bT as texture1d, bU as texture2d, bV as texture2dArray, bW as texture3d, bX as textureCube, bY as textureCubeArray, bZ as textureDepth2d, b_ as textureDepth2dArray, b$ as textureDepthCube, c0 as textureDepthCubeArray, c1 as textureDepthMultisampled2d, c2 as textureExternal, c3 as textureMultisampled2d, c4 as textureStorage1d, c5 as textureStorage2d, c6 as textureStorage2dArray, c7 as textureStorage3d, df as uint16, dg as uint16x2, dh as uint16x4, dz as uint32, dA as uint32x2, dB as uint32x3, dC as uint32x4, d3 as uint8, d4 as uint8x2, d5 as uint8x4, dH as unorm10_10_10_2, dl as unorm16, dm as unorm16x2, dn as unorm16x4, d9 as unorm8, da as unorm8x2, db as unorm8x4, dI as unorm8x4_bgra, bF as v2b, bG as v2f, bH as v2i, bI as v2u, bJ as v3b, bK as v3f, bL as v3i, bM as v3u, bN as v4b, bO as v4f, bP as v4i, bQ as v4u } from '../tgpuConstant-BTQFNlQH.js';
|
|
3
|
+
export { m as mat2x2f, a as mat3x3f, b as mat4x4f, c as matToArray } from '../matrix-DIfOiRyz.js';
|
|
4
4
|
import 'tinyest';
|
|
5
5
|
|
|
6
6
|
/**
|
package/data/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as jb,b as kb,c as lb,d as mb,e as nb,f as ob,g as pb,h as qb,i as rb}from"../chunk-
|
|
1
|
+
import{a as jb,b as kb,c as lb,d as mb,e as nb,f as ob,g as pb,h as qb,i as rb}from"../chunk-6U5HPHCJ.js";import{A as Ra,B as Sa,C as Ta,D as Ua,E as Va,F as Wa,G as Xa,H as Ya,I as Za,J as _a,K as $a,L as ab,M as bb,N as cb,O as db,P as eb,Q as fb,T as hb,j as M,k as N,l as O,m as P,u as Pa,v as Qa}from"../chunk-ECR2EGZX.js";import{$a as B,$b as Ca,Ab as ba,B as b,Bb as ca,C as c,Cb as da,D as d,Db as ea,E as e,Eb as fa,F as f,Fb as ga,G as g,Gb as ha,H as h,Hb as ia,I as i,Ib as ja,J as j,Jb as ka,K as k,Kb as la,L as l,Lb as ma,Mb as na,Nb as oa,Ob as pa,Pb as qa,Q as m,Qa as r,Qb as ra,R as n,Ra as s,Rb as sa,S as o,Sa as t,Sb as ta,T as p,Ta as u,Tb as ua,Ua as v,Ub as va,V as q,Va as w,Vb as wa,Wb as xa,Xa as x,Xb as ya,Ya as y,Yb as za,Za as z,Zb as Aa,_a as A,_b as Ba,ab as C,ac as Da,bb as D,bc as Ea,cb as E,cc as Fa,db as F,eb as G,fb as H,fc as Ga,gb as I,hb as J,ib as K,ic as Ha,jb as L,jc as Ia,kc as Ja,lc as Ka,mc as La,nb as Q,nc as Ma,ob as R,oc as Na,pb as S,q as a,qb as T,rb as U,rc as Oa,sb as V,tb as W,tc as gb,ub as X,uc as ib,vb as Y,wb as Z,xb as _,yb as $,zb as aa}from"../chunk-CRZWTZM2.js";export{a as Void,Ia as align,Ga as alignmentOf,gb as arrayOf,hb as atomic,r as bool,ib as builtin,Qa as comparisonSampler,rb as deepEqual,pb as disarrayOf,w as f16,v as f32,oa as float16,pa as float16x2,qa as float16x4,ra as float32,sa as float32x2,ta as float32x3,ua as float32x4,Q as formatToWGSLType,u as i32,La as interpolate,Ma as invariant,g as isAlignAttrib,f as isAtomic,Na as isBuiltin,k as isBuiltinAttrib,q as isData,l as isDecorated,n as isDisarray,j as isInterpolateAttrib,i as isLocationAttrib,m as isLooseData,p as isLooseDecorated,Fa as isPackedData,e as isPtr,h as isSizeAttrib,o as isUnstruct,c as isWgslArray,b as isWgslData,d as isWgslStruct,Ka as location,M as mat2x2f,N as mat3x3f,O as mat4x4f,P as matToArray,R as packedFormats,jb as ptrFn,ob as ptrHandle,kb as ptrPrivate,mb as ptrStorage,nb as ptrUniform,lb as ptrWorkgroup,Pa as sampler,fa as sint16,ga as sint16x2,ha as sint16x4,za as sint32,Aa as sint32x2,Ba as sint32x3,Ca as sint32x4,V as sint8,W as sint8x2,X as sint8x4,Ja as size,Ha as sizeOf,la as snorm16,ma as snorm16x2,na as snorm16x4,$ as snorm8,aa as snorm8x2,ba as snorm8x4,Oa as struct,Ra as texture1d,Sa as texture2d,Ua as texture2dArray,Xa as texture3d,Va as textureCube,Wa as textureCubeArray,ab as textureDepth2d,cb as textureDepth2dArray,db as textureDepthCube,eb as textureDepthCubeArray,bb as textureDepthMultisampled2d,fb as textureExternal,Ta as textureMultisampled2d,Ya as textureStorage1d,Za as textureStorage2d,_a as textureStorage2dArray,$a as textureStorage3d,t as u16,s as u32,ca as uint16,da as uint16x2,ea as uint16x4,va as uint32,wa as uint32x2,xa as uint32x3,ya as uint32x4,S as uint8,T as uint8x2,U as uint8x4,Da as unorm10_10_10_2,ia as unorm16,ja as unorm16x2,ka as unorm16x4,Y as unorm8,Z as unorm8x2,_ as unorm8x4,Ea as unorm8x4_bgra,qb as unstruct,B as vec2b,x as vec2f,y as vec2h,z as vec2i,A as vec2u,G as vec3b,C as vec3f,D as vec3h,E as vec3i,F as vec3u,L as vec4b,H as vec4f,I as vec4h,J as vec4i,K as vec4u};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $ as $internal, S as ShelllessRepository, T as TgpuSlot, R as ResolvedSnippet, a as TgpuDerived, b as TgpuBindGroupLayout, c as TgpuBindGroup, L as LogResources, W as Wgsl, C as Configurable, d as WgslExtension, e as ShaderGenerator, f as TgpuBuffer, A as AnyData, g as TgpuVar, h as LogGeneratorOptions, i as TgpuRoot, j as AnyWgslData, k as TgpuFn, l as TgpuBufferUsage, I as Infer, m as TgpuAccessor, n as TgpuVertexLayout, o as WgslArray, D as Disarray, p as fn, q as bindGroupLayout, v as vertexLayout, r as privateVar, w as workgroupVar, s as constant, t as fragmentFn, u as vertexFn, x as computeFn, y as declare } from './tgpuConstant-
|
|
2
|
-
export { aw as BindLayoutEntry, aj as Eventual, ax as ExtractBindGroupInputFromLayout, aO as INTERNAL_GlobalExt, a7 as IndexFlag, ay as LayoutEntryToInput, an as RenderFlag, ao as SampledFlag, a3 as Storage, a4 as StorageFlag, am as TextureProps, ad as TgpuBufferMutable, ae as TgpuBufferReadonly, af as TgpuBufferUniform, ar as TgpuComparisonSampler, aL as TgpuComputeFn, aM as TgpuComputeFnShell, a6 as TgpuComputePipeline, ap as TgpuConst, aN as TgpuDeclare, as as TgpuFixedComparisonSampler, at as TgpuFixedSampler, aG as TgpuFnShell, aJ as TgpuFragmentFn, aK as TgpuFragmentFnShell, V as TgpuGuardedComputePipeline, az as TgpuLayoutComparisonSampler, aA as TgpuLayoutEntry, aB as TgpuLayoutExternalTexture, aC as TgpuLayoutSampler, aD as TgpuLayoutStorage, aE as TgpuLayoutTexture, aF as TgpuLayoutUniform, ag as TgpuMutable, av as TgpuQuerySet, ah as TgpuReadonly, a5 as TgpuRenderPipeline, au as TgpuSampler, ak as TgpuTexture, al as TgpuTextureView, ai as TgpuUniform, aH as TgpuVertexFn, aI as TgpuVertexFnShell, a8 as Uniform, a9 as UniformFlag, aa as ValidUsagesFor, X as ValidateBufferSchema, Y as ValidateStorageSchema, Z as ValidateUniformSchema, aq as VariableScope, ab as Vertex, ac as VertexFlag, _ as WithBinding, a0 as WithCompute, a1 as WithFragment, a2 as WithVertex, z as isBuffer, P as isBufferShorthand, G as isComparisonSampler, E as isDerived, H as isSampler, F as isSlot, J as isTexture, Q as isTgpuFn, K as isUsableAsRender, M as isUsableAsSampled, N as isUsableAsStorage, O as isUsableAsUniform, B as isUsableAsVertex, U as isVariable } from './tgpuConstant-
|
|
1
|
+
import { $ as $internal, S as ShelllessRepository, T as TgpuSlot, R as ResolvedSnippet, a as TgpuDerived, b as TgpuBindGroupLayout, c as TgpuBindGroup, L as LogResources, W as Wgsl, C as Configurable, d as WgslExtension, e as ShaderGenerator, f as TgpuBuffer, A as AnyData, g as TgpuVar, h as LogGeneratorOptions, i as TgpuRoot, j as AnyWgslData, k as TgpuFn, l as TgpuBufferUsage, I as Infer, m as TgpuAccessor, n as TgpuVertexLayout, o as WgslArray, D as Disarray, p as fn, q as bindGroupLayout, v as vertexLayout, r as privateVar, w as workgroupVar, s as constant, t as fragmentFn, u as vertexFn, x as computeFn, y as declare } from './tgpuConstant-BTQFNlQH.js';
|
|
2
|
+
export { aw as BindLayoutEntry, aj as Eventual, ax as ExtractBindGroupInputFromLayout, aO as INTERNAL_GlobalExt, a7 as IndexFlag, ay as LayoutEntryToInput, an as RenderFlag, ao as SampledFlag, a3 as Storage, a4 as StorageFlag, am as TextureProps, ad as TgpuBufferMutable, ae as TgpuBufferReadonly, af as TgpuBufferUniform, ar as TgpuComparisonSampler, aL as TgpuComputeFn, aM as TgpuComputeFnShell, a6 as TgpuComputePipeline, ap as TgpuConst, aN as TgpuDeclare, as as TgpuFixedComparisonSampler, at as TgpuFixedSampler, aG as TgpuFnShell, aJ as TgpuFragmentFn, aK as TgpuFragmentFnShell, V as TgpuGuardedComputePipeline, az as TgpuLayoutComparisonSampler, aA as TgpuLayoutEntry, aB as TgpuLayoutExternalTexture, aC as TgpuLayoutSampler, aD as TgpuLayoutStorage, aE as TgpuLayoutTexture, aF as TgpuLayoutUniform, ag as TgpuMutable, av as TgpuQuerySet, ah as TgpuReadonly, a5 as TgpuRenderPipeline, au as TgpuSampler, ak as TgpuTexture, al as TgpuTextureView, ai as TgpuUniform, aH as TgpuVertexFn, aI as TgpuVertexFnShell, a8 as Uniform, a9 as UniformFlag, aa as ValidUsagesFor, X as ValidateBufferSchema, Y as ValidateStorageSchema, Z as ValidateUniformSchema, aq as VariableScope, ab as Vertex, ac as VertexFlag, _ as WithBinding, a0 as WithCompute, a1 as WithFragment, a2 as WithVertex, z as isBuffer, P as isBufferShorthand, G as isComparisonSampler, E as isDerived, H as isSampler, F as isSlot, J as isTexture, Q as isTgpuFn, K as isUsableAsRender, M as isUsableAsSampled, N as isUsableAsStorage, O as isUsableAsUniform, B as isUsableAsVertex, U as isVariable } from './tgpuConstant-BTQFNlQH.js';
|
|
3
3
|
import 'tinyest';
|
|
4
4
|
|
|
5
5
|
interface NameRegistry {
|