Example #1
0
 public void Init()
 {
     if (!ObjectLayout) return;
     Cache = new ClustersCache(ObjectLayout.SummaryInstanceCount());
     Cache.matProperty = new MaterialPropertyBlock();
     ObjectLayout.Init(Cache);
 }
Example #2
0
 public void CopyFrom(ClustersCache cache, int index, int length)
 {
     /*
      * Array.Copy(cache.TRSmatrices, 0, this.TRSmatrices, index, length);
      * Array.Copy(cache.BoundingBuffer, 0, this.BoundingBuffer, index, length);
      * Array.Copy(cache.Visible, 0, this.Visible, index, length);
      */
 }
Example #3
0
 // Use this for initialization
 public virtual void Init(ClustersCache renderCache)
 {
     this.renderCache = renderCache;
     InitCullBound();
     //force update object Transform
     ResetObjectTransform();
     Changed = false;
 }
Example #4
0
 public override void Init(ClustersCache renderCache)
 {
     if (SummaryInstanceCount() > 1022)
     {
         Debug.LogError("Instance count >1022");
         return;
     }
     this.renderCache = renderCache;
     foreach (var layout in Layouts)
     {
         ClustersCache cache = new ClustersCache(layout.InstanceCount);
         cache.matProperty = renderCache.matProperty;
         layout.Init(cache);
     }
     Changed = false;
 }
Example #5
0
 public override void Init(ClustersCache renderCache)
 {
     base.Init(renderCache);
 }