You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
44
44
45
45
```ts
46
46
typeTextureProps= {
@@ -57,7 +57,7 @@ type TextureProps = {
57
57
importtgpufrom'typegpu';
58
58
const root =awaittgpu.init();
59
59
// ---cut---
60
-
const texture =root['~unstable'].createTexture({
60
+
const texture =root.createTexture({
61
61
// ^?
62
62
size: [512, 512, 128],
63
63
format: 'rgba8unorm',
@@ -74,7 +74,7 @@ Similar to buffers, textures need usage flags to specify how they will be used.
74
74
importtgpufrom'typegpu';
75
75
const root =awaittgpu.init();
76
76
// ---cut---
77
-
const texture =root['~unstable'].createTexture({
77
+
const texture =root.createTexture({
78
78
size: [256, 256],
79
79
format: 'rgba8unorm',
80
80
})
@@ -89,7 +89,7 @@ You can also add multiple flags at once:
89
89
importtgpufrom'typegpu';
90
90
const root =awaittgpu.init();
91
91
// ---cut---
92
-
const texture =root['~unstable'].createTexture({
92
+
const texture =root.createTexture({
93
93
size: [256, 256],
94
94
format: 'rgba8unorm',
95
95
}).$usage('sampled', 'storage', 'render');
@@ -122,7 +122,7 @@ You can write various image sources to textures. `ExternalImageSource` includes:
0 commit comments