This PR adds support for using textures to update the visuals rather than vertex buffers.
Details
Overview
There are now two methods that can be used to update the waves visuals. The first is the existing approach that updates the vertex, normal and tangent buffers each frame and is selected using the parameter
and is the method used in the new model ocean_waves. This approach uses custom shaders which may be configured using the shader parameters in the model. This approach is suitable for tiling large areas of ocean.
Parameters
The visual plugin has new parameters to select the deformation method and the tiling
This PR adds support for using textures to update the visuals rather than vertex buffers.
Details
Overview
There are now two methods that can be used to update the waves visuals. The first is the existing approach that updates the vertex, normal and tangent buffers each frame and is selected using the parameter
This method uses PBS materials (i.e. no custom shader) and is the default configuration for the
waves
model.The second method updates textures for the displacement and surface derivatives. It is selected using:
and is the method used in the new model
ocean_waves
. This approach uses custom shaders which may be configured using the shader parameters in the model. This approach is suitable for tiling large areas of ocean.Parameters
The visual plugin has new parameters to select the deformation method and the tiling
The
<tiles_x>
and<tiles_y>
elements specify a range of tiles with the offset being from the origin.When using a custom shader, the default parameters may be overridden using the parameters listed below: