https://github.com/typpo/gpu.js
https://github.com/typpo/gpu.js
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/typpo/gpu.js
- Owner: typpo
- License: mit
- Created: 2013-07-31T16:06:32.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2014-09-17T05:43:06.000Z (almost 12 years ago)
- Last Synced: 2025-01-26T18:29:44.802Z (over 1 year ago)
- Language: JavaScript
- Size: 227 KB
- Stars: 2
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
gpu.js
======
An easier wrapper around WebCLGL.
Write your shader:
void main(float* A, float* B) {
vec2 x = get_global_id();
out_float = A[x] + B[x];
}
Then call it from Javascript:
var w = new GpuWorker();
w.setResultRange(0, 10);
var fn = w.prepare('testshader');
var res = fn([1.0, 2.0, 3.0, 4.0], [0.1, 0.2, 0.3, 0.4]);
console.log(res);
More to come..