I want to perform particle computation in GPU and use the result to render the particle. Now I am able to perform the computation with WebGL, and I am trying to render the result of computation to a texture.
2. A minimal code example. If you've found a bug, this helps us reproduce and repair it.
I don't have a code example but a rough plan:
The source code of DrawCommand contains a framebuffer option.
https://github.com/AnalyticalGraphicsInc/cesium/blob/039375c3c33c577a5afae3bff62da83c819fe50b/Source/Renderer/DrawCommand.js#L34
Maybe I can create a Cesium.Framebuffer and pass it to the DrawCommand?
https://github.com/AnalyticalGraphicsInc/cesium/blob/master/Source/Renderer/Framebuffer.js
Then I may use the _colorTextures(I am not sure which texture to use) of Framebuffer as a uniform?
Finally I set up a custom primitive with custom vertex and fragment shader source by using MaterialAppearence and begin my custom WebGl render?
I am not sure whether it will works. I will appreciate it if you can tell me a better(simpler) solution.
3. Context. Why do you need to do this? We might know a better way to accomplish your goal.
I want to make a GPU particle system. You can see the full problem context in my previous threads:
https://groups.google.com/forum/#!topic/cesium-dev/gjjd9TNeY2A
https://groups.google.com/forum/#!topic/cesium-dev/vR7H4KJURJ8
https://groups.google.com/forum/#!topic/cesium-dev/7kCcITmGbEA
4. The Cesium version you're using, your operating system and browser.
Cesium 1.53
--
You received this message because you are subscribed to a topic in the Google Groups "cesium-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cesium-dev/gpgLjYyNFKE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cesium-dev+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and all its topics, send an email to cesium-dev+unsubscribe@googlegroups.com.
Thanks for your help!I wrote a example of render to texture. I hope it can help othersIt is a rough(and probably imperfect) example, if someone has a better idea, please feel free to improve it.
Omar Shehata <omar.sam...@gmail.com> 于2019年2月18日周一 上午11:50写道:
To unsubscribe from this group and all its topics, send an email to cesiu...@googlegroups.com.