Skip to content

Commit

Permalink
fix visibility stage; tag 0.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
tiye committed Nov 16, 2024
1 parent 5a78548 commit a4fbe14
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@triadica/lagopus",
"version": "0.1.1",
"version": "0.1.2",
"type": "module",
"module": "./lib/index.mjs",
"scripts": {
Expand Down
1 change: 0 additions & 1 deletion src/global.mts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ export var atomBufferNeedClear: Atom<boolean> = new Atom(true);
export var atomClearColor: Atom<{ r: number; g: number; b: number; a: number }> = new Atom(undefined);

export var atomLagopusTree: Atom<LagopusRenderObject> = new Atom(null);
/** TODO merge */
export let atomObjectsTree = new Atom<LagopusRenderObject>(null);

// proxy it for hot reloading
Expand Down
12 changes: 6 additions & 6 deletions src/paint.mts
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ export let makePainter = (info: LagopusObjectData): ((l: number) => void) => {
let renderParticlesBindGroupLayout = device.createBindGroupLayout({
label: info.label + "@render-uniform",
entries: [
{ binding: 0, visibility: GPUShaderStage.VERTEX, buffer: { type: "read-only-storage" } },
{ binding: 1, visibility: GPUShaderStage.VERTEX, buffer: { type: "read-only-storage" } },
{ binding: 0, visibility: GPUShaderStage.VERTEX | GPUShaderStage.FRAGMENT, buffer: { type: "read-only-storage" } },
{ binding: 1, visibility: GPUShaderStage.VERTEX | GPUShaderStage.FRAGMENT, buffer: { type: "read-only-storage" } },
],
});

Expand All @@ -61,8 +61,8 @@ export let makePainter = (info: LagopusObjectData): ((l: number) => void) => {
let renderParticlesLayout = device.createBindGroupLayout({
label: info.label + "@render-particles",
entries: [
{ binding: 0, visibility: GPUShaderStage.VERTEX, buffer: { type: "read-only-storage" } },
{ binding: 1, visibility: GPUShaderStage.VERTEX, buffer: { type: "read-only-storage" } },
{ binding: 0, visibility: GPUShaderStage.VERTEX | GPUShaderStage.FRAGMENT, buffer: { type: "read-only-storage" } },
{ binding: 1, visibility: GPUShaderStage.VERTEX | GPUShaderStage.FRAGMENT, buffer: { type: "read-only-storage" } },
],
});

Expand Down Expand Up @@ -118,8 +118,8 @@ export let makePainter = (info: LagopusObjectData): ((l: number) => void) => {
let renderUniformBindGroupLayout = device.createBindGroupLayout({
label: info.label + "@render-uniform",
entries: [
{ binding: 0, visibility: GPUShaderStage.VERTEX, buffer: { type: "uniform" } },
{ binding: 1, visibility: GPUShaderStage.VERTEX, buffer: { type: "uniform" } },
{ binding: 0, visibility: GPUShaderStage.VERTEX | GPUShaderStage.FRAGMENT, buffer: { type: "uniform" } },
{ binding: 1, visibility: GPUShaderStage.VERTEX | GPUShaderStage.FRAGMENT, buffer: { type: "uniform" } },
],
});

Expand Down

0 comments on commit a4fbe14

Please sign in to comment.