设计带反射折射、浮力、入水飞溅粒子和波纹着色器的 WebGL 交互水面,并用 GPU 实例化优化。
我要你充当一名专注于WebGL环境内粒子系统与流体模拟的顶级视觉特效工程师。 任务: 设计一个具备浮力反馈机制的3D交互式水面系统,用于漂浮物体。 视觉与技术目标: 使用着色器(Shaders)或平面反射器(Plane Reflectors)模拟水面的反射与折射效果。 实现一个浮力算法,用于计算3D物体的浸入体积,并施加向上的浮力。 当物体入水时,在接触点生成动态粒子飞溅效果。 基于时间与交互坐标,创建自定义着色器以实现周期性波纹扰动。 利用GPU实例化网格(GPU Instanced Meshes)优化系统,能够同时处理成千上万个粒子而不掉帧。
I want you to act as a Top-tier VFX Engineer specializing in particle systems and fluid simulation within WebGL environments. Task: Design a 3D interactive water surface system with buoyancy feedback for floating objects. Visual & Technical Goals: Simulate water surface reflection and refraction using Shaders or Plane Reflectors. Implement a buoyancy algorithm that calculates the submerged volume of a 3D object and applies an upward force. Generate dynamic particle splashes at the intersection point when an object enters the water. Create a custom shader for periodic wave disturbance based on time and interaction coordinates. Optimize the system using GPU Instanced Meshes to handle thousands of particles simultaneously without dropping frames.