gre / gl-react

gl-react – React library to write and compose WebGL shaders

Home Page:https://gl-react-cookbook.surge.sh

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Question: How to implement buffer ?

melMass opened this issue · comments

I'm trying to implement a fluid GLSL shader I have written.
I've used the glslViewer which by defaults comes with buffers from my searches it seems the best would be to split each buffer to its own shader. I just don't understand how to then share the buffer across react components.

For now here is the layout of my shader:

  1. buffer0 => advect fluids
  2. buffer1 => copy buffer0
  3. else => copy buffer1