I would like to pass the array data as a constant in the vertex and fragment programs. And since uniform arrays can only be set with go.set()
and not with render.constant_buffer()
, the idea is to pass the data as a generated small texture.
Looking at all these examples where people create post effects with a depth buffer etc., I still do not understand how it all works.
As I understand it’s not a problem to create a texture buffer with buffer.create()
and buffer.get_stream()
to fill the rgb
with data (is it truth?)
But can anyone explain step by step what to do with this buffer afterwards? How to pass it as the sampler texture to the shader? And will I be able to transfer this data to the vertex shader in the same way as I would to the fragment shader?