12 MeshPass meshPass = (this.hasSubPass &&
SubPassData.Current.enable) ? this.pass.subPass : this.pass;
13 MeshBatch meshBatch = meshPass.batches[meshPass.batchIdx];
15 this._offset = this.offsets[(int)p.tile %
this.offsets.Length] +
this.offsetFixes[(
int)p.tile % 2];
16 if (p.shadowFix != 0f)
18 this._offset += this.offsetFixes2[(int)p.shadowFix - 1];
20 if (meshPass == this.pass.subPass)
22 meshBatch.colors[meshPass.idx] = p.color - 1572864f;
27 meshBatch.colors[meshPass.idx] = p.color;
28 meshBatch.matrices[meshPass.idx].m03 = p.x + this._offset.x * (float)num;
29 meshBatch.matrices[meshPass.idx].m13 = p.y + this._offset.y;
30 meshBatch.matrices[meshPass.idx].m23 = p.z + this._offset.z;
32 meshBatch.tiles[meshPass.idx] = p.tile + (float)(p.liquidLv * 10000 * num);
33 meshBatch.matColors[meshPass.idx] = p.matColor;
35 if (meshPass.idx == meshPass.batchSize)
39 if (p.snow &&
this.hasSnowPass && meshPass ==
this.pass)
41 meshPass = this.pass.snowPass;
42 meshBatch = meshPass.batches[meshPass.batchIdx];
43 meshBatch.colors[meshPass.idx] = p.color;
44 meshBatch.matrices[meshPass.idx].m03 = p.x + this._offset.x * (float)num;
45 meshBatch.matrices[meshPass.idx].m13 = p.y + this._offset.y;
46 meshBatch.matrices[meshPass.idx].m23 = p.z + this._offset.z - 0.01f;
47 meshBatch.tiles[meshPass.idx] = p.tile + (float)(p.liquidLv * 10000 * num);
48 meshBatch.matColors[meshPass.idx] = 104025f;
50 if (meshPass.idx == meshPass.batchSize)
58 public Vector3[] offsets;
61 public Vector3[] offsetFixes;
64 public Vector3[] offsetFixes2;