Skip to content

Instantly share code, notes, and snippets.

@jt0dd
Created September 2, 2018 19:13
Show Gist options
  • Save jt0dd/edb81be4b55ed1e2281f7afbcbe2b1e2 to your computer and use it in GitHub Desktop.
Save jt0dd/edb81be4b55ed1e2281f7afbcbe2b1e2 to your computer and use it in GitHub Desktop.
const gpuTexturize = graphics.gpu
.createKernel(function(buffer, width) {
var channel = buffer[((this.thread.z * width * 4) + this.thread.y * 4) + this.thread.x]
return channel;
})
.setOutput([4, image.width, image.height]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment