You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I do that the time uniform does not update, and darkness seems to pick out the data from time instead. also: the order of the struct Uniform members change the behaviour as this order does work:
or even do color: vec4f it works as expected again. I'm am very new to WebGPU, so I might be missing something obvious here, but from what I can tell there is no need to do manual layout/padding (?) for the struct definition? Also four seems to be handling things on its own with the std140 helper?
The text was updated successfully, but these errors were encountered:
tommhuth
changed the title
WebGPU uniforms and layout (?)
WebGPU uniforms and alignment (?)
Dec 26, 2024
I'm using the webgpu cube example and added a few more uniforms to test stuff out (sorry, I couldn't get this to work on Codesandbox):
When I do that the
time
uniform does not update, and darkness seems to pick out the data fromtime
instead. also: the order of thestruct Uniform
members change the behaviour as this order does work:or even do
color: vec4f
it works as expected again. I'm am very new to WebGPU, so I might be missing something obvious here, but from what I can tell there is no need to do manual layout/padding (?) for the struct definition? Alsofour
seems to be handling things on its own with thestd140
helper?The text was updated successfully, but these errors were encountered: