Skip to content

Commit 3c26f5a

Browse files
committed
Merge branch 'release'
2 parents a10781b + 969902e commit 3c26f5a

File tree

9 files changed

+14
-16
lines changed

9 files changed

+14
-16
lines changed

apps/typegpu-docs/src/examples/rendering/function-visualizer/index.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,9 @@ const computeLayout = tgpu.bindGroupLayout({
6565

6666
const functionExprSlot = tgpu.slot<TgpuRawCodeSnippet<d.F32>>();
6767

68-
// oxlint-disable-next-line no-unused-vars -- it is used in wgsl
69-
const interpolatedFunction = (x: number) => {
70-
'use gpu';
71-
return functionExprSlot.$;
72-
};
68+
const interpolatedFunction = tgpu.fn([d.f32], d.f32)`(x) {
69+
return EXPR;
70+
}`.$uses({ EXPR: functionExprSlot });
7371

7472
const computePointsFn = (x: number) => {
7573
'use gpu';

apps/typegpu-docs/src/examples/rendering/render-bundles/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ const terrainBindGroup = root.createBindGroup(terrainLayout, {
6363
terrain: terrainBuffer,
6464
});
6565

66-
const pipeline = root['~unstable'].pipe(perlinCache.inject()).createRenderPipeline({
66+
const pipeline = root.pipe(perlinCache.inject()).createRenderPipeline({
6767
attribs: vertexLayout.attrib,
6868
vertex: vertexFn,
6969
fragment: fragmentFn,

apps/typegpu-docs/src/examples/rendering/render-bundles/shaders.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const fbm = tgpu.fn(
2929
return value;
3030
});
3131

32-
export const vertexFn = tgpu['~unstable'].vertexFn({
32+
export const vertexFn = tgpu.vertexFn({
3333
in: {
3434
...Vertex.propTypes,
3535
instanceIndex: d.builtin.instanceIndex,
@@ -66,7 +66,7 @@ export const vertexFn = tgpu['~unstable'].vertexFn({
6666
};
6767
});
6868

69-
export const fragmentFn = tgpu['~unstable'].fragmentFn({
69+
export const fragmentFn = tgpu.fragmentFn({
7070
in: {
7171
worldNormal: d.vec3f,
7272
color: d.vec3f,

apps/typegpu-docs/src/examples/simulation/game-of-life/shaders/bitpacked-compute.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ const golNextStateBitpacked = (current: number, count: number[]): number => {
123123
return two_or_three & (bit0 | current);
124124
};
125125

126-
export const bitpackedCompute = tgpu['~unstable'].computeFn({
126+
export const bitpackedCompute = tgpu.computeFn({
127127
workgroupSize: [TILE_SIZE, TILE_SIZE],
128128
in: { gid: d.builtin.globalInvocationId },
129129
})(({ gid }) => {

apps/typegpu-docs/src/examples/simulation/game-of-life/shaders/common.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export const displayLayout = tgpu.bindGroupLayout({
1414

1515
export const TILE_SIZE = 16;
1616

17-
export const gameSizeAccessor = tgpu['~unstable'].accessor(d.u32, 64);
17+
export const gameSizeAccessor = tgpu.accessor(d.u32, 64);
1818

1919
export const loadTexAt = (pos: d.v2u): number => {
2020
'use gpu';

apps/typegpu-docs/src/examples/simulation/game-of-life/shaders/naive-compute.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import * as d from 'typegpu/data';
33
import * as std from 'typegpu/std';
44
import { computeLayout, gameSizeAccessor, loadTexAt, TILE_SIZE } from './common.ts';
55

6-
export const naiveCompute = tgpu['~unstable'].computeFn({
6+
export const naiveCompute = tgpu.computeFn({
77
workgroupSize: [TILE_SIZE, TILE_SIZE],
88
in: { gid: d.builtin.globalInvocationId },
99
})(({ gid }) => {

apps/typegpu-docs/src/examples/simulation/game-of-life/shaders/tiled-compute.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const countNeighborsInTile = (x: number, y: number): number => {
2727
readTile(x - 1, y + 1) + readTile(x, y + 1) + readTile(x + 1, y + 1);
2828
};
2929

30-
export const tiledCompute = tgpu['~unstable'].computeFn({
30+
export const tiledCompute = tgpu.computeFn({
3131
workgroupSize: [TILE_SIZE, TILE_SIZE],
3232
in: {
3333
gid: d.builtin.globalInvocationId,

apps/typegpu-docs/tests/individual-example-tests/function-visualizer.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ describe('function visualizer example', () => {
3333
3434
@group(0) @binding(1) var<uniform> propertiesUniform: Properties;
3535
36-
fn interpolatedFunction(x: f32) -> f32 {
36+
fn interpolatedFunction(x: f32) -> f32{
3737
return x;
3838
}
3939
@@ -71,7 +71,7 @@ describe('function visualizer example', () => {
7171
7272
@group(0) @binding(1) var<uniform> propertiesUniform: Properties;
7373
74-
fn interpolatedFunction(x: f32) -> f32 {
74+
fn interpolatedFunction(x: f32) -> f32{
7575
return cos(x*5)/3-x;
7676
}
7777
@@ -109,7 +109,7 @@ describe('function visualizer example', () => {
109109
110110
@group(0) @binding(1) var<uniform> propertiesUniform: Properties;
111111
112-
fn interpolatedFunction(x: f32) -> f32 {
112+
fn interpolatedFunction(x: f32) -> f32{
113113
return x*sin(log(abs(x)));
114114
}
115115

apps/typegpu-docs/tests/individual-example-tests/utils/testUtils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export function createDeepNoopProxy<T extends object>(
1616
accessedProperties = new Set<PropertyKey>(),
1717
): T {
1818
return new Proxy(target, {
19-
get(obj, prop, receiver) {
19+
get(_obj, prop, _receiver) {
2020
accessedProperties.add(prop);
2121

2222
return () => createDeepNoopProxy({}, accessedProperties);

0 commit comments

Comments
 (0)