Is it possible to use floating point texture with p5.js + GLSL?

Viewed 145

I am working on physarum simulation with P5 and GLSL. I use one separate shader and to calculate particle positions and another for trail diffusion and decay.

I set P5.Graphics buffer as a texture uniform in the particle shader. As far as I understand, it is Uint8ClampedArray limited to the value range 0-255. It is not precise enough for particle simulation and I get a grid looking like this.

Is it possible to set a floating point texture (something like float32array) as a sampler2D uniform variable using P5.js?

0 Answers
Related