501 lines
12 KiB
C#
501 lines
12 KiB
C#
using System;
|
|
using System.Runtime.CompilerServices;
|
|
using UnityEngine.Scripting;
|
|
|
|
namespace UnityEngine.Rendering
|
|
{
|
|
// Token: 0x020000B7 RID: 183
|
|
[UsedByNativeCode]
|
|
public struct SphericalHarmonicsL2
|
|
{
|
|
// Token: 0x06000E35 RID: 3637 RVA: 0x000134D0 File Offset: 0x000116D0
|
|
public void Clear()
|
|
{
|
|
SphericalHarmonicsL2.ClearInternal(ref this);
|
|
}
|
|
|
|
// Token: 0x06000E36 RID: 3638 RVA: 0x000134DC File Offset: 0x000116DC
|
|
private static void ClearInternal(ref SphericalHarmonicsL2 sh)
|
|
{
|
|
SphericalHarmonicsL2.INTERNAL_CALL_ClearInternal(ref sh);
|
|
}
|
|
|
|
// Token: 0x06000E37 RID: 3639
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
private static extern void INTERNAL_CALL_ClearInternal(ref SphericalHarmonicsL2 sh);
|
|
|
|
// Token: 0x06000E38 RID: 3640 RVA: 0x000134E8 File Offset: 0x000116E8
|
|
public void AddAmbientLight(Color color)
|
|
{
|
|
SphericalHarmonicsL2.AddAmbientLightInternal(color, ref this);
|
|
}
|
|
|
|
// Token: 0x06000E39 RID: 3641 RVA: 0x000134F4 File Offset: 0x000116F4
|
|
private static void AddAmbientLightInternal(Color color, ref SphericalHarmonicsL2 sh)
|
|
{
|
|
SphericalHarmonicsL2.INTERNAL_CALL_AddAmbientLightInternal(ref color, ref sh);
|
|
}
|
|
|
|
// Token: 0x06000E3A RID: 3642
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
private static extern void INTERNAL_CALL_AddAmbientLightInternal(ref Color color, ref SphericalHarmonicsL2 sh);
|
|
|
|
// Token: 0x06000E3B RID: 3643 RVA: 0x00013500 File Offset: 0x00011700
|
|
public void AddDirectionalLight(Vector3 direction, Color color, float intensity)
|
|
{
|
|
Color color2 = color * (2f * intensity);
|
|
SphericalHarmonicsL2.AddDirectionalLightInternal(direction, color2, ref this);
|
|
}
|
|
|
|
// Token: 0x06000E3C RID: 3644 RVA: 0x00013524 File Offset: 0x00011724
|
|
private static void AddDirectionalLightInternal(Vector3 direction, Color color, ref SphericalHarmonicsL2 sh)
|
|
{
|
|
SphericalHarmonicsL2.INTERNAL_CALL_AddDirectionalLightInternal(ref direction, ref color, ref sh);
|
|
}
|
|
|
|
// Token: 0x06000E3D RID: 3645
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
private static extern void INTERNAL_CALL_AddDirectionalLightInternal(ref Vector3 direction, ref Color color, ref SphericalHarmonicsL2 sh);
|
|
|
|
// Token: 0x06000E3E RID: 3646
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
public extern void Evaluate(Vector3[] directions, Color[] results);
|
|
|
|
// Token: 0x170002EF RID: 751
|
|
public float this[int rgb, int coefficient]
|
|
{
|
|
get
|
|
{
|
|
float num;
|
|
switch (rgb * 9 + coefficient)
|
|
{
|
|
case 0:
|
|
num = this.shr0;
|
|
break;
|
|
case 1:
|
|
num = this.shr1;
|
|
break;
|
|
case 2:
|
|
num = this.shr2;
|
|
break;
|
|
case 3:
|
|
num = this.shr3;
|
|
break;
|
|
case 4:
|
|
num = this.shr4;
|
|
break;
|
|
case 5:
|
|
num = this.shr5;
|
|
break;
|
|
case 6:
|
|
num = this.shr6;
|
|
break;
|
|
case 7:
|
|
num = this.shr7;
|
|
break;
|
|
case 8:
|
|
num = this.shr8;
|
|
break;
|
|
case 9:
|
|
num = this.shg0;
|
|
break;
|
|
case 10:
|
|
num = this.shg1;
|
|
break;
|
|
case 11:
|
|
num = this.shg2;
|
|
break;
|
|
case 12:
|
|
num = this.shg3;
|
|
break;
|
|
case 13:
|
|
num = this.shg4;
|
|
break;
|
|
case 14:
|
|
num = this.shg5;
|
|
break;
|
|
case 15:
|
|
num = this.shg6;
|
|
break;
|
|
case 16:
|
|
num = this.shg7;
|
|
break;
|
|
case 17:
|
|
num = this.shg8;
|
|
break;
|
|
case 18:
|
|
num = this.shb0;
|
|
break;
|
|
case 19:
|
|
num = this.shb1;
|
|
break;
|
|
case 20:
|
|
num = this.shb2;
|
|
break;
|
|
case 21:
|
|
num = this.shb3;
|
|
break;
|
|
case 22:
|
|
num = this.shb4;
|
|
break;
|
|
case 23:
|
|
num = this.shb5;
|
|
break;
|
|
case 24:
|
|
num = this.shb6;
|
|
break;
|
|
case 25:
|
|
num = this.shb7;
|
|
break;
|
|
case 26:
|
|
num = this.shb8;
|
|
break;
|
|
default:
|
|
throw new IndexOutOfRangeException("Invalid index!");
|
|
}
|
|
return num;
|
|
}
|
|
set
|
|
{
|
|
switch (rgb * 9 + coefficient)
|
|
{
|
|
case 0:
|
|
this.shr0 = value;
|
|
break;
|
|
case 1:
|
|
this.shr1 = value;
|
|
break;
|
|
case 2:
|
|
this.shr2 = value;
|
|
break;
|
|
case 3:
|
|
this.shr3 = value;
|
|
break;
|
|
case 4:
|
|
this.shr4 = value;
|
|
break;
|
|
case 5:
|
|
this.shr5 = value;
|
|
break;
|
|
case 6:
|
|
this.shr6 = value;
|
|
break;
|
|
case 7:
|
|
this.shr7 = value;
|
|
break;
|
|
case 8:
|
|
this.shr8 = value;
|
|
break;
|
|
case 9:
|
|
this.shg0 = value;
|
|
break;
|
|
case 10:
|
|
this.shg1 = value;
|
|
break;
|
|
case 11:
|
|
this.shg2 = value;
|
|
break;
|
|
case 12:
|
|
this.shg3 = value;
|
|
break;
|
|
case 13:
|
|
this.shg4 = value;
|
|
break;
|
|
case 14:
|
|
this.shg5 = value;
|
|
break;
|
|
case 15:
|
|
this.shg6 = value;
|
|
break;
|
|
case 16:
|
|
this.shg7 = value;
|
|
break;
|
|
case 17:
|
|
this.shg8 = value;
|
|
break;
|
|
case 18:
|
|
this.shb0 = value;
|
|
break;
|
|
case 19:
|
|
this.shb1 = value;
|
|
break;
|
|
case 20:
|
|
this.shb2 = value;
|
|
break;
|
|
case 21:
|
|
this.shb3 = value;
|
|
break;
|
|
case 22:
|
|
this.shb4 = value;
|
|
break;
|
|
case 23:
|
|
this.shb5 = value;
|
|
break;
|
|
case 24:
|
|
this.shb6 = value;
|
|
break;
|
|
case 25:
|
|
this.shb7 = value;
|
|
break;
|
|
case 26:
|
|
this.shb8 = value;
|
|
break;
|
|
default:
|
|
throw new IndexOutOfRangeException("Invalid index!");
|
|
}
|
|
}
|
|
}
|
|
|
|
// Token: 0x06000E41 RID: 3649 RVA: 0x000138EC File Offset: 0x00011AEC
|
|
public override int GetHashCode()
|
|
{
|
|
int num = 17;
|
|
num = num * 23 + this.shr0.GetHashCode();
|
|
num = num * 23 + this.shr1.GetHashCode();
|
|
num = num * 23 + this.shr2.GetHashCode();
|
|
num = num * 23 + this.shr3.GetHashCode();
|
|
num = num * 23 + this.shr4.GetHashCode();
|
|
num = num * 23 + this.shr5.GetHashCode();
|
|
num = num * 23 + this.shr6.GetHashCode();
|
|
num = num * 23 + this.shr7.GetHashCode();
|
|
num = num * 23 + this.shr8.GetHashCode();
|
|
num = num * 23 + this.shg0.GetHashCode();
|
|
num = num * 23 + this.shg1.GetHashCode();
|
|
num = num * 23 + this.shg2.GetHashCode();
|
|
num = num * 23 + this.shg3.GetHashCode();
|
|
num = num * 23 + this.shg4.GetHashCode();
|
|
num = num * 23 + this.shg5.GetHashCode();
|
|
num = num * 23 + this.shg6.GetHashCode();
|
|
num = num * 23 + this.shg7.GetHashCode();
|
|
num = num * 23 + this.shg8.GetHashCode();
|
|
num = num * 23 + this.shb0.GetHashCode();
|
|
num = num * 23 + this.shb1.GetHashCode();
|
|
num = num * 23 + this.shb2.GetHashCode();
|
|
num = num * 23 + this.shb3.GetHashCode();
|
|
num = num * 23 + this.shb4.GetHashCode();
|
|
num = num * 23 + this.shb5.GetHashCode();
|
|
num = num * 23 + this.shb6.GetHashCode();
|
|
num = num * 23 + this.shb7.GetHashCode();
|
|
return num * 23 + this.shb8.GetHashCode();
|
|
}
|
|
|
|
// Token: 0x06000E42 RID: 3650 RVA: 0x00013B74 File Offset: 0x00011D74
|
|
public override bool Equals(object other)
|
|
{
|
|
bool flag;
|
|
if (!(other is SphericalHarmonicsL2))
|
|
{
|
|
flag = false;
|
|
}
|
|
else
|
|
{
|
|
SphericalHarmonicsL2 sphericalHarmonicsL = (SphericalHarmonicsL2)other;
|
|
flag = this == sphericalHarmonicsL;
|
|
}
|
|
return flag;
|
|
}
|
|
|
|
// Token: 0x06000E43 RID: 3651 RVA: 0x00013BB0 File Offset: 0x00011DB0
|
|
public static SphericalHarmonicsL2 operator *(SphericalHarmonicsL2 lhs, float rhs)
|
|
{
|
|
return new SphericalHarmonicsL2
|
|
{
|
|
shr0 = lhs.shr0 * rhs,
|
|
shr1 = lhs.shr1 * rhs,
|
|
shr2 = lhs.shr2 * rhs,
|
|
shr3 = lhs.shr3 * rhs,
|
|
shr4 = lhs.shr4 * rhs,
|
|
shr5 = lhs.shr5 * rhs,
|
|
shr6 = lhs.shr6 * rhs,
|
|
shr7 = lhs.shr7 * rhs,
|
|
shr8 = lhs.shr8 * rhs,
|
|
shg0 = lhs.shg0 * rhs,
|
|
shg1 = lhs.shg1 * rhs,
|
|
shg2 = lhs.shg2 * rhs,
|
|
shg3 = lhs.shg3 * rhs,
|
|
shg4 = lhs.shg4 * rhs,
|
|
shg5 = lhs.shg5 * rhs,
|
|
shg6 = lhs.shg6 * rhs,
|
|
shg7 = lhs.shg7 * rhs,
|
|
shg8 = lhs.shg8 * rhs,
|
|
shb0 = lhs.shb0 * rhs,
|
|
shb1 = lhs.shb1 * rhs,
|
|
shb2 = lhs.shb2 * rhs,
|
|
shb3 = lhs.shb3 * rhs,
|
|
shb4 = lhs.shb4 * rhs,
|
|
shb5 = lhs.shb5 * rhs,
|
|
shb6 = lhs.shb6 * rhs,
|
|
shb7 = lhs.shb7 * rhs,
|
|
shb8 = lhs.shb8 * rhs
|
|
};
|
|
}
|
|
|
|
// Token: 0x06000E44 RID: 3652 RVA: 0x00013D80 File Offset: 0x00011F80
|
|
public static SphericalHarmonicsL2 operator *(float lhs, SphericalHarmonicsL2 rhs)
|
|
{
|
|
return new SphericalHarmonicsL2
|
|
{
|
|
shr0 = rhs.shr0 * lhs,
|
|
shr1 = rhs.shr1 * lhs,
|
|
shr2 = rhs.shr2 * lhs,
|
|
shr3 = rhs.shr3 * lhs,
|
|
shr4 = rhs.shr4 * lhs,
|
|
shr5 = rhs.shr5 * lhs,
|
|
shr6 = rhs.shr6 * lhs,
|
|
shr7 = rhs.shr7 * lhs,
|
|
shr8 = rhs.shr8 * lhs,
|
|
shg0 = rhs.shg0 * lhs,
|
|
shg1 = rhs.shg1 * lhs,
|
|
shg2 = rhs.shg2 * lhs,
|
|
shg3 = rhs.shg3 * lhs,
|
|
shg4 = rhs.shg4 * lhs,
|
|
shg5 = rhs.shg5 * lhs,
|
|
shg6 = rhs.shg6 * lhs,
|
|
shg7 = rhs.shg7 * lhs,
|
|
shg8 = rhs.shg8 * lhs,
|
|
shb0 = rhs.shb0 * lhs,
|
|
shb1 = rhs.shb1 * lhs,
|
|
shb2 = rhs.shb2 * lhs,
|
|
shb3 = rhs.shb3 * lhs,
|
|
shb4 = rhs.shb4 * lhs,
|
|
shb5 = rhs.shb5 * lhs,
|
|
shb6 = rhs.shb6 * lhs,
|
|
shb7 = rhs.shb7 * lhs,
|
|
shb8 = rhs.shb8 * lhs
|
|
};
|
|
}
|
|
|
|
// Token: 0x06000E45 RID: 3653 RVA: 0x00013F50 File Offset: 0x00012150
|
|
public static SphericalHarmonicsL2 operator +(SphericalHarmonicsL2 lhs, SphericalHarmonicsL2 rhs)
|
|
{
|
|
return new SphericalHarmonicsL2
|
|
{
|
|
shr0 = lhs.shr0 + rhs.shr0,
|
|
shr1 = lhs.shr1 + rhs.shr1,
|
|
shr2 = lhs.shr2 + rhs.shr2,
|
|
shr3 = lhs.shr3 + rhs.shr3,
|
|
shr4 = lhs.shr4 + rhs.shr4,
|
|
shr5 = lhs.shr5 + rhs.shr5,
|
|
shr6 = lhs.shr6 + rhs.shr6,
|
|
shr7 = lhs.shr7 + rhs.shr7,
|
|
shr8 = lhs.shr8 + rhs.shr8,
|
|
shg0 = lhs.shg0 + rhs.shg0,
|
|
shg1 = lhs.shg1 + rhs.shg1,
|
|
shg2 = lhs.shg2 + rhs.shg2,
|
|
shg3 = lhs.shg3 + rhs.shg3,
|
|
shg4 = lhs.shg4 + rhs.shg4,
|
|
shg5 = lhs.shg5 + rhs.shg5,
|
|
shg6 = lhs.shg6 + rhs.shg6,
|
|
shg7 = lhs.shg7 + rhs.shg7,
|
|
shg8 = lhs.shg8 + rhs.shg8,
|
|
shb0 = lhs.shb0 + rhs.shb0,
|
|
shb1 = lhs.shb1 + rhs.shb1,
|
|
shb2 = lhs.shb2 + rhs.shb2,
|
|
shb3 = lhs.shb3 + rhs.shb3,
|
|
shb4 = lhs.shb4 + rhs.shb4,
|
|
shb5 = lhs.shb5 + rhs.shb5,
|
|
shb6 = lhs.shb6 + rhs.shb6,
|
|
shb7 = lhs.shb7 + rhs.shb7,
|
|
shb8 = lhs.shb8 + rhs.shb8
|
|
};
|
|
}
|
|
|
|
// Token: 0x06000E46 RID: 3654 RVA: 0x000141C0 File Offset: 0x000123C0
|
|
public static bool operator ==(SphericalHarmonicsL2 lhs, SphericalHarmonicsL2 rhs)
|
|
{
|
|
return lhs.shr0 == rhs.shr0 && lhs.shr1 == rhs.shr1 && lhs.shr2 == rhs.shr2 && lhs.shr3 == rhs.shr3 && lhs.shr4 == rhs.shr4 && lhs.shr5 == rhs.shr5 && lhs.shr6 == rhs.shr6 && lhs.shr7 == rhs.shr7 && lhs.shr8 == rhs.shr8 && lhs.shg0 == rhs.shg0 && lhs.shg1 == rhs.shg1 && lhs.shg2 == rhs.shg2 && lhs.shg3 == rhs.shg3 && lhs.shg4 == rhs.shg4 && lhs.shg5 == rhs.shg5 && lhs.shg6 == rhs.shg6 && lhs.shg7 == rhs.shg7 && lhs.shg8 == rhs.shg8 && lhs.shb0 == rhs.shb0 && lhs.shb1 == rhs.shb1 && lhs.shb2 == rhs.shb2 && lhs.shb3 == rhs.shb3 && lhs.shb4 == rhs.shb4 && lhs.shb5 == rhs.shb5 && lhs.shb6 == rhs.shb6 && lhs.shb7 == rhs.shb7 && lhs.shb8 == rhs.shb8;
|
|
}
|
|
|
|
// Token: 0x06000E47 RID: 3655 RVA: 0x000143D8 File Offset: 0x000125D8
|
|
public static bool operator !=(SphericalHarmonicsL2 lhs, SphericalHarmonicsL2 rhs)
|
|
{
|
|
return !(lhs == rhs);
|
|
}
|
|
|
|
// Token: 0x04000171 RID: 369
|
|
private float shr0;
|
|
|
|
// Token: 0x04000172 RID: 370
|
|
private float shr1;
|
|
|
|
// Token: 0x04000173 RID: 371
|
|
private float shr2;
|
|
|
|
// Token: 0x04000174 RID: 372
|
|
private float shr3;
|
|
|
|
// Token: 0x04000175 RID: 373
|
|
private float shr4;
|
|
|
|
// Token: 0x04000176 RID: 374
|
|
private float shr5;
|
|
|
|
// Token: 0x04000177 RID: 375
|
|
private float shr6;
|
|
|
|
// Token: 0x04000178 RID: 376
|
|
private float shr7;
|
|
|
|
// Token: 0x04000179 RID: 377
|
|
private float shr8;
|
|
|
|
// Token: 0x0400017A RID: 378
|
|
private float shg0;
|
|
|
|
// Token: 0x0400017B RID: 379
|
|
private float shg1;
|
|
|
|
// Token: 0x0400017C RID: 380
|
|
private float shg2;
|
|
|
|
// Token: 0x0400017D RID: 381
|
|
private float shg3;
|
|
|
|
// Token: 0x0400017E RID: 382
|
|
private float shg4;
|
|
|
|
// Token: 0x0400017F RID: 383
|
|
private float shg5;
|
|
|
|
// Token: 0x04000180 RID: 384
|
|
private float shg6;
|
|
|
|
// Token: 0x04000181 RID: 385
|
|
private float shg7;
|
|
|
|
// Token: 0x04000182 RID: 386
|
|
private float shg8;
|
|
|
|
// Token: 0x04000183 RID: 387
|
|
private float shb0;
|
|
|
|
// Token: 0x04000184 RID: 388
|
|
private float shb1;
|
|
|
|
// Token: 0x04000185 RID: 389
|
|
private float shb2;
|
|
|
|
// Token: 0x04000186 RID: 390
|
|
private float shb3;
|
|
|
|
// Token: 0x04000187 RID: 391
|
|
private float shb4;
|
|
|
|
// Token: 0x04000188 RID: 392
|
|
private float shb5;
|
|
|
|
// Token: 0x04000189 RID: 393
|
|
private float shb6;
|
|
|
|
// Token: 0x0400018A RID: 394
|
|
private float shb7;
|
|
|
|
// Token: 0x0400018B RID: 395
|
|
private float shb8;
|
|
}
|
|
}
|