How To Do a Transform Feedback on Vertex Shader

I need to read Shader Updated data in CPU, I guess its possible to do this with Transform Feedback, how to do a Transform Feedback on Vertex Shader or Fragment Shader , or Just somehow read Shader Updated data on CPU

I’m not sure WebGL supports ready GPU vertex buffer data back to CPU.
I think your better option would be to store data in a texture, and use fragment shader to process them to another texture, and download that.

Thank you very much for your reply. I’ve been stuck on this for two days now.

If possible, could you please briefly describe how I can do it?

Edit:
like this ?

https://playcanvas.vercel.app/#/graphics/multi-render-targets

and this ?

https://playcanvas.vercel.app/#/graphics/render-to-texture

I’ve done similar stand alone example before, so something like that.
1.zip (225.5 KB)

This loads the textures (your input data), processes them using a shader to a different texture. We just need to download it, not part of this example.

Thank you so much! I will check it out.

Had meeting, back now. This is not the simplest code, it generates the shader based on the number of textures for example, to prototype a generic texture layers processing tool in a way. But the idea is there. Write a custom shader and do it. Allocate texture with 32bit floats instead of 8bit and similar. Even MRT if you need to output more data.

yes but in my cause it will be little hard or Impossible to do that, I’m making a water shader and I need to get the water height using local coord of water entity so I switch to texture approach, but still cant get the correct height