2
3

More than 3 years have passed since last update.

GPU-GEMS-3D-Fluid-Simulation を若干最適化した結果

Posted at

Scrawk氏が公開している GPU-GEMS-3D-Fluid-Simulation のシェーダーコードに以下の最適化を行ってみました。

  • if文の置き換え(lerp関数とstep関数へ)
  • ComputeBufferの代わりにRenderTextureを使う

最適化後のコードはこちら

結果

  • 167.7 -> 300.3 FPS ※スナップショット時

Before
Original.PNG
After
TinyOptimization.PNG

参考

2
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
3