Bake glsl shader into a Texture?

Are there any examples of this approach? I am confused.

I have a GLSL material and want to export baked in texture since, GLSL material applied to a mesh can’t be exported as GLTF files.

After creating a second canvas with preserveDrawingBuffer to true. How does one extract the texture information say as a png for use the baked in texture for GLTF files. :thinking: ?

This is something that I have been trying to do and came across this thread.