Skip to content

Commit

Permalink
restored examples storage size
Browse files Browse the repository at this point in the history
- The code is correct and you can count the basic elements of each struct, meaning f32, i32, u32, etc.
  • Loading branch information
Absulit committed Jul 2, 2023
1 parent e646a2a commit 6a08210
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion examples/dithering3_1/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 => {

Expand Down
2 changes: 1 addition & 1 deletion examples/dithering3_2/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 => {

Expand Down
2 changes: 1 addition & 1 deletion examples/mouseclickscroll1/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 => {

Expand Down
4 changes: 2 additions & 2 deletions examples/noise1/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 => {

Expand Down
2 changes: 1 addition & 1 deletion examples/shapes1/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const shapes1 = {
init: async points => {
const numPoints = 128;
points.addUniform('numPoints', numPoints);
points.addStorage('points', numPoints, 'vec2<f32>', 8);
points.addStorage('points', numPoints, 'vec2<f32>', 2);
},
update: points => {

Expand Down
2 changes: 1 addition & 1 deletion examples/shapes2/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const shapes2 = {
init: async points => {
const numPoints = 800*800;
points.addUniform('numPoints', numPoints);
points.addStorage('points', numPoints, 'vec4<f32>', 16);
points.addStorage('points', numPoints, 'vec4<f32>', 4);
points.addSampler('feedbackSampler', null);
points.addBindingTexture('outputTex', 'computeTexture');
},
Expand Down

0 comments on commit 6a08210

Please sign in to comment.