gpujs / gpu.js

GPU Accelerated JavaScript
https://gpu.rocks
MIT License
15.12k stars 655 forks source link

Random plugin not included in shader source. #774

Open create3000 opened 2 years ago

create3000 commented 2 years ago

If Math.random is in a function added by kernel.addFunction, kernel.setFunctions or gpu.addFunction then the plugin is not includes in the shader source.

Workaround: add a comment with // Math.random() to your main kernel function.

create3000 commented 2 years ago

Note: I have used gpu-browser.js from /dist.