Пример #1
0
        protected override void InitNode()
        {
            if (Atmosphere != null)
            {
                if (Atmosphere.ParentBody == null)
                {
                    Atmosphere.ParentBody = this;
                }
            }

            if (Ocean != null)
            {
                if (Ocean.ParentBody == null)
                {
                    Ocean.ParentBody = this;
                }

                // NOTE : Reinvert particular value to switch matrices for ocean rendering... Not used at the moment...
                //StartCoroutine(Ocean.InitializationFix());
            }

            if (Ring != null)
            {
                if (Ring.ParentBody == null)
                {
                    Ring.ParentBody = this;
                }
            }

            QuadMesh        = MeshFactory.MakePlane(GridResolution, MeshFactory.PLANE.XY, true, false, false);
            QuadMesh.bounds = new Bounds(Vector3.zero, new Vector3(1e8f, 1e8f, 1e8f));

            TileSamplers = new List <TileSampler>(GetComponentsInChildren <TileSampler>());
            TileSamplers.Sort(new TileSampler.Sort());

            MPB = new MaterialPropertyBlock();

            MaterialTable.GenerateLut();
        }
Пример #2
0
 private void Awake()
 {
     MaterialTable.GenerateLut();
 }