software-mansion / TypeGPU

TypeScript library that enhances the WebGPU API, allowing resource management in a type-safe, declarative way.
http://typegpu.com
MIT License
143 stars 2 forks source link

Define handling difference between value and reference types in WGSL and TS #333

Closed mhawryluk closed 1 month ago

mhawryluk commented 1 month ago

structs and vectors are copied when assigned in WGSL, but in JavaScript it's still pointing to the same object

mhawryluk commented 1 month ago

https://github.com/software-mansion/TypeGPU/discussions/355

mhawryluk commented 1 month ago

updated with fixes regarding passing arguments to functions @iwoplaza