An open API service indexing awesome lists of open source software.

https://github.com/typpo/gpu.js


https://github.com/typpo/gpu.js

Last synced: about 1 month ago
JSON representation

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..