From 6a082108243149697134c8fcbea2e350e72364f2 Mon Sep 17 00:00:00 2001 From: Sebastian Sanabria Date: Sat, 1 Jul 2023 19:11:33 -0600 Subject: [PATCH] restored examples storage size - The code is correct and you can count the basic elements of each struct, meaning f32, i32, u32, etc. --- examples/dithering3_1/index.js | 2 +- examples/dithering3_2/index.js | 2 +- examples/mouseclickscroll1/index.js | 2 +- examples/noise1/index.js | 4 ++-- examples/shapes1/index.js | 2 +- examples/shapes2/index.js | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/examples/dithering3_1/index.js b/examples/dithering3_1/index.js index 845f76b8..9486b077 100644 --- a/examples/dithering3_1/index.js +++ b/examples/dithering3_1/index.js @@ -16,7 +16,7 @@ const dithering3 = { await points.addTextureImage('image', './../img/absulit_800x800.jpg'); points.addBindingTexture('outputTex', 'computeTexture'); points.addLayers(2); - points.addStorage('variables', 1, 'Variable', 4, false, ShaderType.COMPUTE); + points.addStorage('variables', 1, 'Variable', 1, false, ShaderType.COMPUTE); }, update: points => { diff --git a/examples/dithering3_2/index.js b/examples/dithering3_2/index.js index 01fce08a..f16e3349 100644 --- a/examples/dithering3_2/index.js +++ b/examples/dithering3_2/index.js @@ -16,7 +16,7 @@ const dithering3 = { await points.addTextureImage('image', './../img/absulit_800x800.jpg'); points.addBindingTexture('outputTex', 'computeTexture'); points.addLayers(2); - points.addStorage('variables', 1, 'Variable', 4, false, ShaderType.COMPUTE); + points.addStorage('variables', 1, 'Variable', 1, false, ShaderType.COMPUTE); }, update: points => { diff --git a/examples/mouseclickscroll1/index.js b/examples/mouseclickscroll1/index.js index e93107f8..0b5fa06e 100644 --- a/examples/mouseclickscroll1/index.js +++ b/examples/mouseclickscroll1/index.js @@ -5,7 +5,7 @@ const mouseclickscroll1 = { vert, frag, init: async points => { - points.addStorage('variables', 1, 'Variable', 24); + points.addStorage('variables', 1, 'Variable', 4); }, update: points => { diff --git a/examples/noise1/index.js b/examples/noise1/index.js index a6adcfda..9655fcba 100644 --- a/examples/noise1/index.js +++ b/examples/noise1/index.js @@ -6,8 +6,8 @@ const noise1 = { init: async points => { const numPoints = 800*800; points.addUniform('value_noise_data_length', numPoints); - points.addStorage('value_noise_data', numPoints, 'f32', 4); - points.addStorage('variables', 1, 'Variable', 4); + points.addStorage('value_noise_data', numPoints, 'f32', 1); + points.addStorage('variables', 1, 'Variable', 1); }, update: points => { diff --git a/examples/shapes1/index.js b/examples/shapes1/index.js index a3954770..b25f8730 100644 --- a/examples/shapes1/index.js +++ b/examples/shapes1/index.js @@ -9,7 +9,7 @@ const shapes1 = { init: async points => { const numPoints = 128; points.addUniform('numPoints', numPoints); - points.addStorage('points', numPoints, 'vec2', 8); + points.addStorage('points', numPoints, 'vec2', 2); }, update: points => { diff --git a/examples/shapes2/index.js b/examples/shapes2/index.js index c4bfd027..ea29331b 100644 --- a/examples/shapes2/index.js +++ b/examples/shapes2/index.js @@ -9,7 +9,7 @@ const shapes2 = { init: async points => { const numPoints = 800*800; points.addUniform('numPoints', numPoints); - points.addStorage('points', numPoints, 'vec4', 16); + points.addStorage('points', numPoints, 'vec4', 4); points.addSampler('feedbackSampler', null); points.addBindingTexture('outputTex', 'computeTexture'); },