private void RenderWeights(IMapChunk chunk, OrientationSubBaker subBaker) { WeightsMesh.Clear(); WeightsMesh.transform.SetParent(chunk.transform, false); foreach (var cell in chunk.CenteredCells) { WeightsTriangulator.TriangulateCellWeights(cell, WeightsMesh); } foreach (var cell in chunk.OverlappingCells) { WeightsTriangulator.TriangulateCellWeights(cell, WeightsMesh); } WeightsMesh.Apply(); subBaker.PerformBakePass(chunk, CameraClearFlags.SolidColor, NormalWeightsCullingMask); subBaker.PerformBakePass(chunk, CameraClearFlags.Nothing, RiverWeightsCullingMask, RenderConfig.RiverWeightShader, "RenderType"); }
private void RenderOrientation(IMapChunk chunk, OrientationSubBaker subBaker) { OrientationMesh.Clear(); OrientationMesh.transform.SetParent(chunk.transform, false); foreach (var cell in chunk.CenteredCells) { OrientationTriangulator.TriangulateOrientation(cell, OrientationMesh); } foreach (var cell in chunk.OverlappingCells) { OrientationTriangulator.TriangulateOrientation(cell, OrientationMesh); } OrientationMesh.Apply(); subBaker.PerformBakePass(chunk, CameraClearFlags.SolidColor, OrientationCullingMask); }
private void RenderDuck(IMapChunk chunk, OrientationSubBaker subBaker) { subBaker.PerformBakePass(chunk, CameraClearFlags.SolidColor, RiverDuckCullingMask); }