Elin Modding Docs Doc
Loading...
Searching...
No Matches
RenderDataRoof.cs
1using System;
2using UnityEngine;
3
5{
6 // Token: 0x02000755 RID: 1877
8 {
9 // Token: 0x06003659 RID: 13913 RVA: 0x001273C8 File Offset: 0x001255C8
10 public override void Draw(RenderParam p)
11 {
12 MeshPass meshPass = (this.hasSubPass && SubPassData.Current.enable) ? this.pass.subPass : this.pass;
13 MeshBatch meshBatch = meshPass.batches[meshPass.batchIdx];
14 int num = 1;
15 this._offset = this.offsets[(int)p.tile % this.offsets.Length] + this.offsetFixes[(int)p.tile % 2];
16 if (p.shadowFix != 0f)
17 {
18 this._offset += this.offsetFixes2[(int)p.shadowFix - 1];
19 }
20 if (meshPass == this.pass.subPass)
21 {
22 meshBatch.colors[meshPass.idx] = p.color - 1572864f;
23 meshBatch.matrices[meshPass.idx].SetTRS(p.NewVector3 + this._offset + SubPassData.Current.offset, SubPassData.Current.rotation, SubPassData.Current.scale);
24 }
25 else
26 {
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;
31 }
32 meshBatch.tiles[meshPass.idx] = p.tile + (float)(p.liquidLv * 10000 * num);
33 meshBatch.matColors[meshPass.idx] = p.matColor;
34 meshPass.idx++;
35 if (meshPass.idx == meshPass.batchSize)
36 {
37 meshPass.NextBatch();
38 }
39 if (p.snow && this.hasSnowPass && meshPass == this.pass)
40 {
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;
49 meshPass.idx++;
50 if (meshPass.idx == meshPass.batchSize)
51 {
52 meshPass.NextBatch();
53 }
54 }
55 }
56
57 // Token: 0x04001CB3 RID: 7347
58 public Vector3[] offsets;
59
60 // Token: 0x04001CB4 RID: 7348
61 public Vector3[] offsetFixes;
62
63 // Token: 0x04001CB5 RID: 7349
64 public Vector3[] offsetFixes2;
65 }
66}