Skip to content

Commit 7780f13

Browse files
committed
Merge branch 'main' into impr/operator-!
2 parents 21125b7 + 5d462bf commit 7780f13

169 files changed

Lines changed: 2710 additions & 3002 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

apps/treeshake-test/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"devDependencies": {
1616
"@types/node": "catalog:types",
1717
"arktype": "1.0.29-alpha",
18-
"esbuild": "^0.25.10",
18+
"esbuild": "^0.25.11",
1919
"ts-loader": "^9.5.4",
2020
"tsdown": "^0.15.6",
2121
"tsx": "^4.19.2",

apps/typegpu-docs/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"fuse.js": "catalog:frontend",
4343
"jotai": "^2.15.0",
4444
"jotai-location": "^0.6.2",
45-
"lodash": "^4.17.21",
45+
"lodash": "^4.18.1",
4646
"lucide-react": "^0.536.0",
4747
"lz-string": "^1.5.0",
4848
"morphcharts": "^1.3.2",
@@ -86,6 +86,6 @@
8686
"typegpu-testing-utility": "workspace:*",
8787
"vite-imagetools": "catalog:frontend",
8888
"vite-plugin-wasm": "^3.5.0",
89-
"yaml": "^2.8.1"
89+
"yaml": "^2.8.3"
9090
}
9191
}

apps/typegpu-docs/src/content/docs/fundamentals/accessors.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ import tgpu, { d, std } from 'typegpu';
308308

309309
const root = await tgpu.init();
310310
// ---cut---
311-
const texture = root['~unstable']
311+
const texture = root
312312
.createTexture({ format: 'rgba8unorm', size: [100, 100] })
313313
.$usage('storage');
314314

apps/typegpu-docs/src/content/docs/fundamentals/data-schemas.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ Texture schemas serve two main purposes:
364364
import tgpu, { d, std } from 'typegpu';
365365

366366
const root = await tgpu.init();
367-
const texture = root['~unstable'].createTexture({
367+
const texture = root.createTexture({
368368
size: [256, 256],
369369
format: 'rgba8unorm',
370370
}).$usage('sampled', 'storage');

apps/typegpu-docs/src/content/docs/fundamentals/textures.mdx

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import tgpu, { d } from 'typegpu';
2121

2222
const root = await tgpu.init();
2323

24-
const texture = root['~unstable'].createTexture({
24+
const texture = root.createTexture({
2525
size: [256, 256],
2626
format: 'rgba8unorm' as const,
2727
}).$usage('sampled');
@@ -40,7 +40,7 @@ const sampledView = texture.createView();
4040

4141
## Creating a texture
4242

43-
Textures can be created using the `root['~unstable'].createTexture` method. It accepts a descriptor similar to vanilla `GPUTextureDescriptor`. If specified, the properties will be reflected in the created texture type - this will later help with static checks when creating views or binding the texture in a layout.
43+
Textures can be created using the `root.createTexture` method. It accepts a descriptor similar to vanilla `GPUTextureDescriptor`. If specified, the properties will be reflected in the created texture type - this will later help with static checks when creating views or binding the texture in a layout.
4444

4545
```ts
4646
type TextureProps = {
@@ -57,7 +57,7 @@ type TextureProps = {
5757
import tgpu from 'typegpu';
5858
const root = await tgpu.init();
5959
// ---cut---
60-
const texture = root['~unstable'].createTexture({
60+
const texture = root.createTexture({
6161
// ^?
6262
size: [512, 512, 128],
6363
format: 'rgba8unorm',
@@ -74,7 +74,7 @@ Similar to buffers, textures need usage flags to specify how they will be used.
7474
import tgpu from 'typegpu';
7575
const root = await tgpu.init();
7676
// ---cut---
77-
const texture = root['~unstable'].createTexture({
77+
const texture = root.createTexture({
7878
size: [256, 256],
7979
format: 'rgba8unorm',
8080
})
@@ -89,7 +89,7 @@ You can also add multiple flags at once:
8989
import tgpu from 'typegpu';
9090
const root = await tgpu.init();
9191
// ---cut---
92-
const texture = root['~unstable'].createTexture({
92+
const texture = root.createTexture({
9393
size: [256, 256],
9494
format: 'rgba8unorm',
9595
}).$usage('sampled', 'storage', 'render');
@@ -122,7 +122,7 @@ You can write various image sources to textures. `ExternalImageSource` includes:
122122
import tgpu from 'typegpu';
123123
const root = await tgpu.init();
124124
// ---cut---
125-
const texture = root['~unstable'].createTexture({
125+
const texture = root.createTexture({
126126
size: [256, 256],
127127
format: 'rgba8unorm',
128128
}).$usage('sampled');
@@ -155,7 +155,7 @@ declare const imageBitmap1: ImageBitmap;
155155
declare const imageBitmap2: ImageBitmap;
156156
declare const imageBitmap3: ImageBitmap;
157157
// ---cut---
158-
const texture3d = root['~unstable'].createTexture({
158+
const texture3d = root.createTexture({
159159
size: [256, 256, 3],
160160
format: 'rgba8unorm',
161161
dimension: '3d',
@@ -173,7 +173,7 @@ You can write raw binary data directly to textures using `ArrayBuffer`, typed ar
173173
import tgpu from 'typegpu';
174174
const root = await tgpu.init();
175175
// ---cut---
176-
const texture = root['~unstable'].createTexture({
176+
const texture = root.createTexture({
177177
size: [2, 2],
178178
format: 'rgba8unorm',
179179
}).$usage('sampled');
@@ -198,12 +198,12 @@ You can also copy from another texture:
198198
import tgpu from 'typegpu';
199199
const root = await tgpu.init();
200200
// ---cut---
201-
const sourceTexture = root['~unstable'].createTexture({
201+
const sourceTexture = root.createTexture({
202202
size: [256, 256],
203203
format: 'rgba8unorm',
204204
}).$usage('sampled');
205205

206-
const targetTexture = root['~unstable'].createTexture({
206+
const targetTexture = root.createTexture({
207207
size: [256, 256],
208208
format: 'rgba8unorm',
209209
}).$usage('sampled');
@@ -220,7 +220,7 @@ import tgpu from 'typegpu';
220220
const root = await tgpu.init();
221221
declare const imageBitmap: ImageBitmap;
222222
// ---cut---
223-
const texture = root['~unstable'].createTexture({
223+
const texture = root.createTexture({
224224
size: [256, 256],
225225
format: 'rgba8unorm',
226226
mipLevelCount: 9, // log2(256) + 1
@@ -242,7 +242,7 @@ To create a view - which will also serve as fixed texture usage - you can use on
242242
import tgpu, { d } from 'typegpu';
243243
const root = await tgpu.init();
244244
// ---cut---
245-
const texture = root['~unstable'].createTexture({
245+
const texture = root.createTexture({
246246
size: [512, 512],
247247
format: 'rgba8unorm',
248248
}).$usage('sampled');
@@ -260,7 +260,7 @@ If type information is available the view schema will be staticly checked agains
260260
import tgpu, { d } from 'typegpu';
261261
const root = await tgpu.init();
262262
// ---cut---
263-
const texture = root['~unstable'].createTexture({
263+
const texture = root.createTexture({
264264
size: [512, 512],
265265
format: 'rgba8unorm',
266266
}); // <-- missing .$usage('sampled')
@@ -273,7 +273,7 @@ const sampledView = texture.createView(d.texture2d(d.f32));
273273
import tgpu, { d } from 'typegpu';
274274
const root = await tgpu.init();
275275
// ---cut---
276-
const texture = root['~unstable'].createTexture({
276+
const texture = root.createTexture({
277277
size: [512, 512],
278278
format: 'r32float',
279279
}).$usage('storage');
@@ -291,7 +291,7 @@ To sample textures in shaders, you'll often need a sampler that defines how the
291291
import tgpu from 'typegpu';
292292
const root = await tgpu.init();
293293
// ---cut---
294-
const sampler = root['~unstable'].createSampler({
294+
const sampler = root.createSampler({
295295
magFilter: 'linear',
296296
minFilter: 'linear',
297297
mipmapFilter: 'linear',
@@ -312,12 +312,12 @@ Textures can be used in shaders through bind groups or as fixed resources, simil
312312
import tgpu, { d } from 'typegpu';
313313
const root = await tgpu.init();
314314
// ---cut---
315-
const texture = root['~unstable'].createTexture({
315+
const texture = root.createTexture({
316316
size: [256, 256],
317317
format: 'rgba8unorm',
318318
}).$usage('sampled');
319319

320-
const sampler = root['~unstable'].createSampler({
320+
const sampler = root.createSampler({
321321
magFilter: 'linear',
322322
minFilter: 'linear',
323323
});
@@ -343,15 +343,15 @@ For textures that remain consistent across operations, you can create fixed text
343343
import tgpu, { d, std } from 'typegpu';
344344
const root = await tgpu.init();
345345
// ---cut---
346-
const texture = root['~unstable'].createTexture({
346+
const texture = root.createTexture({
347347
size: [256, 256],
348348
format: 'rgba8unorm',
349349
}).$usage('sampled');
350350

351351
// Create a fixed sampled view
352352
const sampledView = texture.createView();
353353

354-
const sampler = root['~unstable'].createSampler({
354+
const sampler = root.createSampler({
355355
magFilter: 'linear',
356356
minFilter: 'linear',
357357
});

0 commit comments

Comments
 (0)