You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
1.1 KiB
30 lines
1.1 KiB
namespace UnityEngine.Rendering.HighDefinition
|
|
{
|
|
public partial class HDRenderPipeline
|
|
{
|
|
void RenderWaterAsWireFrame(CommandBuffer cmd, HDCamera hdCamera)
|
|
{
|
|
// If the water is disabled, no need to render
|
|
if (!ShouldRenderWater(hdCamera))
|
|
return;
|
|
|
|
WaterRendering settings = hdCamera.volumeStack.GetComponent<WaterRendering>();
|
|
|
|
var data = new WaterRenderingData();
|
|
PrepareWaterRenderingData(data, hdCamera);
|
|
data.BindGlobal(cmd);
|
|
|
|
var waterSurfaces = WaterSurface.instancesAsArray;
|
|
for (int surfaceIdx = 0; surfaceIdx < data.numSurfaces; ++surfaceIdx)
|
|
{
|
|
// Grab the current water surface
|
|
WaterSurface currentWater = waterSurfaces[surfaceIdx];
|
|
ref var surfaceData = ref data.surfaces[surfaceIdx];
|
|
|
|
// Render the water surface
|
|
PrepareSurfaceGBufferData(hdCamera, settings, currentWater, surfaceIdx, ref surfaceData);
|
|
RenderWaterSurface(cmd, data, ref surfaceData);
|
|
}
|
|
}
|
|
}
|
|
}
|