-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can I capture render result? #106
Comments
Thanks for the quick response! Can you explain a little more about why webgl backend doesn't support image exporting? I think image crate works in wasm32 target. |
Just to be sure, I may be wrong with your question, but I am talking about render to GPU and then move it to the CPU and exporting it to a file. Is that your use case? If you don't have a GPU notan will not work for you because all the rendering happens in the GPU. Anyway, going back to the question. The problem is not the image crate but the filesystem and how the browsers work. Save a file on browsers is "hard" and saving an image can be tricky because of encoding. So, there are two options:
This can be a nice feature behind a feature flag. What do you think? If this is useful for you I can try to do it for the develop branch with a simple API that works across platforms. |
I see why you are feeling confused. I'm actually trying to export image buffer for other jobs like image analyzing and more. I think this is quite straightforward (after I know how to do it LOL) so I won't bother you to add a new API. Let's just close this issue and thanks for your explanation! |
Hey @zimond I thought that this was a cool feature and I added it behind the The same example now will be:
It will take care of flipping the output for the RenderTexture and It works on browsers and desktop. I hope it helps. |
Thanks! |
Can I create a CPU buffer and render to it, So I can save the render result to an image? I'm not familiar with notan, and sorry if this is noob question.
The text was updated successfully, but these errors were encountered: