Exemple #1
0
        private void BakeLand(IMapChunk chunk, Texture2D landTexture, TerrainSubBaker subBaker)
        {
            var landLayer = chunk.Terrain.gameObject.layer;

            chunk.Terrain.gameObject.layer = LayerMask.NameToLayer("Terrain Bake Temp");

            subBaker.PerformBakePass(
                chunk, landTexture, CameraClearFlags.SolidColor, OcclusionMask,
                TerrainBakeConfig.TerrainBakeOcclusionShader, "RenderType"
                );

            subBaker.PerformBakePass(
                chunk, landTexture, CameraClearFlags.Nothing, LandDrawingMask
                );

            chunk.Terrain.gameObject.layer = landLayer;
        }
Exemple #2
0
 private void BakeWater(IMapChunk chunk, Texture2D waterTexture, TerrainSubBaker subBaker)
 {
     subBaker.PerformBakePass(
         chunk, waterTexture, CameraClearFlags.SolidColor, WaterDrawingMask
         );
 }