gpujs/gpu.js

Somewhere of the output image get blur

RockyBruce opened this issue · 0 comments

What is wrong?

I used a flat Int32Array as the constant of a kernel function, which length is 330 * 360 *240.
Based on this constant, I use this kernel function to interpolate and generate an Image with a size of 330 * 360.
However, the image gets somewhere blurry (like waves). It seems array indexing gets left or right which is similar to issue #314, but I still can not find a way to solve it.

Where does it happen?

How do we replicate the issue?

  • Creating a flat Int32Array as the constant for the kernel, which length is 330 * 360 * 240.
  • setOuput([330, 360])
  • setGraphical(true)
  • Use the kernel function to interpolate and create pixel data for the image.
  • Get the kernel canvas and draw it on a canvas.

How important is this (1-5)?

5, It seems like a memory allocation issue, but I have no idea how to handle it.

Expected behavior (i.e. solution)

The image created is perfect, which has no wave in this image.

Other Comments