4 ms·
This seems like magic to me. Granted I'm not a graphics developer, but given my current understanding of shaders (programmable functions that are run on the gp
by flumpcakes 6y ago
This seems like magic to me.
Granted I'm not a graphics developer, but given my current understanding of shaders (programmable functions that are run on the gpu working on textures/buffers?) I don't know how they interoperate with the physics engine which I would assume is running on the CPU.
I would love to see a paper on how they did this!
- dividuum 6y agoHere's some explanation on a similar effect and the surprisingly short shader code: https://www.patreon.com/posts/18245226 https://www.patreon.com/posts/18245226 It was referenced by Matthew here: https://twitter.com/skilful/status/1266494606847340544 https://twitter.com/skilful/status/1266494606847340544
- dx87 6y agoHere's a thread that someone made to explain how they did a similar effect in Godot [1]. [1] https://www.reddit.com/r/godot/comments/guhtfm/my_wip_liquidinbottle_shader_since_this_stuff/ https://www.reddit.com/r/godot/comments/guhtfm/my_wip_liquid...
- Jasper_ 6y agoThe CPU can pass state to the GPU. I imagine that a lot of that state (like the clip plane for the top of the water volume, including the normal which provides the "jiggle") was computed on the CPU, which can be updated by a simple spring model based on the object's velocity, which comes from the physics engine. In general, state like an object's velocity are commonly used for reprojection techniques like those used in temporal AA, so it's common to have around in the graphics system anyway. It's likely the particles and foam density are all computed on the CPU by this model as well. No need to do everything on the GPU.