#How to move data out of shader into app world?

5 messages · Page 1 of 1 (latest)

lavish stratus
#

Is there a resource (blog post, example, crate, video, anything to set me on the right path) that covers exporting data out of a shader and into the app world?

More concretely (in case this use case has a happy path), I'm modifying a mesh and would ideally like to communicate that mesh data back to the app world so I can save/cache it as an asset.

And some extra info: Currently I'm doing it through a custom Material's vertex shader cause it was the only way I knew how to get something on the screen to see if my shader works

wise linden
lavish stratus
#

Hi! Thanks, I'll try and make my way through the example. I did see this before, but glancing at it a lot of it kinda went over my head since I don't understand what some of the APIs do.

I'll try cloning it and just following the Intellisense breadcrumbs if that's the best resource we currently have

misty token
#

You'll also need to use a channel or some other asynchronous way of communicating when you want to go from the Render world back to the App world

misty token
#

For what its worth it's probably best to try to just modify the mesh in the App world instead of in the render world, unless you're doing something like using GPU compute to do marching cubes on a grid