Skip to content

Issues with u32 values comming from JS #315

Description

@Absulit

Passing a u32 value from JS, should be expected correct on the WGSL side, but the value is orders of magnitude bigger than expected

example

uniforms.VALUE.setType('u32').setValue(16)

logging the value with addEventListener show the value of VALUE explodes in size like in the millions.

This is also happening with storages, like creating a vec3u doesn't work propertly, it has to be passed as vec3f and then reconverted as vec3u on WGSL side.

I know by default all is converted to f32, but that's the idea, to simplify it to the user. I don't recall this problem before.

Sending a u32 shoud receive the correct number on the WGSL side.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions