9 if (this.useOffsetBack)
11 this._offset = ((p.dir % 4 >= 2) ? this.offsetBack : this.offset);
13 int num = (p.tile % 2f == 1f || p.tile < 0f || !this.symmetry) ? 1 : -1;
14 int num2 = (p.tile < 0f) ? -1 : 1;
15 MeshBatch meshBatch = this.pass.batches[this.pass.batchIdx];
16 meshBatch.matrices[this.pass.idx].m03 = p.x + this._offset.x * (float)num;
17 meshBatch.matrices[this.pass.idx].m13 = p.y + this._offset.y;
18 meshBatch.matrices[this.pass.idx].m23 = p.z + this._offset.z;
19 meshBatch.tiles[this.pass.idx] = p.tile + (float)(this.liquid ? (p.liquidLv * 10000 * num2) : 0);
20 meshBatch.colors[this.pass.idx] = p.color;
21 meshBatch.matColors[this.pass.idx] = p.matColor;
23 if (this.pass.idx ==
this.pass.batchSize)
25 this.pass.NextBatch();
29 meshBatch.matrices[this.pass.idx].m03 = p.x + this._offset.x * (float)num;
30 meshBatch.matrices[this.pass.idx].m13 = p.y + this._offset.y + this.pass.pmesh.size.y;
31 meshBatch.matrices[this.pass.idx].m23 = p.z + this._offset.z +
RenderData.renderSetting.vFix.z;
32 meshBatch.tiles[this.pass.idx] = p.tile - this.pass.pmesh.tiling.x + (float)(this.liquid ? (p.liquidLv * 10000 * num2) : 0);
33 meshBatch.colors[this.pass.idx] = p.color;
34 meshBatch.matColors[this.pass.idx] = p.matColor;
36 if (this.pass.idx ==
this.pass.batchSize)
38 this.pass.NextBatch();
41 if (p.snow &&
this.hasSnowPass)
43 MeshPass snowPass = this.pass.snowPass;
44 meshBatch = snowPass.batches[snowPass.batchIdx];
45 meshBatch.colors[snowPass.idx] = p.color;
46 meshBatch.matrices[snowPass.idx].m03 = p.x + this._offset.x * (float)num;
47 meshBatch.matrices[snowPass.idx].m13 = p.y + this._offset.y;
48 meshBatch.matrices[snowPass.idx].m23 = p.z + this._offset.z + this.snowZ;
49 meshBatch.tiles[snowPass.idx] = p.tile + (float)(p.liquidLv * 10000 * num2);
50 meshBatch.matColors[snowPass.idx] = 104025f;
52 if (snowPass.idx == snowPass.batchSize)
60 public override void DrawWithRotation(
RenderParam p,
float angle)
62 MeshPass subPass = this.pass.subPass;
63 p.NewVector3 + this.offset;
67 private void OnValidate()
69 this._offset = this.offset;
76 public float snowZ = -0.01f;