render = {
const canvas = DOM.canvas(500, 500);
const gl = canvas.getContext('webgl');
const gpu = new GPU({
canvas,
webGl: gl
});
gl.enable(gl.BLEND);
gl.blendFunc(gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA);
const krender = gpu.createKernel(function(x) {
this.color(this.thread.x / 500, this.thread.y / 500, x[0], x[1]);
})
.setDebug(true)
.setOutput([500, 500])
.setGraphical(true);
return krender;
}