GPU Accelerated Modelling and Real-time Rendering of Fluid Motion
William Valentine, Ramakrishnan Mukundan · 2023
This paper proposes a fluid rendering pipeline that uses OpenGL-4 shaders to employ the parallel processing capabilities of the GPU. The fluid’s surface mesh is produced using tessellation shader stages where the input patches are assigned tessellation levels based on the fluid heightmap’s curvature. The curvature is stored using a texture buffer object which allows access by shaders, thus allowing the tessellation calculations to be carried out in parallel. Use of this adaptive tessellation method increases both the simulation’s framerate as well as its capacity to handle a greater number of primitives. Furthermore, it more optimally distributes the mesh’s vertices to effectively increase the level of detail without using more primitives. Polygon culling using the geometry shader further optimises the number of primitives used to define the fluid surface. The Phong-Blinn model is used for surface lighting. We propose two GPU-based fluid surface flow visualisation methods. Texture buffer objects can be used to store and update a surface texture. Alternatively, particle positions are updated each frame using the geometry shader and stored in a buffer object using transform feedback. These flow visualisation techniques are particularly effective for communicating the swirling motion of vortices.