Files
niko 8fc35183db a
2026-04-11 22:19:20 +02:00

299 lines
13 KiB
C#

using System;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
using Cpp2IlInjected;
using UnityEngine;
using UnityEngine.Rendering;
namespace RecRoom.Core.Rendering
{
// Token: 0x02002D29 RID: 11561
[Token(Token = "0x2002D29")]
[Serializable]
public class EnvironmentLightingSettings
{
// Token: 0x06013ACE RID: 80590 RVA: 0x004942E0 File Offset: 0x004924E0
[Token(Token = "0x6013ACE")]
[Address(RVA = "0x1242620", Offset = "0x1241420", VA = "0x181242620")]
public void ECPHANMBDHA()
{
RenderSettings.ambientEquatorColor = this.ambientEquatorColor;
RenderSettings.ambientGroundColor = this.ambientGroundColor;
RenderSettings.ambientIntensity = this.ambientIntensity;
RenderSettings.ambientLight = this.ambientLight;
RenderSettings.ambientMode = this.ambientMode;
SphericalHarmonicsL2 sphericalHarmonicsL = this.ambientProbe;
float shb = this.ambientProbe.shb8;
float shr = this.ambientProbe.shr4;
float shr2 = this.ambientProbe.shr8;
float shg = this.ambientProbe.shg3;
float shg2 = this.ambientProbe.shg7;
float shb2 = this.ambientProbe.shb2;
RenderSettings.ambientProbe = sphericalHarmonicsL;
RenderSettings.ambientSkyColor = this.ambientSkyColor;
RenderSettings.customReflection = this.customReflection;
RenderSettings.defaultReflectionMode = this.defaultReflectionMode;
RenderSettings.defaultReflectionResolution = this.defaultReflectionResolution;
RenderSettings.reflectionBounces = this.reflectionBounces;
RenderSettings.reflectionIntensity = this.reflectionIntensity;
RenderSettings.skybox = this.skybox;
RenderSettings.sun = this.sun;
if (Application.isPlaying)
{
Scheduler instance = SingletonMonoBehaviour.ONCPNMDGGKG;
EnvironmentLightingSettings.ADDHFGBEOEM addhfgbeoem;
addhfgbeoem.System.IDisposable.Dispose();
addhfgbeoem.<>1__state = (int)((ulong)0L);
int num = 0;
KFBABPAPIMB kfbabpapimb = instance.Run(num, addhfgbeoem);
}
}
// Token: 0x06013ACF RID: 80591 RVA: 0x00494410 File Offset: 0x00492610
[Token(Token = "0x6013ACF")]
[Address(RVA = "0x12428A0", Offset = "0x12416A0", VA = "0x1812428A0")]
public void GFAOAIAFMEH()
{
Color color = RenderSettings.ambientEquatorColor;
Color color2 = RenderSettings.ambientGroundColor;
float num = RenderSettings.ambientIntensity;
this.ambientIntensity = num;
Color color3 = RenderSettings.ambientLight;
AmbientMode ambientMode = RenderSettings.ambientMode;
this.ambientMode = ambientMode;
SphericalHarmonicsL2 sphericalHarmonicsL = RenderSettings.ambientProbe;
float shr = sphericalHarmonicsL.shr4;
this.ambientProbe.shr4 = shr;
float shr2 = sphericalHarmonicsL.shr8;
this.ambientProbe.shr8 = shr2;
float shg = sphericalHarmonicsL.shg3;
this.ambientProbe.shg3 = shg;
float shg2 = sphericalHarmonicsL.shg7;
this.ambientProbe.shg7 = shg2;
float shb = sphericalHarmonicsL.shb2;
this.ambientProbe.shb2 = shb;
float shb2 = sphericalHarmonicsL.shb8;
this.ambientProbe.shb8 = shb2;
Color color4 = RenderSettings.ambientSkyColor;
Cubemap cubemap = RenderSettings.customReflection;
this.customReflection = cubemap;
DefaultReflectionMode defaultReflectionMode = RenderSettings.defaultReflectionMode;
this.defaultReflectionMode = defaultReflectionMode;
int num2 = RenderSettings.defaultReflectionResolution;
this.defaultReflectionResolution = num2;
int num3 = RenderSettings.reflectionBounces;
this.reflectionBounces = num3;
float num4 = RenderSettings.reflectionIntensity;
this.reflectionIntensity = num4;
Material material = RenderSettings.skybox;
this.skybox = material;
Light light = RenderSettings.sun;
this.sun = light;
}
// Token: 0x06013AD0 RID: 80592 RVA: 0x00494564 File Offset: 0x00492764
[Token(Token = "0x6013AD0")]
[Address(RVA = "0x12429E0", Offset = "0x12417E0", VA = "0x1812429E0")]
public static void OBFPLLENOPL()
{
EnvironmentLightingSettings environmentLightingSettings = EnvironmentLightingSettings.defaultSceneSettings;
RenderSettings.ambientEquatorColor = environmentLightingSettings.ambientEquatorColor;
RenderSettings.ambientGroundColor = environmentLightingSettings.ambientGroundColor;
RenderSettings.ambientIntensity = environmentLightingSettings.ambientIntensity;
RenderSettings.ambientLight = environmentLightingSettings.ambientLight;
RenderSettings.ambientMode = environmentLightingSettings.ambientMode;
SphericalHarmonicsL2 sphericalHarmonicsL = environmentLightingSettings.ambientProbe;
float shb = environmentLightingSettings.ambientProbe.shb8;
float shr = environmentLightingSettings.ambientProbe.shr4;
float shr2 = environmentLightingSettings.ambientProbe.shr8;
float shg = environmentLightingSettings.ambientProbe.shg3;
float shg2 = environmentLightingSettings.ambientProbe.shg7;
float shb2 = environmentLightingSettings.ambientProbe.shb2;
RenderSettings.ambientProbe = sphericalHarmonicsL;
RenderSettings.ambientSkyColor = environmentLightingSettings.ambientSkyColor;
RenderSettings.customReflection = environmentLightingSettings.customReflection;
RenderSettings.defaultReflectionMode = environmentLightingSettings.defaultReflectionMode;
RenderSettings.defaultReflectionResolution = environmentLightingSettings.defaultReflectionResolution;
RenderSettings.reflectionBounces = environmentLightingSettings.reflectionBounces;
RenderSettings.reflectionIntensity = environmentLightingSettings.reflectionIntensity;
RenderSettings.skybox = environmentLightingSettings.skybox;
RenderSettings.sun = environmentLightingSettings.sun;
if (Application.isPlaying)
{
Scheduler instance = SingletonMonoBehaviour.ONCPNMDGGKG;
EnvironmentLightingSettings.ADDHFGBEOEM addhfgbeoem;
addhfgbeoem.System.IDisposable.Dispose();
addhfgbeoem.<>1__state = (int)((ulong)0L);
int num = 0;
KFBABPAPIMB kfbabpapimb = instance.Run(num, addhfgbeoem);
}
}
// Token: 0x06013AD1 RID: 80593 RVA: 0x00494698 File Offset: 0x00492898
[Token(Token = "0x6013AD1")]
[Address(RVA = "0x1242490", Offset = "0x1241290", VA = "0x181242490")]
public static void BAAAFCLCPIK()
{
EnvironmentLightingSettings environmentLightingSettings = EnvironmentLightingSettings.defaultSceneSettings;
Color color = RenderSettings.ambientEquatorColor;
Color color2 = RenderSettings.ambientGroundColor;
float num = RenderSettings.ambientIntensity;
environmentLightingSettings.ambientIntensity = num;
Color color3 = RenderSettings.ambientLight;
AmbientMode ambientMode = RenderSettings.ambientMode;
environmentLightingSettings.ambientMode = ambientMode;
SphericalHarmonicsL2 sphericalHarmonicsL = RenderSettings.ambientProbe;
float shr = sphericalHarmonicsL.shr4;
environmentLightingSettings.ambientProbe.shr4 = shr;
float shr2 = sphericalHarmonicsL.shr8;
environmentLightingSettings.ambientProbe.shr8 = shr2;
float shg = sphericalHarmonicsL.shg3;
environmentLightingSettings.ambientProbe.shg3 = shg;
float shg2 = sphericalHarmonicsL.shg7;
environmentLightingSettings.ambientProbe.shg7 = shg2;
float shb = sphericalHarmonicsL.shb2;
environmentLightingSettings.ambientProbe.shb2 = shb;
float shb2 = sphericalHarmonicsL.shb8;
environmentLightingSettings.ambientProbe.shb8 = shb2;
Color color4 = RenderSettings.ambientSkyColor;
Cubemap cubemap = RenderSettings.customReflection;
environmentLightingSettings.customReflection = cubemap;
DefaultReflectionMode defaultReflectionMode = RenderSettings.defaultReflectionMode;
environmentLightingSettings.defaultReflectionMode = defaultReflectionMode;
int num2 = RenderSettings.defaultReflectionResolution;
environmentLightingSettings.defaultReflectionResolution = num2;
int num3 = RenderSettings.reflectionBounces;
environmentLightingSettings.reflectionBounces = num3;
float num4 = RenderSettings.reflectionIntensity;
environmentLightingSettings.reflectionIntensity = num4;
Material material = RenderSettings.skybox;
environmentLightingSettings.skybox = material;
Light light = RenderSettings.sun;
environmentLightingSettings.sun = light;
}
// Token: 0x06013AD2 RID: 80594 RVA: 0x004947F8 File Offset: 0x004929F8
[Token(Token = "0x6013AD2")]
[Address(RVA = "0x3F5100", Offset = "0x3F3F00", VA = "0x1803F5100")]
public EnvironmentLightingSettings()
{
}
// Token: 0x06013AD4 RID: 80596 RVA: 0x00494824 File Offset: 0x00492A24
[Token(Token = "0x6013AD4")]
[Address(RVA = "0x1242850", Offset = "0x1241650", VA = "0x181242850")]
[CompilerGenerated]
internal static IEnumerator<KENFJGFMIPM> EIADIANJPFI()
{
/*
An exception occurred when decompiling this method (06013AD4)
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Collections.Generic.IEnumerator`1<KENFJGFMIPM> RecRoom.Core.Rendering.EnvironmentLightingSettings::EIADIANJPFI()
---> System.Exception: Basic block has to end with unconditional control flow.
{
Block_0:
call:void(ADDHFGBEOEM::System.IDisposable.Dispose, ldloc:ADDHFGBEOEM(var_0))
stfld:int32(ADDHFGBEOEM::<>1__state, ldloc:ADDHFGBEOEM(var_0), conv.u8:uint64[exp:int32](ldc.i8:int64[exp:uint64](0)))
}
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
--- End of inner exception stack trace ---
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1660
*/;
}
// Token: 0x0400CC92 RID: 52370
[FieldOffset(Offset = "0x10")]
[Token(Token = "0x400CC92")]
[SerializeField]
private Material skybox;
// Token: 0x0400CC93 RID: 52371
[FieldOffset(Offset = "0x18")]
[Token(Token = "0x400CC93")]
[SerializeField]
private Light sun;
// Token: 0x0400CC94 RID: 52372
[FieldOffset(Offset = "0x20")]
[Token(Token = "0x400CC94")]
[SerializeField]
private AmbientMode ambientMode;
// Token: 0x0400CC95 RID: 52373
[FieldOffset(Offset = "0x24")]
[Token(Token = "0x400CC95")]
[SerializeField]
private SphericalHarmonicsL2 ambientProbe;
// Token: 0x0400CC96 RID: 52374
[FieldOffset(Offset = "0x90")]
[Token(Token = "0x400CC96")]
[SerializeField]
private float ambientIntensity;
// Token: 0x0400CC97 RID: 52375
[FieldOffset(Offset = "0x94")]
[Token(Token = "0x400CC97")]
[SerializeField]
private Color ambientSkyColor;
// Token: 0x0400CC98 RID: 52376
[FieldOffset(Offset = "0xA4")]
[Token(Token = "0x400CC98")]
[SerializeField]
private Color ambientEquatorColor;
// Token: 0x0400CC99 RID: 52377
[FieldOffset(Offset = "0xB4")]
[Token(Token = "0x400CC99")]
[SerializeField]
private Color ambientGroundColor;
// Token: 0x0400CC9A RID: 52378
[FieldOffset(Offset = "0xC4")]
[Token(Token = "0x400CC9A")]
[SerializeField]
private Color ambientLight;
// Token: 0x0400CC9B RID: 52379
[FieldOffset(Offset = "0xD4")]
[Token(Token = "0x400CC9B")]
[SerializeField]
private DefaultReflectionMode defaultReflectionMode;
// Token: 0x0400CC9C RID: 52380
[FieldOffset(Offset = "0xD8")]
[Token(Token = "0x400CC9C")]
[SerializeField]
private int defaultReflectionResolution;
// Token: 0x0400CC9D RID: 52381
[FieldOffset(Offset = "0xE0")]
[Token(Token = "0x400CC9D")]
[SerializeField]
private Cubemap customReflection;
// Token: 0x0400CC9E RID: 52382
[FieldOffset(Offset = "0xE8")]
[Token(Token = "0x400CC9E")]
[SerializeField]
private float reflectionIntensity;
// Token: 0x0400CC9F RID: 52383
[FieldOffset(Offset = "0xEC")]
[Token(Token = "0x400CC9F")]
[SerializeField]
private int reflectionBounces;
// Token: 0x0400CCA0 RID: 52384
[Token(Token = "0x400CCA0")]
private static EnvironmentLightingSettings defaultSceneSettings = new EnvironmentLightingSettings();
}
}