Pryme8 Posted January 12, 2018 Share Posted January 12, 2018 can glsl manipulate a texture buffer? like can I use a shader script to write to an already bound texture buffer? Or is that CPU only? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted January 12, 2018 Share Posted January 12, 2018 Nope you can do that with no problem but using RenderTargetTexture : https://www.babylonjs-playground.com/#14VWOV#8 Pryme8 1 Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted January 12, 2018 Author Share Posted January 12, 2018 hmmm, dang I was hoping to be able to manipulate per-pixl on a bound buffer through the shader for the purpose of superfast fluid simulations. Quote Link to comment Share on other sites More sharing options...
PsichiX Posted January 14, 2018 Share Posted January 14, 2018 and exactly for that you use RTT with doublebuffering - it will give you super fast particle simulation. idea is simple: on start fill rtt A with initial fluid data and on render set target to rtt B and bind rtt A texture, perform simulation, swap target with source, repeat. GameMonetize, Pryme8 and julien-moreau 2 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.