Triton
Visual simulation library for ocean rendering.

Performance tuning tips

Triton will use as many special capabilities as it can find of your graphics hardware, taking advantage of CUDA, OpenCL, and the parallel computing capabilities of your main CPU whenever possible.

If you need even more performance, there are some things you can tweak.

If your engine or framework performs updates in a different pass and/or thread from rendering, have a look at the Ocean::UpdateSimulation() method. You may use this to perform the FFT calculations for Triton separately from the actual drawing in Ocean::Draw(), which can help performance in some situations.

If you believe vertex processing may be your bottleneck, you can decrease the number of polygons used in the projected grid used to render the ocean. Open up the file resources/Triton.config in a text editor, and reduce the value of default-grid-resolution. As the number of polygons increases with the square of this value, reducing it can have a big impact on some systems.

Computing the Fast Fourier Transforms associated with the TESSENDORF wave model can also be expensive. You can reduce the cost of these computations by reducing the values of fft-grid-dimension-x and fft-grid-dimension-y to a smaller power of 2. You may want to also reduce the fft-grid-size settings to match in order to avoid a loss in resolution (at the cost of increased tiling.)

If you're feeling adventurous, you can also edit the shaders used by Triton to simplify them. You'll find them in the resources folder; eliminating the sections that apply foam and noise may help performance slightly, but in our experience the small cost of these effects is well worth the visual quality.

 All Classes Files Functions Variables Friends