Exhibiting the results of StageRender. This is totally optional. It helps debugging your results,
keep in mind that only normalized values (ie [0,1]) will be shown properly.
In your projects using gl-compute, once your kernels are final you should disable the render stage given its processing cost.
Current example is iterative, processing the stages will yield incremental results.
Play around with the shaders bellow, update them and reprocess the stages.
This canvas is showing upscaled pixels, the colored squares are actually one pixel wide.
Depending on your inputs, or more exacly, the size of the stage's output you should readjust the scale factor
when using this visualization helper.
Check console to see the raw results being processed, along with some benchmark statistics.
Here you can configure the kernels for your computations. The vertex shader is a simple pass through
sending a screen sized quad to the fragment shader. You can still modify it.
Results will be passed over to the next stage ("StageB"). Full cycle's last stage results is also available in this first stage
via a uniform named after the last stage name ("StageB")
This intermediate stage may access results from the previous stage following its name.
The uniforms are made available automatically. Currently, declaring a gl-compute generated uniform in the shaders will result in error.
Use your browser's shader editor to check uniforms made available.
This stage is not part of the computations. It helps visualizing the results of any stage of the computation,
and do some further processing if convenient (ie. flip the vertical axis).
Internally data fed to WebGL is disposed following OpenGL's convention (left > right / bottom > top),
we usually expect top > bottom. Always keep this in mind when interpreting the data order you are feeding gl-compute.