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.
Files changed (52) hide show
  1. package/{chunk-6WF2EZIT.js → chunk-6U5HPHCJ.js} +2 -2
  2. package/{chunk-B254XDWG.js → chunk-CGQB3SER.js} +2 -2
  3. package/{chunk-XEUNEHAZ.js → chunk-CRZWTZM2.js} +6 -6
  4. package/chunk-CRZWTZM2.js.map +1 -0
  5. package/chunk-ECR2EGZX.js +7 -0
  6. package/chunk-ECR2EGZX.js.map +1 -0
  7. package/chunk-PWBIFP67.js +2 -0
  8. package/chunk-PWBIFP67.js.map +1 -0
  9. package/common/index.d.ts +1 -1
  10. package/common/index.js +1 -1
  11. package/data/index.d.ts +3 -3
  12. package/data/index.js +1 -1
  13. package/index.d.ts +2 -2
  14. package/index.js +40 -40
  15. package/index.js.map +1 -1
  16. package/{matrix-C6mMH7pB.d.ts → matrix-DIfOiRyz.d.ts} +1 -1
  17. package/package.json +5 -13
  18. package/std/index.d.ts +2 -2
  19. package/std/index.js +1 -1
  20. package/std/index.js.map +1 -1
  21. package/{tgpuConstant-DzGgwe0I.d.ts → tgpuConstant-BTQFNlQH.d.ts} +13 -8
  22. package/chunk-A5APHF7K.cjs +0 -10
  23. package/chunk-A5APHF7K.cjs.map +0 -1
  24. package/chunk-LL6NPRFE.cjs +0 -7
  25. package/chunk-LL6NPRFE.cjs.map +0 -1
  26. package/chunk-M2P3FJT7.cjs +0 -2
  27. package/chunk-M2P3FJT7.cjs.map +0 -1
  28. package/chunk-PO6SIMTQ.js +0 -2
  29. package/chunk-PO6SIMTQ.js.map +0 -1
  30. package/chunk-T2GBOTUH.js +0 -7
  31. package/chunk-T2GBOTUH.js.map +0 -1
  32. package/chunk-TRAG63HY.cjs +0 -3
  33. package/chunk-TRAG63HY.cjs.map +0 -1
  34. package/chunk-U3CXOCRG.cjs +0 -2
  35. package/chunk-U3CXOCRG.cjs.map +0 -1
  36. package/chunk-XEUNEHAZ.js.map +0 -1
  37. package/common/index.cjs +0 -7
  38. package/common/index.cjs.map +0 -1
  39. package/common/index.d.cts +0 -24
  40. package/data/index.cjs +0 -2
  41. package/data/index.cjs.map +0 -1
  42. package/data/index.d.cts +0 -402
  43. package/index.cjs +0 -192
  44. package/index.cjs.map +0 -1
  45. package/index.d.cts +0 -369
  46. package/matrix-Cn2jQILV.d.cts +0 -122
  47. package/std/index.cjs +0 -2
  48. package/std/index.cjs.map +0 -1
  49. package/std/index.d.cts +0 -639
  50. package/tgpuConstant-DzGgwe0I.d.cts +0 -5196
  51. /package/{chunk-6WF2EZIT.js.map → chunk-6U5HPHCJ.js.map} +0 -0
  52. /package/{chunk-B254XDWG.js.map → chunk-CGQB3SER.js.map} +0 -0
@@ -1 +0,0 @@
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 { 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: (...argTypes) => ({ argTypes, returnType: argTypes[0] }),\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,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a,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","textureFormats","f32","vec4f","u32","vec4u","i32","vec4i","getDeviceTextureFormatInfo","format","device","baseInfo","filteredInfo","type","hasTexture1","hasTexture2","availableBindings","tier2RequiredFormats","tier1RequiredFormats","binding","wgslExtensions","wgslExtensionToFeatureName"]}
package/chunk-T2GBOTUH.js DELETED
@@ -1,7 +0,0 @@
1
- import{$a as Le,A as ht,C as we,D as Ee,E as vt,Ea as o,Fa as ot,Ia as V,Ja as ut,Ka as St,La as jt,Ma as _,N as Z,Na as B,O as st,Oa as u,Pa as fe,Q as Rt,Qa as C,R as Et,Ra as H,S as Lt,Sa as P,Ua as xe,V as Gt,Va as x,W as k,Wa as F,X as bt,Y as wt,Ya as D,Z as Mt,Za as ne,_ as at,_a as re,a as m,aa as l,ab as Ge,ba as Nt,bb as R,ca as Ot,cb as se,db as ae,eb as Ne,f as Te,fb as Oe,g as de,gb as E,h as Dt,hb as oe,ib as ue,j as rt,jb as Ke,kb as je,la as te,lb as qe,mb as qt,r as v,tc as I,ua as Kt,uc as Zt,v as Re,w as q,z as gt}from"./chunk-XEUNEHAZ.js";var Ze=class{};function Ct(e){let t=_((...r)=>{let a=[];for(let s of r)if(typeof s=="number")a.push(s);else for(let c=0;c<s.length;++c)a.push(s[c]);if(a.length!==0&&a.length!==e.columns*e.rows)throw new Error(`'${e.type}' constructor called with invalid number of arguments.`);for(let s=a.length;s<e.columns*e.rows;++s)a.push(0);return new e.MatImpl(...a)},(...r)=>l(o`${e.type}(${r})`,n),e.type),n=Object.assign(t,{type:e.type,identity:ln[e.columns],translation:e.columns===4?mn:void 0,scaling:e.columns===4?pn:void 0,rotationX:e.columns===4?yn:void 0,rotationY:e.columns===4?xn:void 0,rotationZ:e.columns===4?Tn:void 0});return n}var It=class extends Ze{[m]=!0;columns;length=4;constructor(...t){super(),this.columns=[this.makeColumn(t[0],t[1]),this.makeColumn(t[2],t[3])]}get 0(){return this.columns[0].x}get 1(){return this.columns[0].y}get 2(){return this.columns[1].x}get 3(){return this.columns[1].y}set 0(t){this.columns[0].x=t}set 1(t){this.columns[0].y=t}set 2(t){this.columns[1].x=t}set 3(t){this.columns[1].y=t}*[Symbol.iterator](){yield this[0],yield this[1],yield this[2],yield this[3]}[Te](){return l(`${this.kind}(${Array.from({length:this.length}).map((t,n)=>this[n]).join(", ")})`,ce)}toString(){return this[Te]().value}},At=class extends It{kind="mat2x2f";makeColumn(t,n){return D(t,n)}},zt=class extends Ze{[m]=!0;columns;length=12;constructor(...t){super(),this.columns=[this.makeColumn(t[0],t[1],t[2]),this.makeColumn(t[3],t[4],t[5]),this.makeColumn(t[6],t[7],t[8])]}get 0(){return this.columns[0].x}get 1(){return this.columns[0].y}get 2(){return this.columns[0].z}get 3(){return 0}get 4(){return this.columns[1].x}get 5(){return this.columns[1].y}get 6(){return this.columns[1].z}get 7(){return 0}get 8(){return this.columns[2].x}get 9(){return this.columns[2].y}get 10(){return this.columns[2].z}get 11(){return 0}set 0(t){this.columns[0].x=t}set 1(t){this.columns[0].y=t}set 2(t){this.columns[0].z=t}set 3(t){}set 4(t){this.columns[1].x=t}set 5(t){this.columns[1].y=t}set 6(t){this.columns[1].z=t}set 7(t){}set 8(t){this.columns[2].x=t}set 9(t){this.columns[2].y=t}set 10(t){this.columns[2].z=t}set 11(t){}*[Symbol.iterator](){for(let t=0;t<12;t++)yield this[t]}[Te](){return l(`${this.kind}(${this[0]}, ${this[1]}, ${this[2]}, ${this[4]}, ${this[5]}, ${this[6]}, ${this[8]}, ${this[9]}, ${this[10]})`,ie)}toString(){return this[Te]().value}},$t=class extends zt{kind="mat3x3f";makeColumn(t,n,r){return R(t,n,r)}},Ft=class extends Ze{[m]=!0;columns;constructor(...t){super(),this.columns=[this.makeColumn(t[0],t[1],t[2],t[3]),this.makeColumn(t[4],t[5],t[6],t[7]),this.makeColumn(t[8],t[9],t[10],t[11]),this.makeColumn(t[12],t[13],t[14],t[15])]}length=16;get 0(){return this.columns[0].x}get 1(){return this.columns[0].y}get 2(){return this.columns[0].z}get 3(){return this.columns[0].w}get 4(){return this.columns[1].x}get 5(){return this.columns[1].y}get 6(){return this.columns[1].z}get 7(){return this.columns[1].w}get 8(){return this.columns[2].x}get 9(){return this.columns[2].y}get 10(){return this.columns[2].z}get 11(){return this.columns[2].w}get 12(){return this.columns[3].x}get 13(){return this.columns[3].y}get 14(){return this.columns[3].z}get 15(){return this.columns[3].w}set 0(t){this.columns[0].x=t}set 1(t){this.columns[0].y=t}set 2(t){this.columns[0].z=t}set 3(t){this.columns[0].w=t}set 4(t){this.columns[1].x=t}set 5(t){this.columns[1].y=t}set 6(t){this.columns[1].z=t}set 7(t){this.columns[1].w=t}set 8(t){this.columns[2].x=t}set 9(t){this.columns[2].y=t}set 10(t){this.columns[2].z=t}set 11(t){this.columns[2].w=t}set 12(t){this.columns[3].x=t}set 13(t){this.columns[3].y=t}set 14(t){this.columns[3].z=t}set 15(t){this.columns[3].w=t}*[Symbol.iterator](){for(let t=0;t<16;t++)yield this[t]}[Te](){return l(`${this.kind}(${Array.from({length:this.length}).map((t,n)=>this[n]).join(", ")})`,A)}toString(){return this[Te]().value}},Vt=class extends Ft{kind="mat4x4f";makeColumn(t,n,r,a){return E(t,n,r,a)}},on=_(()=>ce(1,0,0,1),()=>l("mat2x2f(1, 0, 0, 1)",ce),"identity2"),un=_(()=>ie(1,0,0,0,1,0,0,0,1),()=>l("mat3x3f(1, 0, 0, 0, 1, 0, 0, 0, 1)",ie),"identity3"),cn=_(()=>A(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),()=>l("mat4x4f(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)",A),"identity4"),ln={2:on,3:un,4:cn},mn=_(e=>A(1,0,0,0,0,1,0,0,0,0,1,0,e.x,e.y,e.z,1),e=>l(o`mat4x4f(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, ${e}.x, ${e}.y, ${e}.z, 1)`,A),"translation4"),pn=_(e=>A(e.x,0,0,0,0,e.y,0,0,0,0,e.z,0,0,0,0,1),e=>l(o`mat4x4f(${e}.x, 0, 0, 0, 0, ${e}.y, 0, 0, 0, 0, ${e}.z, 0, 0, 0, 0, 1)`,A),"scaling4"),yn=_(e=>A(1,0,0,0,0,Math.cos(e),Math.sin(e),0,0,-Math.sin(e),Math.cos(e),0,0,0,0,1),e=>l(o`mat4x4f(1, 0, 0, 0, 0, cos(${e}), sin(${e}), 0, 0, -sin(${e}), cos(${e}), 0, 0, 0, 0, 1)`,A),"rotationX4"),xn=_(e=>A(Math.cos(e),0,-Math.sin(e),0,0,1,0,0,Math.sin(e),0,Math.cos(e),0,0,0,0,1),e=>l(o`mat4x4f(cos(${e}), 0, -sin(${e}), 0, 0, 1, 0, 0, sin(${e}), 0, cos(${e}), 0, 0, 0, 0, 1)`,A),"rotationY4"),Tn=_(e=>A(Math.cos(e),Math.sin(e),0,0,-Math.sin(e),Math.cos(e),0,0,0,0,1,0,0,0,0,1),e=>l(o`mat4x4f(cos(${e}), sin(${e}), 0, 0, -sin(${e}), cos(${e}), 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)`,A),"rotationZ4"),ce=Ct({type:"mat2x2f",rows:2,columns:2,MatImpl:At}),ie=Ct({type:"mat3x3f",rows:3,columns:3,MatImpl:$t}),A=Ct({type:"mat4x4f",rows:4,columns:4,MatImpl:Vt});function Gr(e){return e.kind==="mat3x3f"?[e[0],e[1],e[2],e[4],e[5],e[6],e[8],e[9],e[10]]:Array.from({length:e.length}).map((t,n)=>e[n])}function Kr(){return{[m]:!0,type:"sampler",[de]:void 0}}function jr(){return{[m]:!0,type:"sampler_comparison",[de]:void 0}}function qr(e){return!!e[m]&&e.type==="sampler"}function Zr(e){return!!e[m]&&e.type==="sampler_comparison"}function Yr(e){if("multisampled"in e){if(e.multisampled){if(e.dimension==="2d")return gn(e.sampleType);throw new Error(`Multisampled textures only support '2d' dimension, got '${e.dimension}'`)}switch(e.dimension){case"1d":return dn(e.sampleType);case"2d":return fn(e.sampleType);case"2d-array":return hn(e.sampleType);case"3d":return wn(e.sampleType);case"cube":return vn(e.sampleType);case"cube-array":return bn(e.sampleType);default:throw new Error(`Unsupported texture dimension: '${e.dimension}'`)}}if(!("access"in e))throw new Error("Descriptor is neither a sampled nor a storage texture");switch(e.dimension){case"1d":return Mn(e.format,e.access);case"2d":return Sn(e.format,e.access);case"2d-array":return In(e.format,e.access);case"3d":return An(e.format,e.access);default:throw new Error(`Unsupported storage texture dimension: '${e.dimension}'`)}}function L(e,t){let r=e.startsWith("texture_depth")?["depth","float","unfilterable-float"]:t.sampleType.type==="i32"?["sint"]:t.sampleType.type==="u32"?["uint"]:["float","unfilterable-float"];return{[m]:!0,[de]:void 0,type:e,bindingSampleType:r,...t}}function ct(e,t){return{[m]:!0,[de]:void 0,type:e,...t}}var Ht=new Map,it={"write-only":"write","read-only":"read","read-write":"read_write"};function z(e,t){let n=Ht.get(e);return n||(n=t(),Ht.set(e,n)),n}function dn(e){let t=e||x,n=`texture_1d<${t.type}>`;return z(n,()=>L("texture_1d",{dimension:"1d",sampleType:t,multisampled:!1}))}function fn(e){let t=e||x,n=`texture_2d<${t.type}>`;return z(n,()=>L("texture_2d",{dimension:"2d",sampleType:t,multisampled:!1}))}function gn(e){let t=e||x,n=`texture_multisampled_2d<${t.type}>`;return z(n,()=>L("texture_multisampled_2d",{dimension:"2d",sampleType:t,multisampled:!0}))}function hn(e){let t=e||x,n=`texture_2d_array<${t.type}>`;return z(n,()=>L("texture_2d_array",{dimension:"2d-array",sampleType:t,multisampled:!1}))}function vn(e){let t=e||x,n=`texture_cube<${t.type}>`;return z(n,()=>L("texture_cube",{dimension:"cube",sampleType:t,multisampled:!1}))}function bn(e){let t=e||x,n=`texture_cube_array<${t.type}>`;return z(n,()=>L("texture_cube_array",{dimension:"cube-array",sampleType:t,multisampled:!1}))}function wn(e){let t=e||x,n=`texture_3d<${t.type}>`;return z(n,()=>L("texture_3d",{dimension:"3d",sampleType:t,multisampled:!1}))}function Mn(e,t){let n=t||"write-only",r=`texture_storage_1d<${e}, ${it[n]}>`;return z(r,()=>ct("texture_storage_1d",{dimension:"1d",format:e,access:n}))}function Sn(e,t){let n=t||"write-only",r=`texture_storage_2d<${e}, ${it[n]}>`;return z(r,()=>ct("texture_storage_2d",{dimension:"2d",format:e,access:n}))}function In(e,t){let n=t||"write-only",r=`texture_storage_2d_array<${e}, ${it[n]}>`;return z(r,()=>ct("texture_storage_2d_array",{dimension:"2d-array",format:e,access:n}))}function An(e,t){let n=t||"write-only",r=`texture_storage_3d<${e}, ${it[n]}>`;return z(r,()=>ct("texture_storage_3d",{dimension:"3d",format:e,access:n}))}function Jr(){return z("texture_depth_2d",()=>L("texture_depth_2d",{dimension:"2d",sampleType:x,multisampled:!1}))}function es(){return z("texture_depth_multisampled_2d",()=>L("texture_depth_multisampled_2d",{dimension:"2d",sampleType:x,multisampled:!0}))}function ts(){return z("texture_depth_2d_array",()=>L("texture_depth_2d_array",{dimension:"2d-array",sampleType:x,multisampled:!1}))}function ns(){return z("texture_depth_cube",()=>L("texture_depth_cube",{dimension:"cube",sampleType:x,multisampled:!1}))}function rs(){return z("texture_depth_cube_array",()=>L("texture_depth_cube_array",{dimension:"cube-array",sampleType:x,multisampled:!1}))}function ss(){return z("texture_external",()=>({[m]:!0,[de]:void 0,type:"texture_external",dimension:"2d"}))}function as(e){return!!e[m]&&typeof e.multisampled=="boolean"}function os(e){return!!e[m]&&typeof e.format=="string"&&typeof e.access=="string"}function is(e){return new Pt(e)}var Pt=class{constructor(t){this.inner=t}[m]=!0;type="atomic"};var le=(e,t,n)=>{if(e===t)return 0;let r=y((n-e)/(t-e),0,1);return r*r*(3-2*r)},y=(e,t,n)=>Math.min(Math.max(t,e),n),ge=(e,t)=>t===0?e:Math.trunc(e/t);function X(e){let t=new DataView(new ArrayBuffer(4));return t.setUint32(0,e,!0),t.getFloat32(0,!0)}function Y(e){let t=new DataView(new ArrayBuffer(4));return t.setUint32(0,e,!0),t.getInt32(0,!0)}var G=Ge[m].jsImpl,K=D[m].jsImpl,pe=ne[m].jsImpl,We=re[m].jsImpl,Ye=Le[m].jsImpl,N=Oe[m].jsImpl,W=R[m].jsImpl,J=se[m].jsImpl,Ue=ae[m].jsImpl,Je=Ne[m].jsImpl,O=je[m].jsImpl,j=E[m].jsImpl,ye=oe[m].jsImpl,Be=ue[m].jsImpl,et=Ke[m].jsImpl,Me=e=>Math.sqrt(e.x**2+e.y**2),Se=e=>Math.sqrt(e.x**2+e.y**2+e.z**2),Ie=e=>Math.sqrt(e.x**2+e.y**2+e.z**2+e.w**2),lt=(e,t)=>e.x*t.x+e.y*t.y,mt=(e,t)=>e.x*t.x+e.y*t.y+e.z*t.z,pt=(e,t)=>e.x*t.x+e.y*t.y+e.z*t.z+e.w*t.w,h=e=>t=>K(e(t.x),e(t.y)),b=e=>t=>pe(e(t.x),e(t.y)),Ae=e=>t=>We(e(t.x),e(t.y)),He=e=>t=>Ye(e(t.x),e(t.y)),f=e=>t=>W(e(t.x),e(t.y),e(t.z)),w=e=>t=>J(e(t.x),e(t.y),e(t.z)),ze=e=>t=>Ue(e(t.x),e(t.y),e(t.z)),Qe=e=>t=>Je(e(t.x),e(t.y),e(t.z)),d=e=>t=>j(e(t.x),e(t.y),e(t.z),e(t.w)),M=e=>t=>ye(e(t.x),e(t.y),e(t.z),e(t.w)),$e=e=>t=>Be(e(t.x),e(t.y),e(t.z),e(t.w)),Xe=e=>t=>et(e(t.x),e(t.y),e(t.z),e(t.w)),Qt=e=>t=>{let n=t.columns;return ce(h(e)(n[0]),h(e)(n[1]))},Xt=e=>t=>{let n=t.columns;return ie(f(e)(n[0]),f(e)(n[1]),f(e)(n[2]))},Yt=e=>t=>{let n=t.columns;return A(d(e)(n[0]),d(e)(n[1]),d(e)(n[2]),d(e)(n[3]))},me=e=>(t,n)=>K(e(t.x,n.x),e(t.y,n.y)),he=e=>(t,n)=>pe(e(t.x,n.x),e(t.y,n.y)),Fe=e=>(t,n)=>We(e(t.x,n.x),e(t.y,n.y)),Ve=e=>(t,n)=>Ye(e(t.x,n.x),e(t.y,n.y)),ee=e=>(t,n)=>W(e(t.x,n.x),e(t.y,n.y),e(t.z,n.z)),ve=e=>(t,n)=>J(e(t.x,n.x),e(t.y,n.y),e(t.z,n.z)),Ce=e=>(t,n)=>Ue(e(t.x,n.x),e(t.y,n.y),e(t.z,n.z)),Pe=e=>(t,n)=>Je(e(t.x,n.x),e(t.y,n.y),e(t.z,n.z)),Q=e=>(t,n)=>j(e(t.x,n.x),e(t.y,n.y),e(t.z,n.z),e(t.w,n.w)),be=e=>(t,n)=>ye(e(t.x,n.x),e(t.y,n.y),e(t.z,n.z),e(t.w,n.w)),ke=e=>(t,n)=>Be(e(t.x,n.x),e(t.y,n.y),e(t.z,n.z),e(t.w,n.w)),_e=e=>(t,n)=>et(e(t.x,n.x),e(t.y,n.y),e(t.z,n.z),e(t.w,n.w)),zn=e=>(t,n)=>{let r=t.columns,a=n.columns;return ce(me(e)(r[0],a[0]),me(e)(r[1],a[1]))},$n=e=>(t,n)=>{let r=t.columns,a=n.columns;return ie(ee(e)(r[0],a[0]),ee(e)(r[1],a[1]),ee(e)(r[2],a[2]))},Fn=e=>(t,n)=>{let r=t.columns,a=n.columns;return A(Q(e)(r[0],a[0]),Q(e)(r[1],a[1]),Q(e)(r[2],a[2]),Q(e)(r[3],a[3]))},Vn=e=>(t,n,r)=>K(e(t.x,n.x,r.x),e(t.y,n.y,r.y)),Cn=e=>(t,n,r)=>pe(e(t.x,n.x,r.x),e(t.y,n.y,r.y)),Pn=e=>(t,n,r)=>W(e(t.x,n.x,r.x),e(t.y,n.y,r.y),e(t.z,n.z,r.z)),kn=e=>(t,n,r)=>J(e(t.x,n.x,r.x),e(t.y,n.y,r.y),e(t.z,n.z,r.z)),_n=e=>(t,n,r)=>j(e(t.x,n.x,r.x),e(t.y,n.y,r.y),e(t.z,n.z,r.z),e(t.w,n.w,r.w)),Wn=e=>(t,n,r)=>ye(e(t.x,n.x,r.x),e(t.y,n.y,r.y),e(t.z,n.z,r.z),e(t.w,n.w,r.w)),i={eq:{vec2f:(e,t)=>G(e.x===t.x,e.y===t.y),vec2h:(e,t)=>G(e.x===t.x,e.y===t.y),vec2i:(e,t)=>G(e.x===t.x,e.y===t.y),vec2u:(e,t)=>G(e.x===t.x,e.y===t.y),"vec2<bool>":(e,t)=>G(e.x===t.x,e.y===t.y),vec3f:(e,t)=>N(e.x===t.x,e.y===t.y,e.z===t.z),vec3h:(e,t)=>N(e.x===t.x,e.y===t.y,e.z===t.z),vec3i:(e,t)=>N(e.x===t.x,e.y===t.y,e.z===t.z),vec3u:(e,t)=>N(e.x===t.x,e.y===t.y,e.z===t.z),"vec3<bool>":(e,t)=>N(e.x===t.x,e.y===t.y,e.z===t.z),vec4f:(e,t)=>O(e.x===t.x,e.y===t.y,e.z===t.z,e.w===t.w),vec4h:(e,t)=>O(e.x===t.x,e.y===t.y,e.z===t.z,e.w===t.w),vec4i:(e,t)=>O(e.x===t.x,e.y===t.y,e.z===t.z,e.w===t.w),vec4u:(e,t)=>O(e.x===t.x,e.y===t.y,e.z===t.z,e.w===t.w),"vec4<bool>":(e,t)=>O(e.x===t.x,e.y===t.y,e.z===t.z,e.w===t.w)},lt:{vec2f:(e,t)=>G(e.x<t.x,e.y<t.y),vec2h:(e,t)=>G(e.x<t.x,e.y<t.y),vec2i:(e,t)=>G(e.x<t.x,e.y<t.y),vec2u:(e,t)=>G(e.x<t.x,e.y<t.y),vec3f:(e,t)=>N(e.x<t.x,e.y<t.y,e.z<t.z),vec3h:(e,t)=>N(e.x<t.x,e.y<t.y,e.z<t.z),vec3i:(e,t)=>N(e.x<t.x,e.y<t.y,e.z<t.z),vec3u:(e,t)=>N(e.x<t.x,e.y<t.y,e.z<t.z),vec4f:(e,t)=>O(e.x<t.x,e.y<t.y,e.z<t.z,e.w<t.w),vec4h:(e,t)=>O(e.x<t.x,e.y<t.y,e.z<t.z,e.w<t.w),vec4i:(e,t)=>O(e.x<t.x,e.y<t.y,e.z<t.z,e.w<t.w),vec4u:(e,t)=>O(e.x<t.x,e.y<t.y,e.z<t.z,e.w<t.w)},or:{"vec2<bool>":(e,t)=>G(e.x||t.x,e.y||t.y),"vec3<bool>":(e,t)=>N(e.x||t.x,e.y||t.y,e.z||t.z),"vec4<bool>":(e,t)=>O(e.x||t.x,e.y||t.y,e.z||t.z,e.w||t.w)},all:{"vec2<bool>":e=>e.x&&e.y,"vec3<bool>":e=>e.x&&e.y&&e.z,"vec4<bool>":e=>e.x&&e.y&&e.z&&e.w},abs:{vec2f:h(Math.abs),vec2h:b(Math.abs),vec2i:Ae(Math.abs),vec2u:He(Math.abs),vec3f:f(Math.abs),vec3h:w(Math.abs),vec3i:ze(Math.abs),vec3u:Qe(Math.abs),vec4f:d(Math.abs),vec4h:M(Math.abs),vec4i:$e(Math.abs),vec4u:Xe(Math.abs)},atan2:{vec2f:me(Math.atan2),vec2h:he(Math.atan2),vec3f:ee(Math.atan2),vec3h:ve(Math.atan2),vec4f:Q(Math.atan2),vec4h:be(Math.atan2)},acos:{vec2f:h(Math.acos),vec2h:b(Math.acos),vec2i:Ae(Math.acos),vec2u:He(Math.acos),vec3f:f(Math.acos),vec3h:w(Math.acos),vec3i:ze(Math.acos),vec3u:Qe(Math.acos),vec4f:d(Math.acos),vec4h:M(Math.acos),vec4i:$e(Math.acos),vec4u:Xe(Math.acos)},acosh:{vec2f:h(Math.acosh),vec2h:b(Math.acosh),vec3f:f(Math.acosh),vec3h:w(Math.acosh),vec4f:d(Math.acosh),vec4h:M(Math.acosh)},asin:{vec2f:h(Math.asin),vec2h:b(Math.asin),vec3f:f(Math.asin),vec3h:w(Math.asin),vec4f:d(Math.asin),vec4h:M(Math.asin)},asinh:{vec2f:h(Math.asinh),vec2h:b(Math.asinh),vec3f:f(Math.asinh),vec3h:w(Math.asinh),vec4f:d(Math.asinh),vec4h:M(Math.asinh)},atan:{vec2f:h(Math.atan),vec2h:b(Math.atan),vec3f:f(Math.atan),vec3h:w(Math.atan),vec4f:d(Math.atan),vec4h:M(Math.atan)},atanh:{vec2f:h(Math.atanh),vec2h:b(Math.atanh),vec3f:f(Math.atanh),vec3h:w(Math.atanh),vec4f:d(Math.atanh),vec4h:M(Math.atanh)},ceil:{vec2f:h(Math.ceil),vec2h:b(Math.ceil),vec3f:f(Math.ceil),vec3h:w(Math.ceil),vec4f:d(Math.ceil),vec4h:M(Math.ceil)},clamp:{vec2f:(e,t,n)=>K(y(e.x,t.x,n.x),y(e.y,t.y,n.y)),vec2h:(e,t,n)=>pe(y(e.x,t.x,n.x),y(e.y,t.y,n.y)),vec2i:(e,t,n)=>We(y(e.x,t.x,n.x),y(e.y,t.y,n.y)),vec2u:(e,t,n)=>Ye(y(e.x,t.x,n.x),y(e.y,t.y,n.y)),vec3f:(e,t,n)=>W(y(e.x,t.x,n.x),y(e.y,t.y,n.y),y(e.z,t.z,n.z)),vec3h:(e,t,n)=>J(y(e.x,t.x,n.x),y(e.y,t.y,n.y),y(e.z,t.z,n.z)),vec3i:(e,t,n)=>Ue(y(e.x,t.x,n.x),y(e.y,t.y,n.y),y(e.z,t.z,n.z)),vec3u:(e,t,n)=>Je(y(e.x,t.x,n.x),y(e.y,t.y,n.y),y(e.z,t.z,n.z)),vec4f:(e,t,n)=>j(y(e.x,t.x,n.x),y(e.y,t.y,n.y),y(e.z,t.z,n.z),y(e.w,t.w,n.w)),vec4h:(e,t,n)=>ye(y(e.x,t.x,n.x),y(e.y,t.y,n.y),y(e.z,t.z,n.z),y(e.w,t.w,n.w)),vec4i:(e,t,n)=>Be(y(e.x,t.x,n.x),y(e.y,t.y,n.y),y(e.z,t.z,n.z),y(e.w,t.w,n.w)),vec4u:(e,t,n)=>et(y(e.x,t.x,n.x),y(e.y,t.y,n.y),y(e.z,t.z,n.z),y(e.w,t.w,n.w))},length:{vec2f:Me,vec2h:Me,vec3f:Se,vec3h:Se,vec4f:Ie,vec4h:Ie},add:{vec2f:me((e,t)=>e+t),vec2h:he((e,t)=>e+t),vec2i:Fe((e,t)=>e+t),vec2u:Ve((e,t)=>e+t),vec3f:ee((e,t)=>e+t),vec3h:ve((e,t)=>e+t),vec3i:Ce((e,t)=>e+t),vec3u:Pe((e,t)=>e+t),vec4f:Q((e,t)=>e+t),vec4h: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ve((e,t)=>e*t),vec3f:ee((e,t)=>e*t),vec3h:ve((e,t)=>e*t),vec3i:Ce((e,t)=>e*t),vec3u:Pe((e,t)=>e*t),vec4f:Q((e,t)=>e*t),vec4h:be((e,t)=>e*t),vec4i:ke((e,t)=>e*t),vec4u:_e((e,t)=>e*t),mat2x2f:(e,t)=>{let n=e.columns,r=t.columns;return ce(n[0].x*r[0].x+n[1].x*r[0].y,n[0].y*r[0].x+n[1].y*r[0].y,n[0].x*r[1].x+n[1].x*r[1].y,n[0].y*r[1].x+n[1].y*r[1].y)},mat3x3f:(e,t)=>{let n=e.columns,r=t.columns;return ie(n[0].x*r[0].x+n[1].x*r[0].y+n[2].x*r[0].z,n[0].y*r[0].x+n[1].y*r[0].y+n[2].y*r[0].z,n[0].z*r[0].x+n[1].z*r[0].y+n[2].z*r[0].z,n[0].x*r[1].x+n[1].x*r[1].y+n[2].x*r[1].z,n[0].y*r[1].x+n[1].y*r[1].y+n[2].y*r[1].z,n[0].z*r[1].x+n[1].z*r[1].y+n[2].z*r[1].z,n[0].x*r[2].x+n[1].x*r[2].y+n[2].x*r[2].z,n[0].y*r[2].x+n[1].y*r[2].y+n[2].y*r[2].z,n[0].z*r[2].x+n[1].z*r[2].y+n[2].z*r[2].z)},mat4x4f:(e,t)=>{let n=e.columns,r=t.columns;return A(n[0].x*r[0].x+n[1].x*r[0].y+n[2].x*r[0].z+n[3].x*r[0].w,n[0].y*r[0].x+n[1].y*r[0].y+n[2].y*r[0].z+n[3].y*r[0].w,n[0].z*r[0].x+n[1].z*r[0].y+n[2].z*r[0].z+n[3].z*r[0].w,n[0].w*r[0].x+n[1].w*r[0].y+n[2].w*r[0].z+n[3].w*r[0].w,n[0].x*r[1].x+n[1].x*r[1].y+n[2].x*r[1].z+n[3].x*r[1].w,n[0].y*r[1].x+n[1].y*r[1].y+n[2].y*r[1].z+n[3].y*r[1].w,n[0].z*r[1].x+n[1].z*r[1].y+n[2].z*r[1].z+n[3].z*r[1].w,n[0].w*r[1].x+n[1].w*r[1].y+n[2].w*r[1].z+n[3].w*r[1].w,n[0].x*r[2].x+n[1].x*r[2].y+n[2].x*r[2].z+n[3].x*r[2].w,n[0].y*r[2].x+n[1].y*r[2].y+n[2].y*r[2].z+n[3].y*r[2].w,n[0].z*r[2].x+n[1].z*r[2].y+n[2].z*r[2].z+n[3].z*r[2].w,n[0].w*r[2].x+n[1].w*r[2].y+n[2].w*r[2].z+n[3].w*r[2].w,n[0].x*r[3].x+n[1].x*r[3].y+n[2].x*r[3].z+n[3].x*r[3].w,n[0].y*r[3].x+n[1].y*r[3].y+n[2].y*r[3].z+n[3].y*r[3].w,n[0].z*r[3].x+n[1].z*r[3].y+n[2].z*r[3].z+n[3].z*r[3].w,n[0].w*r[3].x+n[1].w*r[3].y+n[2].w*r[3].z+n[3].w*r[3].w)}},mulMxV:{mat2x2f:(e,t)=>{let n=e.columns;return K(n[0].x*t.x+n[1].x*t.y,n[0].y*t.x+n[1].y*t.y)},mat3x3f:(e,t)=>{let n=e.columns;return W(n[0].x*t.x+n[1].x*t.y+n[2].x*t.z,n[0].y*t.x+n[1].y*t.y+n[2].y*t.z,n[0].z*t.x+n[1].z*t.y+n[2].z*t.z)},mat4x4f:(e,t)=>{let n=e.columns;return j(n[0].x*t.x+n[1].x*t.y+n[2].x*t.z+n[3].x*t.w,n[0].y*t.x+n[1].y*t.y+n[2].y*t.z+n[3].y*t.w,n[0].z*t.x+n[1].z*t.y+n[2].z*t.z+n[3].z*t.w,n[0].w*t.x+n[1].w*t.y+n[2].w*t.z+n[3].w*t.w)}},mulVxM:{mat2x2f:(e,t)=>{let n=t.columns;return K(e.x*n[0].x+e.y*n[0].y,e.x*n[1].x+e.y*n[1].y)},mat3x3f:(e,t)=>{let n=t.columns;return W(e.x*n[0].x+e.y*n[0].y+e.z*n[0].z,e.x*n[1].x+e.y*n[1].y+e.z*n[1].z,e.x*n[2].x+e.y*n[2].y+e.z*n[2].z)},mat4x4f:(e,t)=>{let n=t.columns;return j(e.x*n[0].x+e.y*n[0].y+e.z*n[0].z+e.w*n[0].w,e.x*n[1].x+e.y*n[1].y+e.z*n[1].z+e.w*n[1].w,e.x*n[2].x+e.y*n[2].y+e.z*n[2].z+e.w*n[2].w,e.x*n[3].x+e.y*n[3].y+e.z*n[3].z+e.w*n[3].w)}},div:{vec2f:me((e,t)=>e/t),vec2h:he((e,t)=>e/t),vec2i:Fe(ge),vec2u:Ve(ge),vec3f:ee((e,t)=>e/t),vec3h:ve((e,t)=>e/t),vec3i:Ce(ge),vec3u:Pe(ge),vec4f:Q((e,t)=>e/t),vec4h:be((e,t)=>e/t),vec4i:ke(ge),vec4u:_e(ge)},dot:{vec2f:lt,vec2h:lt,vec2i:lt,vec2u:lt,vec3f:mt,vec3h:mt,vec3i:mt,vec3u:mt,vec4f:pt,vec4h:pt,vec4i:pt,vec4u:pt},normalize:{vec2f:e=>{let t=Me(e);return K(e.x/t,e.y/t)},vec2h:e=>{let t=Me(e);return pe(e.x/t,e.y/t)},vec2i:e=>{let t=Me(e);return We(e.x/t,e.y/t)},vec2u:e=>{let t=Me(e);return Ye(e.x/t,e.y/t)},vec3f:e=>{let t=Se(e);return W(e.x/t,e.y/t,e.z/t)},vec3h:e=>{let t=Se(e);return J(e.x/t,e.y/t,e.z/t)},vec3i:e=>{let t=Se(e);return Ue(e.x/t,e.y/t,e.z/t)},vec3u:e=>{let t=Se(e);return Je(e.x/t,e.y/t,e.z/t)},vec4f:e=>{let t=Ie(e);return j(e.x/t,e.y/t,e.z/t,e.w/t)},vec4h:e=>{let t=Ie(e);return ye(e.x/t,e.y/t,e.z/t,e.w/t)},vec4i:e=>{let t=Ie(e);return Be(e.x/t,e.y/t,e.z/t,e.w/t)},vec4u:e=>{let t=Ie(e);return et(e.x/t,e.y/t,e.z/t,e.w/t)}},cross:{vec3f:(e,t)=>W(e.y*t.z-e.z*t.y,e.z*t.x-e.x*t.z,e.x*t.y-e.y*t.x),vec3h:(e,t)=>J(e.y*t.z-e.z*t.y,e.z*t.x-e.x*t.z,e.x*t.y-e.y*t.x)},mod:{vec2f:me((e,t)=>e%t),vec2h:he((e,t)=>e%t),vec2i:Fe((e,t)=>e%t),vec2u:Ve((e,t)=>e%t),vec3f:ee((e,t)=>e%t),vec3h:ve((e,t)=>e%t),vec3i:Ce((e,t)=>e%t),vec3u:Pe((e,t)=>e%t),vec4f:Q((e,t)=>e%t),vec4h:be((e,t)=>e%t),vec4i:ke((e,t)=>e%t),vec4u:_e((e,t)=>e%t)},floor:{vec2f:h(Math.floor),vec2h:b(Math.floor),vec3f:f(Math.floor),vec3h:w(Math.floor),vec4f:d(Math.floor),vec4h:M(Math.floor)},max:{vec2f:me(Math.max),vec2h:he(Math.max),vec2i:Fe(Math.max),vec2u:Ve(Math.max),vec3f:ee(Math.max),vec3h:ve(Math.max),vec3i:Ce(Math.max),vec3u:Pe(Math.max),vec4f:Q(Math.max),vec4h:be(Math.max),vec4i:ke(Math.max),vec4u:_e(Math.max)},min:{vec2f:me(Math.min),vec2h:he(Math.min),vec2i:Fe(Math.min),vec2u:Ve(Math.min),vec3f:ee(Math.min),vec3h:ve(Math.min),vec3i:Ce(Math.min),vec3u:Pe(Math.min),vec4f:Q(Math.min),vec4h:be(Math.min),vec4i:ke(Math.min),vec4u:_e(Math.min)},pow:{vec2f:(e,t)=>K(e.x**t.x,e.y**t.y),vec2h:(e,t)=>pe(e.x**t.x,e.y**t.y),vec3f:(e,t)=>W(e.x**t.x,e.y**t.y,e.z**t.z),vec3h:(e,t)=>J(e.x**t.x,e.y**t.y,e.z**t.z),vec4f:(e,t)=>j(e.x**t.x,e.y**t.y,e.z**t.z,e.w**t.w),vec4h:(e,t)=>ye(e.x**t.x,e.y**t.y,e.z**t.z,e.w**t.w)},sign:{vec2f:h(Math.sign),vec2h:b(Math.sign),vec2i:Ae(Math.sign),vec3f:f(Math.sign),vec3h:w(Math.sign),vec3i:ze(Math.sign),vec4f:d(Math.sign),vec4h:M(Math.sign),vec4i:$e(Math.sign)},sqrt:{vec2f:h(Math.sqrt),vec2h:b(Math.sqrt),vec3f:f(Math.sqrt),vec3h:w(Math.sqrt),vec4f:d(Math.sqrt),vec4h:M(Math.sqrt)},mix:{vec2f:(e,t,n)=>typeof n=="number"?K(e.x*(1-n)+t.x*n,e.y*(1-n)+t.y*n):K(e.x*(1-n.x)+t.x*n.x,e.y*(1-n.y)+t.y*n.y),vec2h:(e,t,n)=>typeof n=="number"?pe(e.x*(1-n)+t.x*n,e.y*(1-n)+t.y*n):pe(e.x*(1-n.x)+t.x*n.x,e.y*(1-n.y)+t.y*n.y),vec3f:(e,t,n)=>typeof n=="number"?W(e.x*(1-n)+t.x*n,e.y*(1-n)+t.y*n,e.z*(1-n)+t.z*n):W(e.x*(1-n.x)+t.x*n.x,e.y*(1-n.y)+t.y*n.y,e.z*(1-n.z)+t.z*n.z),vec3h:(e,t,n)=>typeof n=="number"?J(e.x*(1-n)+t.x*n,e.y*(1-n)+t.y*n,e.z*(1-n)+t.z*n):J(e.x*(1-n.x)+t.x*n.x,e.y*(1-n.y)+t.y*n.y,e.z*(1-n.z)+t.z*n.z),vec4f:(e,t,n)=>typeof n=="number"?j(e.x*(1-n)+t.x*n,e.y*(1-n)+t.y*n,e.z*(1-n)+t.z*n,e.w*(1-n)+t.w*n):j(e.x*(1-n.x)+t.x*n.x,e.y*(1-n.y)+t.y*n.y,e.z*(1-n.z)+t.z*n.z,e.w*(1-n.w)+t.w*n.w),vec4h:(e,t,n)=>typeof n=="number"?ye(e.x*(1-n)+t.x*n,e.y*(1-n)+t.y*n,e.z*(1-n)+t.z*n,e.w*(1-n)+t.w*n):ye(e.x*(1-n.x)+t.x*n.x,e.y*(1-n.y)+t.y*n.y,e.z*(1-n.z)+t.z*n.z,e.w*(1-n.w)+t.w*n.w)},sin:{vec2f:h(Math.sin),vec2h:b(Math.sin),vec3f:f(Math.sin),vec3h:w(Math.sin),vec4f:d(Math.sin),vec4h:M(Math.sin)},cos:{vec2f:h(Math.cos),vec2h:b(Math.cos),vec3f:f(Math.cos),vec3h:w(Math.cos),vec4f:d(Math.cos),vec4h:M(Math.cos)},cosh:{vec2f:h(Math.cosh),vec2h:b(Math.cosh),vec3f:f(Math.cosh),vec3h:w(Math.cosh),vec4f:d(Math.cosh),vec4h:M(Math.cosh)},exp:{vec2f:h(Math.exp),vec2h:b(Math.exp),vec3f:f(Math.exp),vec3h:w(Math.exp),vec4f:d(Math.exp),vec4h:M(Math.exp)},exp2:{vec2f:h(e=>2**e),vec2h:b(e=>2**e),vec3f:f(e=>2**e),vec3h:w(e=>2**e),vec4f:d(e=>2**e),vec4h:M(e=>2**e)},log:{vec2f:h(Math.log),vec2h:b(Math.log),vec3f:f(Math.log),vec3h:w(Math.log),vec4f:d(Math.log),vec4h:M(Math.log)},log2:{vec2f:h(Math.log2),vec2h:b(Math.log2),vec3f:f(Math.log2),vec3h:w(Math.log2),vec4f:d(Math.log2),vec4h:M(Math.log2)},fract:{vec2f:h(e=>e-Math.floor(e)),vec2h:b(e=>e-Math.floor(e)),vec3f:f(e=>e-Math.floor(e)),vec3h:w(e=>e-Math.floor(e)),vec4f:d(e=>e-Math.floor(e)),vec4h:M(e=>e-Math.floor(e))},isCloseToZero:{vec2f:(e,t)=>Math.abs(e.x)<=t&&Math.abs(e.y)<=t,vec2h:(e,t)=>Math.abs(e.x)<=t&&Math.abs(e.y)<=t,vec3f:(e,t)=>Math.abs(e.x)<=t&&Math.abs(e.y)<=t&&Math.abs(e.z)<=t,vec3h:(e,t)=>Math.abs(e.x)<=t&&Math.abs(e.y)<=t&&Math.abs(e.z)<=t,vec4f:(e,t)=>Math.abs(e.x)<=t&&Math.abs(e.y)<=t&&Math.abs(e.z)<=t&&Math.abs(e.w)<=t,vec4h:(e,t)=>Math.abs(e.x)<=t&&Math.abs(e.y)<=t&&Math.abs(e.z)<=t&&Math.abs(e.w)<=t},neg:{vec2f:h(e=>-e),vec2h:b(e=>-e),vec2i:Ae(e=>-e),vec2u:He(e=>-e),"vec2<bool>":e=>G(!e.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(Math.tanh),vec3h:w(Math.tanh),vec4f:d(Math.tanh),vec4h:M(Math.tanh)},bitcastU32toF32:{vec2u:e=>K(X(e.x),X(e.y)),vec3u:e=>W(X(e.x),X(e.y),X(e.z)),vec4u:e=>j(X(e.x),X(e.y),X(e.z),X(e.w))},bitcastU32toI32:{vec2u:e=>We(Y(e.x),Y(e.y)),vec3u:e=>Ue(Y(e.x),Y(e.y),Y(e.z)),vec4u:e=>Be(Y(e.x),Y(e.y),Y(e.z),Y(e.w))}};function Jt(e,t){if(typeof e=="number"&&typeof t=="number")return e+t;if(typeof e=="number"&&v(t))return i.addMixed[t.kind](t,e);if(v(e)&&typeof t=="number")return i.addMixed[e.kind](e,t);if(v(e)&&v(t)||q(e)&&q(t))return i.add[e.kind](e,t);throw new Error("Add/Sub called with invalid arguments.")}var kt=u({name:"add",signature:(...e)=>{let t=V(e)??e;return{argTypes:t,returnType:Z(t[0])?t[1]:t[0]}},normalImpl:Jt,codegenImpl:(e,t)=>o`(${e} + ${t})`});function Un(e,t){return Jt(e,en(-1,t))}var De=u({name:"sub",signature:(...e)=>{let t=V(e)??e;return{argTypes:t,returnType:Z(t[0])?t[1]:t[0]}},normalImpl:Un,codegenImpl:(e,t)=>o`(${e} - ${t})`});function en(e,t){if(typeof e=="number"&&typeof t=="number")return e*t;if(typeof e=="number"&&(v(t)||q(t)))return i.mulSxV[t.kind](e,t);if((v(e)||q(e))&&typeof t=="number")return i.mulSxV[e.kind](t,e);if(v(e)&&v(t))return i.mulVxV[e.kind](e,t);if(ht(e)&&q(t))return i.mulVxM[t.kind](e,t);if(q(e)&&ht(t))return i.mulMxV[e.kind](e,t);if(q(e)&&q(t))return i.mulVxV[e.kind](e,t);throw new Error("Mul called with invalid arguments.")}var tt=u({name:"mul",signature:(...e)=>{let t=V(e)??e,n=Z(t[0])?t[1]:Z(t[1])||t[0].type.startsWith("vec")?t[0]:t[1].type.startsWith("vec")?t[1]:t[0];return{argTypes:t,returnType:n}},normalImpl:en,codegenImpl:(e,t)=>o`(${e} * ${t})`});function Bn(e,t){if(typeof e=="number"&&typeof t=="number")return e/t;if(typeof e=="number"&&v(t)){let n=qe[t.kind][m].jsImpl;return i.div[t.kind](n(e),t)}if(v(e)&&typeof t=="number"){let n=qe[e.kind][m].jsImpl;return i.div[e.kind](e,n(t))}if(v(e)&&v(t))return i.div[e.kind](e,t);throw new Error("Div called with invalid arguments.")}var _t=u({name:"div",signature:(...e)=>{let t=V(e,[x,F,C])??e;return{argTypes:t,returnType:Z(t[0])?t[1]:t[0]}},normalImpl:Bn,codegenImpl:(e,t)=>ot`(${e} / ${t})`,ignoreImplicitCastWarning:!0}),Is=u({name:"mod",signature:(...e)=>{let t=V(e)??e;return{argTypes:t,returnType:Z(t[0])?t[1]:t[0]}},normalImpl(e,t){if(typeof e=="number"&&typeof t=="number")return e%t;if(typeof e=="number"&&v(t)){let n=qe[t.kind];return i.mod[t.kind](n(e),t)}if(v(e)&&typeof t=="number"){let n=qe[e.kind];return i.mod[e.kind](e,n(t))}if(v(e)&&v(t))return i.mod[e.kind](e,t);throw new Error("Mod called with invalid arguments, expected types: number or vector.")},codegenImpl:(e,t)=>o`(${e} % ${t})`});function Dn(e){return typeof e=="number"?-e:i.neg[e.kind](e)}var As=u({name:"neg",signature:e=>({argTypes:[e],returnType:e}),normalImpl:Dn,codegenImpl:e=>o`-(${e})`});function Rn(e){return typeof e=="number"?Math.abs(e):i.abs[e.kind](e)}var Rs=u({name:"abs",signature:e=>({argTypes:[e],returnType:e}),normalImpl:Rn,codegenImpl:e=>o`abs(${e})`});function En(e){return typeof e=="number"?Math.acos(e):i.acos[e.kind](e)}var Es=u({name:"acos",signature:e=>({argTypes:[e],returnType:e}),normalImpl:En,codegenImpl:e=>o`acos(${e})`});function Ln(e){return typeof e=="number"?Math.acosh(e):i.acosh[e.kind](e)}var Ls=u({name:"acosh",signature:e=>({argTypes:[e],returnType:e}),normalImpl:Ln,codegenImpl:e=>o`acosh(${e})`});function Gn(e){return typeof e=="number"?Math.asin(e):i.asin[e.kind](e)}var Gs=u({name:"asin",signature:e=>({argTypes:[e],returnType:e}),normalImpl:Gn,codegenImpl:e=>o`asin(${e})`});function Nn(e){return typeof e=="number"?Math.asinh(e):i.asinh[e.kind](e)}var Ns=u({name:"asinh",signature:e=>({argTypes:[e],returnType:e}),normalImpl:Nn,codegenImpl:e=>o`asinh(${e})`});function On(e){return typeof e=="number"?Math.atan(e):i.atan[e.kind](e)}var Os=u({name:"atan",signature:e=>({argTypes:[e],returnType:e}),normalImpl:On,codegenImpl:e=>o`atan(${e})`});function Kn(e){return typeof e=="number"?Math.atanh(e):i.atanh[e.kind](e)}var Ks=u({name:"atanh",signature:e=>({argTypes:[e],returnType:e}),normalImpl:Kn,codegenImpl:e=>o`atanh(${e})`});function jn(e,t){return typeof e=="number"&&typeof t=="number"?Math.atan2(e,t):i.atan2[e.kind](e,t)}var js=u({name:"atan2",signature:(...e)=>{let t=V(e,[x,F,C])??e;return{argTypes:t,returnType:t[0]}},normalImpl:jn,codegenImpl:(e,t)=>o`atan2(${e}, ${t})`});function qn(e){return typeof e=="number"?Math.ceil(e):i.ceil[e.kind](e)}var qs=u({name:"ceil",signature:e=>({argTypes:[e],returnType:e}),normalImpl:qn,codegenImpl:e=>o`ceil(${e})`});function Zn(e,t,n){return typeof e=="number"?Math.min(Math.max(t,e),n):i.clamp[e.kind](e,t,n)}var Zs=u({name:"clamp",signature:(...e)=>{let t=V(e)??e;return{argTypes:t,returnType:t[0]}},normalImpl:Zn,codegenImpl:(e,t,n)=>o`clamp(${e}, ${t}, ${n})`});function Hn(e){return typeof e=="number"?Math.cos(e):i.cos[e.kind](e)}var Hs=u({name:"cos",signature:e=>({argTypes:[e],returnType:e}),normalImpl:Hn,codegenImpl:e=>o`cos(${e})`});function Qn(e){return typeof e=="number"?Math.cosh(e):i.cosh[e.kind](e)}var Qs=u({name:"cosh",signature:e=>({argTypes:[e],returnType:e}),normalImpl:Qn,codegenImpl:e=>o`cosh(${e})`});var Xs=u({name:"countLeadingZeros",signature:e=>({argTypes:[e],returnType:e}),normalImpl:"CPU implementation for countLeadingZeros not implemented yet. Please submit an issue at https://github.com/software-mansion/TypeGPU/issues",codegenImpl:e=>o`countLeadingZeros(${e})`});var Ys=u({name:"countOneBits",signature:e=>({argTypes:[e],returnType:e}),normalImpl:"CPU implementation for countOneBits not implemented yet. Please submit an issue at https://github.com/software-mansion/TypeGPU/issues",codegenImpl:e=>o`countOneBits(${e})`});var Js=u({name:"countTrailingZeros",signature:e=>({argTypes:[e],returnType:e}),normalImpl:"CPU implementation for countTrailingZeros not implemented yet. Please submit an issue at https://github.com/software-mansion/TypeGPU/issues",codegenImpl:e=>o`countTrailingZeros(${e})`}),ea=u({name:"cross",signature:(e,t)=>({argTypes:[e,t],returnType:e}),normalImpl:(e,t)=>i.cross[e.kind](e,t),codegenImpl:(e,t)=>o`cross(${e}, ${t})`});function Xn(e){if(typeof e=="number")return e*180/Math.PI;throw new B("CPU implementation for degrees on vectors not implemented yet. Please submit an issue at https://github.com/software-mansion/TypeGPU/issues")}var ta=u({name:"degrees",signature:e=>({argTypes:[e],returnType:e}),normalImpl:Xn,codegenImpl:e=>o`degrees(${e})`}),na=u({name:"determinant",signature:e=>({argTypes:[e],returnType:x}),normalImpl:"CPU implementation for determinant not implemented yet. Please submit an issue at https://github.com/software-mansion/TypeGPU/issues",codegenImpl:e=>o`determinant(${e})`});function Yn(e,t){return typeof e=="number"&&typeof t=="number"?Math.abs(e-t):cr(De(e,t))}var ra=u({name:"distance",signature:(e,t)=>({argTypes:[e,t],returnType:st(e)?F:x}),normalImpl:Yn,codegenImpl:(e,t)=>o`distance(${e}, ${t})`}),Jn=u({name:"dot",signature:(e,t)=>({argTypes:[e,t],returnType:e.primitive}),normalImpl:(e,t)=>i.dot[e.kind](e,t),codegenImpl:(e,t)=>o`dot(${e}, ${t})`}),sa=u({name:"dot4U8Packed",signature:(e,t)=>({argTypes:[P,P],returnType:P}),normalImpl:"CPU implementation for dot4U8Packed not implemented yet. Please submit an issue at https://github.com/software-mansion/TypeGPU/issues",codegenImpl:(e,t)=>o`dot4U8Packed(${e}, ${t})`}),aa=u({name:"dot4I8Packed",signature:(e,t)=>({argTypes:[P,P],returnType:xe}),normalImpl:"CPU implementation for dot4I8Packed not implemented yet. Please submit an issue at https://github.com/software-mansion/TypeGPU/issues",codegenImpl:(e,t)=>o`dot4I8Packed(${e}, ${t})`});function er(e){return typeof e=="number"?Math.exp(e):i.exp[e.kind](e)}var oa=u({name:"exp",signature:e=>({argTypes:[e],returnType:e}),normalImpl:er,codegenImpl:e=>o`exp(${e})`});function tr(e){return typeof e=="number"?2**e:i.exp2[e.kind](e)}var ua=u({name:"exp2",signature:e=>({argTypes:[e],returnType:e}),normalImpl:tr,codegenImpl:e=>o`exp2(${e})`});var ca=u({name:"extractBits",signature:(e,t,n)=>({argTypes:[e,P,P],returnType:e}),normalImpl:"CPU implementation for extractBits not implemented yet. Please submit an issue at https://github.com/software-mansion/TypeGPU/issues",codegenImpl:(e,t,n)=>o`extractBits(${e}, ${t}, ${n})`}),ia=u({name:"faceForward",signature:(e,t,n)=>({argTypes:[e,t,n],returnType:e}),normalImpl:"CPU implementation for faceForward not implemented yet. Please submit an issue at https://github.com/software-mansion/TypeGPU/issues",codegenImpl:(e,t,n)=>o`faceForward(${e}, ${t}, ${n})`});var la=u({name:"firstLeadingBit",signature:e=>({argTypes:[e],returnType:e}),normalImpl:"CPU implementation for firstLeadingBit not implemented yet. Please submit an issue at https://github.com/software-mansion/TypeGPU/issues",codegenImpl:e=>o`firstLeadingBit(${e})`});var ma=u({name:"firstTrailingBit",signature:e=>({argTypes:[e],returnType:e}),normalImpl:"CPU implementation for firstTrailingBit not implemented yet. Please submit an issue at https://github.com/software-mansion/TypeGPU/issues",codegenImpl:e=>o`firstTrailingBit(${e})`});function nr(e){return typeof e=="number"?Math.floor(e):i.floor[e.kind](e)}var pa=u({name:"floor",signature:(...e)=>({argTypes:e,returnType:e[0]}),normalImpl:nr,codegenImpl:e=>o`floor(${e})`});function rr(e,t,n){if(typeof e=="number")return e*t+n;throw new B("CPU implementation for fma on vectors not implemented yet. Please submit an issue at https://github.com/software-mansion/TypeGPU/issues")}var ya=u({name:"fma",signature:(e,t,n)=>({argTypes:[e,t,n],returnType:e}),normalImpl:rr,codegenImpl:(e,t,n)=>o`fma(${e}, ${t}, ${n})`});function sr(e){return typeof e=="number"?e-Math.floor(e):i.fract[e.kind](e)}var xa=u({name:"fract",signature:(...e)=>({argTypes:e,returnType:e[0]}),normalImpl:sr,codegenImpl:e=>o`fract(${e})`}),ar={f32:I({fract:x,exp:xe}),f16:I({fract:F,exp:xe}),abstractFloat:I({fract:C,exp:fe}),vec2f:I({fract:D,exp:re}),vec3f:I({fract:R,exp:ae}),vec4f:I({fract:E,exp:ue}),vec2h:I({fract:ne,exp:re}),vec3h:I({fract:se,exp:ae}),vec4h:I({fract:oe,exp:ue})},Ta=_(e=>{throw new B("CPU implementation for frexp not implemented yet. Please submit an issue at https://github.com/software-mansion/TypeGPU/issues")},e=>{let t=ar[e.dataType.type];if(!t)throw new Error(`Unsupported data type for frexp: ${e.dataType.type}. Supported types are f32, f16, abstractFloat, vec2f, vec3f, vec4f, vec2h, vec3h, vec4h.`);return l(o`frexp(${e})`,t)},"frexp");var da=u({name:"insertBits",signature:(e,t,n,r)=>({argTypes:[e,t,P,P],returnType:e}),normalImpl:"CPU implementation for insertBits not implemented yet. Please submit an issue at https://github.com/software-mansion/TypeGPU/issues",codegenImpl:(e,t,n,r)=>o`insertBits(${e}, ${t}, ${n}, ${r})`});function or(e){if(typeof e=="number")return 1/Math.sqrt(e);throw new B("CPU implementation for inverseSqrt on vectors not implemented yet. Please submit an issue at https://github.com/software-mansion/TypeGPU/issues")}var fa=u({name:"inverseSqrt",signature:e=>({argTypes:[e],returnType:e}),normalImpl:or,codegenImpl:e=>o`inverseSqrt(${e})`});var ga=u({name:"ldexp",signature:(e,t)=>{switch(e.type){case"abstractFloat":return{argTypes:[C,fe],returnType:e};case"f32":case"f16":return{argTypes:[e,xe],returnType:e};case"vec2f":case"vec2h":return{argTypes:[e,re],returnType:e};case"vec3f":case"vec3h":return{argTypes:[e,ae],returnType:e};case"vec4f":case"vec4h":return{argTypes:[e,ue],returnType:e};default:throw new Error(`Unsupported data type for ldexp: ${e.type}. Supported types are abstractFloat, f32, f16, vec2f, vec2h, vec3f, vec3h, vec4f, vec4h.`)}},normalImpl:"CPU implementation for ldexp not implemented yet. Please submit an issue at https://github.com/software-mansion/TypeGPU/issues",codegenImpl:(e,t)=>o`ldexp(${e}, ${t})`});function ur(e){return typeof e=="number"?Math.abs(e):i.length[e.kind](e)}var cr=u({name:"length",signature:e=>({argTypes:[e],returnType:st(e)?F:x}),normalImpl:ur,codegenImpl:e=>o`length(${e})`});function ir(e){return typeof e=="number"?Math.log(e):i.log[e.kind](e)}var ha=u({name:"log",signature:e=>({argTypes:[e],returnType:e}),normalImpl:ir,codegenImpl:e=>o`log(${e})`});function lr(e){return typeof e=="number"?Math.log2(e):i.log2[e.kind](e)}var va=u({name:"log2",signature:e=>({argTypes:[e],returnType:e}),normalImpl:lr,codegenImpl:e=>o`log2(${e})`});function mr(e,t){return typeof e=="number"?Math.max(e,t):i.max[e.kind](e,t)}var ba=u({name:"max",signature:(...e)=>{let t=V(e)??e;return{argTypes:t,returnType:t[0]}},normalImpl:mr,codegenImpl:(e,t)=>o`max(${e}, ${t})`});function pr(e,t){return typeof e=="number"?Math.min(e,t):i.min[e.kind](e,t)}var wa=u({name:"min",signature:(...e)=>{let t=V(e)??e;return{argTypes:t,returnType:t[0]}},normalImpl:pr,codegenImpl:(e,t)=>o`min(${e}, ${t})`});function yr(e,t,n){if(typeof e=="number"){if(typeof n!="number"||typeof t!="number")throw new Error("When e1 and e2 are numbers, the blend factor must be a number.");return e*(1-n)+t*n}if(typeof e=="number"||typeof t=="number")throw new Error("e1 and e2 need to both be vectors of the same kind.");return i.mix[e.kind](e,t,n)}var Ma=u({name:"mix",signature:(e,t,n)=>({argTypes:[e,t,n],returnType:e}),normalImpl:yr,codegenImpl:(e,t,n)=>o`mix(${e}, ${t}, ${n})`}),xr={f32:I({fract:x,whole:x}),f16:I({fract:F,whole:F}),abstractFloat:I({fract:C,whole:C}),vec2f:I({fract:D,whole:D}),vec3f:I({fract:R,whole:R}),vec4f:I({fract:E,whole:E}),vec2h:I({fract:ne,whole:ne}),vec3h:I({fract:se,whole:se}),vec4h:I({fract:oe,whole:oe})};var Sa=u({name:"modf",signature:e=>{let t=xr[e.type];if(!t)throw new Error(`Unsupported data type for modf: ${e.type}. Supported types are f32, f16, abstractFloat, vec2f, vec3f, vec4f, vec2h, vec3h, vec4h.`);return{argTypes:[e],returnType:t}},normalImpl:"CPU implementation for modf not implemented yet. Please submit an issue at https://github.com/software-mansion/TypeGPU/issues",codegenImpl:e=>o`modf(${e})`}),Ia=u({name:"normalize",signature:e=>({argTypes:[e],returnType:e}),normalImpl:e=>i.normalize[e.kind](e),codegenImpl:e=>o`normalize(${e})`});function Tr(e,t){if(typeof e=="number"&&typeof t=="number")return e**t;if(v(e)&&v(t))return i.pow[e.kind](e,t);throw new Error("Invalid arguments to pow()")}var tn=u({name:"pow",signature:(...e)=>{let t=V(e,[x,F,C])??e;return{argTypes:t,returnType:Z(t[0])?t[1]:t[0]}},normalImpl:Tr,codegenImpl:(e,t)=>o`pow(${e}, ${t})`});var Aa=u({name:"quantizeToF16",signature:e=>({argTypes:[e],returnType:e}),normalImpl:"CPU implementation for quantizeToF16 not implemented yet. Please submit an issue at https://github.com/software-mansion/TypeGPU/issues",codegenImpl:e=>o`quantizeToF16(${e})`});function dr(e){if(typeof e=="number")return e*Math.PI/180;throw new B("CPU implementation for radians on vectors not implemented yet. Please submit an issue at https://github.com/software-mansion/TypeGPU/issues")}var za=u({name:"radians",signature:(...e)=>{let t=V(e,[x,F,C])??e;return{argTypes:t,returnType:t[0]}},normalImpl:dr,codegenImpl:e=>o`radians(${e})`}),$a=u({name:"reflect",signature:(e,t)=>({argTypes:[e,t],returnType:e}),normalImpl:(e,t)=>De(e,tt(2*Jn(t,e),t)),codegenImpl:(e,t)=>o`reflect(${e}, ${t})`}),Fa=_((e,t,n)=>{throw new B("CPU implementation for refract not implemented yet. Please submit an issue at https://github.com/software-mansion/TypeGPU/issues")},(e,t,n)=>l(o`refract(${e}, ${t}, ${n})`,e.dataType),"refract",(e,t,n)=>[e.dataType,t.dataType,st(e)?F:x]);var Va=u({name:"reverseBits",signature:e=>({argTypes:[e],returnType:e}),normalImpl:"CPU implementation for reverseBits not implemented yet. Please submit an issue at https://github.com/software-mansion/TypeGPU/issues",codegenImpl:e=>o`reverseBits(${e})`});function fr(e){if(typeof e=="number")return Math.round(e);throw new B("CPU implementation for round on vectors not implemented yet. Please submit an issue at https://github.com/software-mansion/TypeGPU/issues")}var Ca=u({name:"round",signature:e=>({argTypes:[e],returnType:e}),normalImpl:fr,codegenImpl:e=>o`round(${e})`});function gr(e){if(typeof e=="number")return Math.max(0,Math.min(1,e));throw new B("CPU implementation for saturate on vectors not implemented yet. Please submit an issue at https://github.com/software-mansion/TypeGPU/issues")}var Pa=u({name:"saturate",signature:e=>({argTypes:[e],returnType:e}),normalImpl:gr,codegenImpl:e=>o`saturate(${e})`});function hr(e){return typeof e=="number"?Math.sign(e):i.sign[e.kind](e)}var ka=u({name:"sign",signature:e=>({argTypes:[e],returnType:e}),normalImpl:hr,codegenImpl:e=>o`sign(${e})`});function vr(e){return typeof e=="number"?Math.sin(e):i.sin[e.kind](e)}var _a=u({name:"sin",signature:e=>({argTypes:[e],returnType:e}),normalImpl:vr,codegenImpl:e=>o`sin(${e})`});function br(e){if(typeof e=="number")return Math.sinh(e);throw new B("CPU implementation for sinh on vectors not implemented yet. Please submit an issue at https://github.com/software-mansion/TypeGPU/issues")}var Wa=u({name:"sinh",signature:e=>({argTypes:[e],returnType:e}),normalImpl:br,codegenImpl:e=>o`sinh(${e})`});function wr(e,t,n){return typeof n=="number"?le(e,t,n):i.smoothstep[n.kind](e,t,n)}var Ua=u({name:"smoothstep",signature:(e,t,n)=>({argTypes:[e,t,n],returnType:n}),normalImpl:wr,codegenImpl:(e,t,n)=>o`smoothstep(${e}, ${t}, ${n})`});function Mr(e){return typeof e=="number"?Math.sqrt(e):i.sqrt[e.kind](e)}var Ba=u({name:"sqrt",signature:e=>({argTypes:[e],returnType:e}),normalImpl:Mr,codegenImpl:e=>o`sqrt(${e})`});function Sr(e,t){if(typeof e=="number")return e<=t?1:0;throw new B("CPU implementation for step on vectors not implemented yet. Please submit an issue at https://github.com/software-mansion/TypeGPU/issues")}var Da=u({name:"step",signature:(...e)=>{let t=V(e,[x,F,C])??e;return{argTypes:t,returnType:t[0]}},normalImpl:Sr,codegenImpl:(e,t)=>o`step(${e}, ${t})`});function Ir(e){if(typeof e=="number")return Math.tan(e);throw new B("CPU implementation for tan on vectors not implemented yet. Please submit an issue at https://github.com/software-mansion/TypeGPU/issues")}var Ra=u({name:"tan",signature:e=>({argTypes:[e],returnType:e}),normalImpl:Ir,codegenImpl:e=>o`tan(${e})`});function Ar(e){return typeof e=="number"?Math.tanh(e):i.tanh[e.kind](e)}var Ea=u({name:"tanh",signature:e=>({argTypes:[e],returnType:e}),normalImpl:Ar,codegenImpl:e=>o`tanh(${e})`}),La=u({name:"transpose",signature:e=>({argTypes:[e],returnType:e}),normalImpl:"CPU implementation for transpose not implemented yet. Please submit an issue at https://github.com/software-mansion/TypeGPU/issues",codegenImpl:e=>o`transpose(${e})`});var Ga=u({name:"trunc",signature:e=>({argTypes:[e],returnType:e}),normalImpl:"CPU implementation for trunc not implemented yet. Please submit an issue at https://github.com/software-mansion/TypeGPU/issues",codegenImpl:e=>o`trunc(${e})`});import*as Fr from"tinyest";var zr={f:{1:x,2:D,3:R,4:E},h:{1:F,2:ne,3:se,4:oe},i:{1:xe,2:re,3:ae,4:ue},u:{1:P,2:Le,3:Ne,4:Ke},b:{1:H,2:Ge,3:Oe,4:je}},$r={vec2f:D,vec2h:ne,vec2i:re,vec2u:Le,"vec2<bool>":Ge,vec3f:R,vec3h:se,vec3i:ae,vec3u:Ne,"vec3<bool>":Oe,vec4f:E,vec4h:oe,vec4i:ue,vec4u:Ke,"vec4<bool>":je,mat2x2f:ce,mat3x3f:ie,mat4x4f:A};function Wt(e,t){if(Ee(e)||Lt(e))return e.propTypes[t]??k;if(e===H||Z(e))return k;let n=t.length;if(Re(e)&&n>=1&&n<=4){let r=e.type.includes("bool")?"b":e.type[4],a=zr[r][n];if(a)return a}return k}var nn={mat2x2f:D,mat3x3f:R,mat4x4f:E};function yt(e){return we(e)||Et(e)?e.elementType:Re(e)?e.primitive:e.type in nn?nn[e.type]:k}function xt(e){return e>=2**63||e<-(2**63)?l(e,C):Number.isInteger(e)?(Number.isSafeInteger(e)||console.warn(`The integer ${e} exceeds the safe integer range and may have lost precision.`),l(e,fe)):l(e,C)}function Tt(e){return e.type==="abstractFloat"?x:e.type==="abstractInt"?xe:e}function Xa(e){return e.map(t=>l(t.value,Tt(t.dataType)))}function dt(e){if(at(e))return e;let t=Kt(e);return t||(v(e)||q(e)?l(e,$r[e.kind]):typeof e=="string"||typeof e=="function"||typeof e=="object"||typeof e=="symbol"||typeof e>"u"||e===null?l(e,k):typeof e=="number"?xt(e):typeof e=="boolean"?l(e,H):l(e,k))}var{NodeTypeCatalog:g}=Fr,Vr=["==","!=","<","<=",">",">=","<<",">>","+","-","*","/","%","|","^","&","&&","||"],Cr=["&&","||","==","!=","<","<=",">",">="],Pr=["vec2f","vec3f","vec4f","vec2h","vec3h","vec4h","vec2i","vec3i","vec4i","vec2u","vec3u","vec4u","mat2x2f","mat3x3f","mat4x4f"],rn={add:kt,sub:De,mul:tt,div:_t};function sn(e,t,n){return n?Cr.includes(t)?H:t==="="?n:e:t==="!"||t==="~"?H:e}var kr={"+":kt[m].gpuImpl,"-":De[m].gpuImpl,"*":tt[m].gpuImpl,"/":_t[m].gpuImpl,"**":tn[m].gpuImpl},Ut=class{#e=void 0;initGenerator(t){this.#e=t}get ctx(){if(!this.#e)throw new Error("WGSL Generator has not yet been initialized. Please call initialize(ctx) before using the generator.");return this.#e}block([t,n]){this.ctx.pushBlockScope();try{this.ctx.indent();let r=n.map(a=>this.statement(a)).join(`
2
- `);return this.ctx.dedent(),`{
3
- ${r}
4
- ${this.ctx.pre}}`}finally{this.ctx.popBlockScope()}}blockVariable(t,n){let r=l(this.ctx.makeNameValid(t),n);return this.ctx.defineVariable(t,r),r}identifier(t){if(!t)throw new Error("Cannot resolve an empty identifier");let n=this.ctx.getById(t);if(!n)throw new Error(`Identifier ${t} not found`);return n}typedExpression(t,n){let r=this.ctx.expectedType;this.ctx.expectedType=n;try{let a=this.expression(t);return St(a,n)}finally{this.ctx.expectedType=r}}expression(t){if(typeof t=="string")return this.identifier(t);if(typeof t=="boolean")return l(t,H);if(t[0]===g.logicalExpr||t[0]===g.binaryExpr||t[0]===g.assignmentExpr){let[n,r,a,s]=t,c=this.expression(r),p=this.expression(s),T=kr[a];if(T)return T(c,p);let S=t[0]===g.assignmentExpr?c.dataType.type==="ptr"?[c.dataType.inner]:[c.dataType]:void 0,[$,U]=ut([c,p],S)??[c,p],nt=this.ctx.resolve($.value,$.dataType).value,Bt=this.ctx.resolve(U.value,U.dataType).value,an=sn($.dataType,a,U.dataType);return l(Vr.includes(a)?`(${nt} ${a} ${Bt})`:`${nt} ${a} ${Bt}`,an)}if(t[0]===g.postUpdate){let[n,r,a]=t,s=this.expression(a),c=this.ctx.resolve(s.value).value;return l(`${c}${r}`,s.dataType)}if(t[0]===g.unaryExpr){let[n,r,a]=t,s=this.expression(a),c=this.ctx.resolve(s.value).value,p=sn(s.dataType,r);return l(`${r}${c}`,p)}if(t[0]===g.memberAccess){let[n,r,a]=t,s=this.expression(r);if(s.value===console)return l(new Mt(a),k);if(Pr.includes(s.dataType.type)&&a in rn)return{value:new bt(a,s,rn[a][m].gpuImpl),dataType:k};if(s.dataType.type==="unknown"){let c=s.value[a];return dt(c)}return vt(s.dataType)?l(`(*${this.ctx.resolve(s.value).value}).${a}`,Wt(s.dataType.inner,a)):we(s.dataType)&&a==="length"?s.dataType.elementCount===0?l(`arrayLength(&${this.ctx.resolve(s.value).value})`,P):l(String(s.dataType.elementCount),fe):gt(s.dataType)&&a==="columns"?l(new wt(s),k):Re(s.dataType)&&v(s.value)?dt(s.value[a]):l(`${this.ctx.resolve(s.value).value}.${a}`,Wt(s.dataType,a))}if(t[0]===g.indexAccess){let[n,r,a]=t,s=this.expression(r),c=this.expression(a),p=this.ctx.resolve(c.value,c.dataType).value;if(s.value instanceof wt)return l(o`${s.value.matrix}[${p}]`,yt(s.value.matrix.dataType));let T=this.ctx.resolve(s.value,s.dataType).value;if(s.dataType.type==="unknown"){if(Array.isArray(a)&&a[0]===g.numericLiteral)return dt(s.value[a[1]]);throw new Error(`Cannot index value ${T} of unknown type with index ${p}`)}if(gt(s.dataType))throw new Error("The only way of accessing matrix elements in TGSL is through the 'columns' property.");return vt(s.dataType)?l(`(*${T})[${p}]`,yt(s.dataType.inner)):l(`${T}[${p}]`,Gt(s.dataType)?yt(s.dataType):k)}if(t[0]===g.numericLiteral){let n=typeof t[1]=="string"?xt(Wr(t[1])):xt(t[1]);if(!n)throw new Error(`Invalid numeric literal ${t[1]}`);return n}if(t[0]===g.call){let[n,r,a]=t,s=this.expression(r);if(Ee(s.value)||we(s.value)){if(a.length>1)throw new te("Array and struct schemas should always be called with at most 1 argument");if(!a[0])return l(`${this.ctx.resolve(s.value).value}()`,s.value);let p=this.typedExpression(a[0],s.value);return l(this.ctx.resolve(p.value,s.value).value,s.value)}if(s.value instanceof bt){if(!a[0])throw new te(`An infix operator '${s.value.name}' was called without any arguments`);let p=this.expression(a[0]);return s.value.operator(s.value.lhs,p)}if(!Dt(s.value)){let p=a.map(S=>this.expression(S)),T=this.ctx.shelllessRepo.get(s.value,p);if(T)return this.ctx.withResetIndentLevel(()=>{let S=this.ctx.resolve(T);return l(o`${S.value}(${p})`,S.dataType)});throw new Error(`Function '${rt(s.value)??String(s.value)}' is not marked with the 'use gpu' directive and cannot be used in a shader`)}let c=s.value[m]?.argConversionHint??"keep";try{let p;if(Array.isArray(c))p=a.map((S,$)=>{let U=c[$];if(!U)throw new te(`Function '${rt(s.value)}' was called with too many arguments`);return this.typedExpression(S,U)});else{let S=a.map($=>this.expression($));c==="keep"?p=S:c==="unify"?p=ut(S)??S:p=c(...S).map(($,U)=>[$,S[U]]).map(([$,U])=>St(U,$))}if(s.value instanceof Mt)return this.ctx.generateLog(s.value.op,p);let T=s.value(...p);if(!at(T))throw new Error("Functions running in codegen mode must return snippets");return T}catch(p){throw new Ot(p,[{toString:()=>rt(s.value)}])}}if(t[0]===g.objectExpr){let n=t[1],r=this.ctx.expectedType;if(!r||!Ee(r))throw new te(`No target type could be inferred for object with keys [${Object.keys(n).join(", ")}], please wrap the object in the corresponding schema.`);let a=Object.fromEntries(Object.entries(r.propTypes).map(([c,p])=>{let T=n[c];if(T===void 0)throw new te(`Missing property ${c} in object literal for struct ${r}`);let S=this.typedExpression(T,p);return[c,S]})),s=jt(r,a);return l(o`${this.ctx.resolve(r).value}(${s})`,r)}if(t[0]===g.arrayExpr){let[n,r]=t,a=this.ctx.expectedType,s,c;if(we(a)){if(s=a.elementType,c=r.map(T=>this.typedExpression(T,s)),c.length!==a.elementCount)throw new te(`Cannot create value of type '${a}' from an array of length: ${c.length}`)}else{let T=r.map($=>this.expression($));if(T.length===0)throw new te("Cannot infer the type of an empty array literal.");let S=ut(T);if(!S)throw new te("The given values cannot be automatically converted to a common type. Consider wrapping the array in an appropriate schema");c=S,s=Tt(c[0]?.dataType)}let p=`array<${this.ctx.resolve(s).value}, ${c.length}>`;return l(o`${p}(${c})`,Zt[m].jsImpl(s,c.length))}if(t[0]===g.stringLiteral)return l(t[1],k);if(t[0]===g.preUpdate)throw new Error("Cannot use pre-updates in TGSL.");_r(t)}functionDefinition(t){return this.block(t)}statement(t){if(typeof t=="string")return`${this.ctx.pre}${this.ctx.resolve(this.identifier(t).value).value};`;if(typeof t=="boolean")return`${this.ctx.pre}${t?"true":"false"};`;if(t[0]===g.return){let n=t[1];if(n!==void 0){let r=this.ctx.topFunctionReturnType,a=r?this.typedExpression(n,r):this.expression(n);return Nt(a.dataType.type!=="unknown","Return type should be known"),this.ctx.reportReturnType(a.dataType),o`${this.ctx.pre}return ${a};`}return`${this.ctx.pre}return;`}if(t[0]===g.if){let[n,r,a,s]=t,c=this.typedExpression(r,H),p=c.value===!1?void 0:this.block(ft(a)),T=c.value===!0||!s?void 0:this.block(ft(s));return c.value===!0?`${this.ctx.pre}${p}`:c.value===!1?T?`${this.ctx.pre}${T}`:"":T?o`\
5
- ${this.ctx.pre}if (${c}) ${p}
6
- ${this.ctx.pre}else ${T}`:o`${this.ctx.pre}if (${c}) ${p}`}if(t[0]===g.let||t[0]===g.const){let[n,r,a]=t,s=a!==void 0?this.expression(a):void 0;if(!s)throw new Error(`Cannot create variable '${r}' without an initial value.`);if(Rt(s.dataType))throw new Error(`Cannot create variable '${r}' with loose data type.`);let c=this.blockVariable(r,Tt(s.dataType));return ot`${this.ctx.pre}var ${c.value} = ${s};`}if(t[0]===g.block)return this.block(t);if(t[0]===g.for){let[n,r,a,s,c]=t,[p,T,S]=this.ctx.withResetIndentLevel(()=>[r?this.statement(r):void 0,a?this.typedExpression(a,H):void 0,s?this.statement(s):void 0]),$=p?p.slice(0,-1):"",U=S?S.slice(0,-1):"",nt=this.block(ft(c));return o`${this.ctx.pre}for (${$}; ${T}; ${U}) ${nt}`}if(t[0]===g.while){let[n,r,a]=t,s=this.typedExpression(r,H),c=this.ctx.resolve(s.value).value,p=this.block(ft(a));return`${this.ctx.pre}while (${c}) ${p}`}return t[0]===g.continue?`${this.ctx.pre}continue;`:t[0]===g.break?`${this.ctx.pre}break;`:`${this.ctx.pre}${this.ctx.resolve(this.expression(t).value).value};`}};function _r(e){throw new Error(`'${qt(e)}' was not handled by the WGSL generator.`)}function Wr(e){return/^0x[0-9a-f]+$/i.test(e)?Number.parseInt(e):/^0b[01]+$/i.test(e)?Number.parseInt(e.slice(2),2):Number.parseFloat(e)}function ft(e){return typeof e!="object"||e[0]!==g.block?[g.block,[e]]:e}var Ur=new Ut,xo=Ur;export{Ze as a,on as b,un as c,cn as d,mn as e,pn as f,yn as g,xn as h,Tn as i,ce as j,ie as k,A as l,Gr as m,Wt as n,xt as o,Tt as p,Xa as q,dt as r,Kr as s,jr as t,qr as u,Zr as v,Yr as w,it as x,dn as y,fn as z,gn as A,hn as B,vn as C,bn as D,wn as E,Mn as F,Sn as G,In as H,An as I,Jr as J,es as K,ts as L,ns as M,rs as N,ss as O,as as P,os as Q,is as R,X as S,Y as T,i as U,kt as V,De as W,tt as X,_t as Y,Is as Z,As as _,Rs as $,Es as aa,Ls as ba,Gs as ca,Ns as da,Os as ea,Ks as fa,js as ga,qs as ha,Zs as ia,Hs as ja,Qs as ka,Xs as la,Ys as ma,Js as na,ea as oa,ta as pa,na as qa,ra,Jn as sa,sa as ta,aa as ua,oa as va,ua as wa,ca as xa,ia as ya,la as za,ma as Aa,pa as Ba,ya as Ca,xa as Da,Ta as Ea,da as Fa,fa as Ga,ga as Ha,cr as Ia,ha as Ja,va as Ka,ba as La,wa as Ma,Ma as Na,Sa as Oa,Ia as Pa,tn as Qa,Aa as Ra,za as Sa,$a as Ta,Fa as Ua,Va,Ca as Wa,Pa as Xa,ka as Ya,_a as Za,Wa as _a,Ua as $a,Ba as ab,Da as bb,Ra as cb,Ea as db,La as eb,Ga as fb,rn as gb,xo as hb};
7
- //# sourceMappingURL=chunk-T2GBOTUH.js.map