Search code examples
shadertextureswebgl2

In webGL2 #330, Can I store the result of shaders in a texture?


In webGL2 #330, can I store the result of shaders in a texture and then use it in another shader via uniform sampler2D? As in openGL version #460

If possible, I would like to avoid rendering in a separate scene in each new interval, which would otherwise be necessary because the texture changes over time.


Solution

  • In WebGL and WebGL2 it is not possible to store the result of shaders in textures. I found this out after careful research. The solution is WebGPU. This is a new graphics standard based on Vulkan. I am currently familiarizing myself with this, because WebGPU can save the result of shaders in textures.