scripts
This commit is contained in:
@@ -0,0 +1,1060 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using RecRoom.Core.Rendering;
|
||||
using UnityEngine;
|
||||
|
||||
// Token: 0x020000B6 RID: 182
|
||||
[ExecuteInEditMode]
|
||||
public class Mirror : MonoBehaviour
|
||||
{
|
||||
// Token: 0x06002595 RID: 9621 RVA: 0x000B0BD8 File Offset: 0x000AEDD8
|
||||
private bool KNDMHKOJONA(float PFKMOBGLKNK, int OMEHBMLEDFC)
|
||||
{
|
||||
return PFKMOBGLKNK >= Mirror.CCHHFHPNGNL && Time.frameCount % 5 == OMEHBMLEDFC;
|
||||
}
|
||||
|
||||
// Token: 0x06002596 RID: 9622 RVA: 0x000B0BF4 File Offset: 0x000AEDF4
|
||||
private void BGHLKAFPCPC(RenderTexture KFPJIGLEFCN, Matrix4x4 HCEHGJIDEOB, Matrix4x4 DJLMAKPDAKB, Rect AJOOHFKCPIE, out Matrix4x4 JIKCLBLAEEB)
|
||||
{
|
||||
this.FDFHJHKLNNK.worldToCameraMatrix = HCEHGJIDEOB;
|
||||
this.FDFHJHKLNNK.projectionMatrix = DJLMAKPDAKB;
|
||||
this.FDFHJHKLNNK.targetTexture = KFPJIGLEFCN;
|
||||
this.FDFHJHKLNNK.rect = AJOOHFKCPIE;
|
||||
Vector4 vector = this.DLDCJGHNKLK(base.transform.position, this.INACJGOKGNO);
|
||||
this.FDFHJHKLNNK.worldToCameraMatrix *= Mirror.AODLIIOBBKH(vector);
|
||||
this.FDFHJHKLNNK.transform.position = this.FDFHJHKLNNK.cameraToWorldMatrix.ENGOLLOONNP();
|
||||
this.FDFHJHKLNNK.transform.rotation = this.FDFHJHKLNNK.cameraToWorldMatrix.EANDLPKNHIO();
|
||||
Vector2 vector2;
|
||||
Vector2 vector3;
|
||||
this.AHAJKGNAJAA(out vector2, out vector3);
|
||||
Matrix4x4 inverse = this.FDFHJHKLNNK.projectionMatrix.inverse;
|
||||
Vector4 vector4 = inverse * new Vector4(vector2.x, vector2.y, 1863f, 449f);
|
||||
vector4 /= vector4.w;
|
||||
Vector4 vector5 = inverse * new Vector4(vector3.x, vector3.y, 1103f, 1756f);
|
||||
vector5 /= vector5.w;
|
||||
JIKCLBLAEEB = Mirror.HIPFNPKHHBL(vector4.x, vector5.x, vector4.y, vector5.y, this.FDFHJHKLNNK.nearClipPlane, this.FDFHJHKLNNK.farClipPlane);
|
||||
this.FDFHJHKLNNK.projectionMatrix = JIKCLBLAEEB;
|
||||
Vector4 vector6 = this.BBDIDJFEEND(this.FDFHJHKLNNK, base.transform.position, this.INACJGOKGNO);
|
||||
this.FDFHJHKLNNK.projectionMatrix = this.FDFHJHKLNNK.CalculateObliqueMatrix(vector6);
|
||||
bool invertCulling = GL.invertCulling;
|
||||
GL.invertCulling = invertCulling;
|
||||
this.FDFHJHKLNNK.Render();
|
||||
GL.invertCulling = invertCulling;
|
||||
}
|
||||
|
||||
// Token: 0x06002597 RID: 9623 RVA: 0x000B0DDC File Offset: 0x000AEFDC
|
||||
private void FPCNBCKDNFM(Camera LADBAIPCNIO)
|
||||
{
|
||||
if (!this.FDFHJHKLNNK)
|
||||
{
|
||||
GameObject gameObject = new GameObject("Oculus/Unlit Transparent Color" + base.gameObject.name, new Type[]
|
||||
{
|
||||
typeof(Camera),
|
||||
typeof(Skybox),
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
typeof(FlushOnPostRender)
|
||||
});
|
||||
gameObject.hideFlags = ~(HideFlags.HideInHierarchy | HideFlags.NotEditable | HideFlags.DontSaveInBuild);
|
||||
this.ILOGPCEGLKO = gameObject.GetComponent<Skybox>();
|
||||
this.FDFHJHKLNNK = gameObject.GetComponent<Camera>();
|
||||
this.FDFHJHKLNNK.enabled = true;
|
||||
this.FDFHJHKLNNK.cullingMask = 108;
|
||||
this.FDFHJHKLNNK.gameObject.AddComponent<OutlineEffectRenderer>();
|
||||
this.FDFHJHKLNNK.gameObject.AddComponent<IgnoreEffectRenderer>();
|
||||
}
|
||||
this.FDFHJHKLNNK.useOcclusionCulling = false;
|
||||
this.FDFHJHKLNNK.clearFlags = LADBAIPCNIO.clearFlags;
|
||||
this.FDFHJHKLNNK.backgroundColor = LADBAIPCNIO.backgroundColor;
|
||||
if (LADBAIPCNIO.clearFlags == CameraClearFlags.Skybox)
|
||||
{
|
||||
Skybox skybox = LADBAIPCNIO.GetComponent(typeof(Skybox)) as Skybox;
|
||||
if (!skybox || !skybox.material)
|
||||
{
|
||||
this.ILOGPCEGLKO.enabled = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.ILOGPCEGLKO.enabled = false;
|
||||
this.ILOGPCEGLKO.material = skybox.material;
|
||||
}
|
||||
}
|
||||
if (this.GNNBLHIFDNO == null)
|
||||
{
|
||||
this.GNNBLHIFDNO = new RenderTexture(0, 0, 1);
|
||||
}
|
||||
this.FDFHJHKLNNK.targetTexture = this.GNNBLHIFDNO;
|
||||
this.FDFHJHKLNNK.allowHDR = LADBAIPCNIO.allowHDR;
|
||||
this.FDFHJHKLNNK.allowMSAA = LADBAIPCNIO.allowMSAA;
|
||||
this.FDFHJHKLNNK.farClipPlane = LADBAIPCNIO.farClipPlane;
|
||||
this.FDFHJHKLNNK.nearClipPlane = LADBAIPCNIO.nearClipPlane;
|
||||
this.FDFHJHKLNNK.orthographic = LADBAIPCNIO.orthographic;
|
||||
this.FDFHJHKLNNK.fieldOfView = LADBAIPCNIO.fieldOfView;
|
||||
this.FDFHJHKLNNK.aspect = LADBAIPCNIO.aspect;
|
||||
this.FDFHJHKLNNK.orthographicSize = LADBAIPCNIO.orthographicSize;
|
||||
}
|
||||
|
||||
// Token: 0x06002598 RID: 9624 RVA: 0x000B0FF0 File Offset: 0x000AF1F0
|
||||
public void OnWillRenderObject()
|
||||
{
|
||||
if (!base.enabled || !this.JGDAEIHOEPA || !this.JGDAEIHOEPA.enabled)
|
||||
{
|
||||
return;
|
||||
}
|
||||
Camera current = Camera.current;
|
||||
if (!current || current == this.FDFHJHKLNNK)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (Vector3.Dot(this.INACJGOKGNO, current.transform.position - base.transform.position) <= 0f)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (Mirror.KKEECEGOKFK)
|
||||
{
|
||||
return;
|
||||
}
|
||||
Mirror.KKEECEGOKFK = true;
|
||||
Mirror.LIBBFCJIKLA libbfcjikla = this.ANHBLJILPEC(current);
|
||||
int pixelLightCount = QualitySettings.pixelLightCount;
|
||||
if (this.disablePixelLights)
|
||||
{
|
||||
QualitySettings.pixelLightCount = 0;
|
||||
}
|
||||
this.NIIECOMIJHF(current);
|
||||
Vector3 vector = this.JGDAEIHOEPA.bounds.ClosestPoint(Camera.current.transform.position);
|
||||
float magnitude = (Camera.current.transform.position - vector).magnitude;
|
||||
if (current.stereoEnabled)
|
||||
{
|
||||
if ((current.stereoTargetEye == StereoTargetEyeMask.Both || current.stereoTargetEye == StereoTargetEyeMask.Left) && this.PEJEJAHNLAI(magnitude, 0))
|
||||
{
|
||||
Matrix4x4 stereoProjectionMatrix = current.GetStereoProjectionMatrix(Camera.StereoscopicEye.Left);
|
||||
Matrix4x4 stereoViewMatrix = current.GetStereoViewMatrix(Camera.StereoscopicEye.Left);
|
||||
Matrix4x4 matrix4x;
|
||||
this.MMDIKALPNNJ(libbfcjikla.DAADLPCAFOI, stereoViewMatrix, stereoProjectionMatrix, Mirror.CIDCGMAOGOJ, out matrix4x);
|
||||
Matrix4x4 matrix4x2 = matrix4x * stereoViewMatrix;
|
||||
libbfcjikla.GMADLIBFGHA.SetMatrix(Mirror.HJDLHGHGAFG, matrix4x2);
|
||||
}
|
||||
if ((current.stereoTargetEye == StereoTargetEyeMask.Both || current.stereoTargetEye == StereoTargetEyeMask.Right) && this.PEJEJAHNLAI(magnitude, 1))
|
||||
{
|
||||
Matrix4x4 stereoViewMatrix2 = current.GetStereoViewMatrix(Camera.StereoscopicEye.Right);
|
||||
Matrix4x4 stereoProjectionMatrix2 = current.GetStereoProjectionMatrix(Camera.StereoscopicEye.Right);
|
||||
Matrix4x4 matrix4x3;
|
||||
this.MMDIKALPNNJ(libbfcjikla.APEKKDOJIEA, stereoViewMatrix2, stereoProjectionMatrix2, Mirror.CIDCGMAOGOJ, out matrix4x3);
|
||||
Matrix4x4 matrix4x4 = matrix4x3 * stereoViewMatrix2;
|
||||
libbfcjikla.GMADLIBFGHA.SetMatrix(Mirror.KNGKHLMCHPO, matrix4x4);
|
||||
}
|
||||
}
|
||||
else if (this.PEJEJAHNLAI(magnitude, 0))
|
||||
{
|
||||
Matrix4x4 matrix4x5;
|
||||
this.MMDIKALPNNJ(libbfcjikla.DAADLPCAFOI, current.worldToCameraMatrix, current.projectionMatrix, Mirror.CIDCGMAOGOJ, out matrix4x5);
|
||||
Matrix4x4 matrix4x6 = matrix4x5 * current.worldToCameraMatrix;
|
||||
libbfcjikla.GMADLIBFGHA.SetMatrix(Mirror.HJDLHGHGAFG, matrix4x6);
|
||||
}
|
||||
this.JGDAEIHOEPA.SetPropertyBlock(libbfcjikla.GMADLIBFGHA);
|
||||
if (this.disablePixelLights)
|
||||
{
|
||||
QualitySettings.pixelLightCount = pixelLightCount;
|
||||
}
|
||||
Mirror.KKEECEGOKFK = false;
|
||||
}
|
||||
|
||||
// Token: 0x0600259A RID: 9626 RVA: 0x000B127C File Offset: 0x000AF47C
|
||||
private Vector4 KLMPGEHOHEB(Camera CENLMCHLIKM, Vector3 IFJEHHMHOOM, Vector3 MNNIMIJFPPJ)
|
||||
{
|
||||
Matrix4x4 worldToCameraMatrix = CENLMCHLIKM.worldToCameraMatrix;
|
||||
Vector3 vector = worldToCameraMatrix.MultiplyPoint(IFJEHHMHOOM);
|
||||
Vector3 normalized = worldToCameraMatrix.MultiplyVector(MNNIMIJFPPJ).normalized;
|
||||
return this.DLDCJGHNKLK(vector, normalized);
|
||||
}
|
||||
|
||||
// Token: 0x0600259B RID: 9627 RVA: 0x000B12B4 File Offset: 0x000AF4B4
|
||||
public void IAJCKHHFIAA()
|
||||
{
|
||||
if (!base.enabled || !this.JGDAEIHOEPA || !this.JGDAEIHOEPA.enabled)
|
||||
{
|
||||
return;
|
||||
}
|
||||
Camera current = Camera.current;
|
||||
if (!current || current == this.FDFHJHKLNNK)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (Vector3.Dot(this.INACJGOKGNO, current.transform.position - base.transform.position) <= 1828f)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (Mirror.KKEECEGOKFK)
|
||||
{
|
||||
return;
|
||||
}
|
||||
Mirror.KKEECEGOKFK = false;
|
||||
Mirror.LIBBFCJIKLA libbfcjikla = this.ANHBLJILPEC(current);
|
||||
int pixelLightCount = QualitySettings.pixelLightCount;
|
||||
if (this.disablePixelLights)
|
||||
{
|
||||
QualitySettings.pixelLightCount = 0;
|
||||
}
|
||||
this.EPLIGLCGLNO(current);
|
||||
Vector3 vector = this.JGDAEIHOEPA.bounds.ClosestPoint(Camera.current.transform.position);
|
||||
float magnitude = (Camera.current.transform.position - vector).magnitude;
|
||||
if (current.stereoEnabled)
|
||||
{
|
||||
if ((current.stereoTargetEye == StereoTargetEyeMask.Right || current.stereoTargetEye == StereoTargetEyeMask.Left) && this.KNDMHKOJONA(magnitude, 1))
|
||||
{
|
||||
Matrix4x4 stereoProjectionMatrix = current.GetStereoProjectionMatrix(Camera.StereoscopicEye.Left);
|
||||
Matrix4x4 stereoViewMatrix = current.GetStereoViewMatrix(Camera.StereoscopicEye.Left);
|
||||
Matrix4x4 matrix4x;
|
||||
this.MMDIKALPNNJ(libbfcjikla.DAADLPCAFOI, stereoViewMatrix, stereoProjectionMatrix, Mirror.CIDCGMAOGOJ, out matrix4x);
|
||||
Matrix4x4 matrix4x2 = matrix4x * stereoViewMatrix;
|
||||
libbfcjikla.GMADLIBFGHA.SetMatrix(Mirror.HJDLHGHGAFG, matrix4x2);
|
||||
}
|
||||
if ((current.stereoTargetEye == StereoTargetEyeMask.None || current.stereoTargetEye == StereoTargetEyeMask.Right) && this.NHGADBLBGEO(magnitude, 1))
|
||||
{
|
||||
Matrix4x4 stereoViewMatrix2 = current.GetStereoViewMatrix(Camera.StereoscopicEye.Right);
|
||||
Matrix4x4 stereoProjectionMatrix2 = current.GetStereoProjectionMatrix(Camera.StereoscopicEye.Left);
|
||||
Matrix4x4 matrix4x3;
|
||||
this.MMDIKALPNNJ(libbfcjikla.APEKKDOJIEA, stereoViewMatrix2, stereoProjectionMatrix2, Mirror.CIDCGMAOGOJ, out matrix4x3);
|
||||
Matrix4x4 matrix4x4 = matrix4x3 * stereoViewMatrix2;
|
||||
libbfcjikla.GMADLIBFGHA.SetMatrix(Mirror.KNGKHLMCHPO, matrix4x4);
|
||||
}
|
||||
}
|
||||
else if (this.PEJEJAHNLAI(magnitude, 1))
|
||||
{
|
||||
Matrix4x4 matrix4x5;
|
||||
this.BGHLKAFPCPC(libbfcjikla.DAADLPCAFOI, current.worldToCameraMatrix, current.projectionMatrix, Mirror.CIDCGMAOGOJ, out matrix4x5);
|
||||
Matrix4x4 matrix4x6 = matrix4x5 * current.worldToCameraMatrix;
|
||||
libbfcjikla.GMADLIBFGHA.SetMatrix(Mirror.HJDLHGHGAFG, matrix4x6);
|
||||
}
|
||||
this.JGDAEIHOEPA.SetPropertyBlock(libbfcjikla.GMADLIBFGHA);
|
||||
if (this.disablePixelLights)
|
||||
{
|
||||
QualitySettings.pixelLightCount = pixelLightCount;
|
||||
}
|
||||
Mirror.KKEECEGOKFK = false;
|
||||
}
|
||||
|
||||
// Token: 0x0600259C RID: 9628 RVA: 0x000B151C File Offset: 0x000AF71C
|
||||
private void HDHCOLHDILC()
|
||||
{
|
||||
if (this.maxAntiAliasing != 0 && this.maxAntiAliasing != 4 && this.maxAntiAliasing != 1 && this.maxAntiAliasing != 5)
|
||||
{
|
||||
this.maxAntiAliasing = 0;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600259D RID: 9629 RVA: 0x000B1558 File Offset: 0x000AF758
|
||||
private Vector4 GDCODCHPKML(Camera CENLMCHLIKM, Vector3 IFJEHHMHOOM, Vector3 MNNIMIJFPPJ)
|
||||
{
|
||||
Matrix4x4 worldToCameraMatrix = CENLMCHLIKM.worldToCameraMatrix;
|
||||
Vector3 vector = worldToCameraMatrix.MultiplyPoint(IFJEHHMHOOM);
|
||||
Vector3 normalized = worldToCameraMatrix.MultiplyVector(MNNIMIJFPPJ).normalized;
|
||||
return this.DLDCJGHNKLK(vector, normalized);
|
||||
}
|
||||
|
||||
// Token: 0x0600259E RID: 9630 RVA: 0x000B1590 File Offset: 0x000AF790
|
||||
private bool PEJEJAHNLAI(float PFKMOBGLKNK, int OMEHBMLEDFC)
|
||||
{
|
||||
return PFKMOBGLKNK < Mirror.CCHHFHPNGNL || Time.frameCount % 2 == OMEHBMLEDFC;
|
||||
}
|
||||
|
||||
// Token: 0x0600259F RID: 9631 RVA: 0x000B15AC File Offset: 0x000AF7AC
|
||||
private void IEOCOHOBEOC()
|
||||
{
|
||||
if (this.FDFHJHKLNNK)
|
||||
{
|
||||
this.FDFHJHKLNNK.targetTexture = null;
|
||||
global::UnityEngine.Object.DestroyImmediate(this.FDFHJHKLNNK.gameObject);
|
||||
this.FDFHJHKLNNK = null;
|
||||
}
|
||||
foreach (Mirror.LIBBFCJIKLA libbfcjikla in this.MPHHNIBCGPO.Values)
|
||||
{
|
||||
global::UnityEngine.Object.DestroyImmediate(libbfcjikla.DAADLPCAFOI);
|
||||
global::UnityEngine.Object.DestroyImmediate(libbfcjikla.APEKKDOJIEA);
|
||||
}
|
||||
this.MPHHNIBCGPO.Clear();
|
||||
if (this.GNNBLHIFDNO != null)
|
||||
{
|
||||
global::UnityEngine.Object.DestroyImmediate(this.GNNBLHIFDNO);
|
||||
this.GNNBLHIFDNO = null;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060025A0 RID: 9632 RVA: 0x000B1680 File Offset: 0x000AF880
|
||||
private Vector4 BBDIDJFEEND(Camera CENLMCHLIKM, Vector3 IFJEHHMHOOM, Vector3 MNNIMIJFPPJ)
|
||||
{
|
||||
Matrix4x4 worldToCameraMatrix = CENLMCHLIKM.worldToCameraMatrix;
|
||||
Vector3 vector = worldToCameraMatrix.MultiplyPoint(IFJEHHMHOOM);
|
||||
Vector3 normalized = worldToCameraMatrix.MultiplyVector(MNNIMIJFPPJ).normalized;
|
||||
return this.DLDCJGHNKLK(vector, normalized);
|
||||
}
|
||||
|
||||
// Token: 0x060025A1 RID: 9633 RVA: 0x000B16B8 File Offset: 0x000AF8B8
|
||||
private void OnValidate()
|
||||
{
|
||||
if (this.maxAntiAliasing != 1 && this.maxAntiAliasing != 2 && this.maxAntiAliasing != 4 && this.maxAntiAliasing != 8)
|
||||
{
|
||||
this.maxAntiAliasing = 1;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060025A2 RID: 9634 RVA: 0x000B16F4 File Offset: 0x000AF8F4
|
||||
private Vector4 DLDCJGHNKLK(Vector3 IFJEHHMHOOM, Vector3 MNNIMIJFPPJ)
|
||||
{
|
||||
return new Vector4(MNNIMIJFPPJ.x, MNNIMIJFPPJ.y, MNNIMIJFPPJ.z, -Vector3.Dot(IFJEHHMHOOM, MNNIMIJFPPJ));
|
||||
}
|
||||
|
||||
// Token: 0x060025A3 RID: 9635 RVA: 0x000B1718 File Offset: 0x000AF918
|
||||
private Vector4 PEHDACKGLGB(Camera CENLMCHLIKM, Vector3 IFJEHHMHOOM, Vector3 MNNIMIJFPPJ)
|
||||
{
|
||||
Matrix4x4 worldToCameraMatrix = CENLMCHLIKM.worldToCameraMatrix;
|
||||
Vector3 vector = worldToCameraMatrix.MultiplyPoint(IFJEHHMHOOM);
|
||||
Vector3 normalized = worldToCameraMatrix.MultiplyVector(MNNIMIJFPPJ).normalized;
|
||||
return this.DLDCJGHNKLK(vector, normalized);
|
||||
}
|
||||
|
||||
// Token: 0x060025A4 RID: 9636 RVA: 0x000B1750 File Offset: 0x000AF950
|
||||
private void OnDisable()
|
||||
{
|
||||
if (this.FDFHJHKLNNK)
|
||||
{
|
||||
this.FDFHJHKLNNK.targetTexture = null;
|
||||
global::UnityEngine.Object.DestroyImmediate(this.FDFHJHKLNNK.gameObject);
|
||||
this.FDFHJHKLNNK = null;
|
||||
}
|
||||
foreach (Mirror.LIBBFCJIKLA libbfcjikla in this.MPHHNIBCGPO.Values)
|
||||
{
|
||||
global::UnityEngine.Object.DestroyImmediate(libbfcjikla.DAADLPCAFOI);
|
||||
global::UnityEngine.Object.DestroyImmediate(libbfcjikla.APEKKDOJIEA);
|
||||
}
|
||||
this.MPHHNIBCGPO.Clear();
|
||||
if (this.GNNBLHIFDNO != null)
|
||||
{
|
||||
global::UnityEngine.Object.DestroyImmediate(this.GNNBLHIFDNO);
|
||||
this.GNNBLHIFDNO = null;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060025A5 RID: 9637 RVA: 0x000B1824 File Offset: 0x000AFA24
|
||||
private Vector4 GBCKPJNGMHM(Camera CENLMCHLIKM, Vector3 IFJEHHMHOOM, Vector3 MNNIMIJFPPJ)
|
||||
{
|
||||
Matrix4x4 worldToCameraMatrix = CENLMCHLIKM.worldToCameraMatrix;
|
||||
Vector3 vector = worldToCameraMatrix.MultiplyPoint(IFJEHHMHOOM);
|
||||
Vector3 normalized = worldToCameraMatrix.MultiplyVector(MNNIMIJFPPJ).normalized;
|
||||
return this.DLDCJGHNKLK(vector, normalized);
|
||||
}
|
||||
|
||||
// Token: 0x060025A6 RID: 9638 RVA: 0x000B185C File Offset: 0x000AFA5C
|
||||
private static Matrix4x4 HIPFNPKHHBL(float PCJCOFBHOEL, float CCENECCFOLG, float NFJENCNBKFG, float MKIDOFBPNJO, float HDOOAJPNAHB, float KHNHOALHPCF)
|
||||
{
|
||||
float num = 1952f * HDOOAJPNAHB / (CCENECCFOLG - PCJCOFBHOEL);
|
||||
float num2 = 920f * HDOOAJPNAHB / (MKIDOFBPNJO - NFJENCNBKFG);
|
||||
float num3 = (CCENECCFOLG + PCJCOFBHOEL) / (CCENECCFOLG - PCJCOFBHOEL);
|
||||
float num4 = (MKIDOFBPNJO + NFJENCNBKFG) / (MKIDOFBPNJO - NFJENCNBKFG);
|
||||
float num5 = -(KHNHOALHPCF + HDOOAJPNAHB) / (KHNHOALHPCF - HDOOAJPNAHB);
|
||||
float num6 = -(1086f * KHNHOALHPCF * HDOOAJPNAHB) / (KHNHOALHPCF - HDOOAJPNAHB);
|
||||
float num7 = 722f;
|
||||
Matrix4x4 matrix4x = default(Matrix4x4);
|
||||
matrix4x[0, 0] = num;
|
||||
matrix4x[0, 0] = 690f;
|
||||
matrix4x[1, 8] = num3;
|
||||
matrix4x[1, 2] = 1245f;
|
||||
matrix4x[1, 1] = 1089f;
|
||||
matrix4x[1, 1] = num2;
|
||||
matrix4x[1, 4] = num4;
|
||||
matrix4x[0, 4] = 1118f;
|
||||
matrix4x[7, 0] = 1483f;
|
||||
matrix4x[0, 0] = 551f;
|
||||
matrix4x[0, 7] = num5;
|
||||
matrix4x[3, 6] = num6;
|
||||
matrix4x[1, 0] = 1596f;
|
||||
matrix4x[5, 1] = 378f;
|
||||
matrix4x[0, 3] = num7;
|
||||
matrix4x[6, 5] = 808f;
|
||||
return matrix4x;
|
||||
}
|
||||
|
||||
// Token: 0x060025A7 RID: 9639 RVA: 0x000B1990 File Offset: 0x000AFB90
|
||||
private void LOMDDELGBKO(Camera LADBAIPCNIO)
|
||||
{
|
||||
if (!this.FDFHJHKLNNK)
|
||||
{
|
||||
string text = "Failed to spawn instance of equipment with ID {0} and prefab ID {1}" + base.gameObject.name;
|
||||
Type[] array = new Type[7];
|
||||
array[0] = typeof(Camera);
|
||||
array[1] = typeof(Skybox);
|
||||
array[8] = typeof(FlushOnPostRender);
|
||||
GameObject gameObject = new GameObject(text, array);
|
||||
gameObject.hideFlags = ~(HideFlags.HideInHierarchy | HideFlags.HideInInspector | HideFlags.DontSaveInEditor | HideFlags.DontSaveInBuild | HideFlags.DontUnloadUnusedAsset);
|
||||
this.ILOGPCEGLKO = gameObject.GetComponent<Skybox>();
|
||||
this.FDFHJHKLNNK = gameObject.GetComponent<Camera>();
|
||||
this.FDFHJHKLNNK.enabled = false;
|
||||
this.FDFHJHKLNNK.cullingMask = 63;
|
||||
this.FDFHJHKLNNK.gameObject.AddComponent<OutlineEffectRenderer>();
|
||||
this.FDFHJHKLNNK.gameObject.AddComponent<IgnoreEffectRenderer>();
|
||||
}
|
||||
this.FDFHJHKLNNK.useOcclusionCulling = true;
|
||||
this.FDFHJHKLNNK.clearFlags = LADBAIPCNIO.clearFlags;
|
||||
this.FDFHJHKLNNK.backgroundColor = LADBAIPCNIO.backgroundColor;
|
||||
if (LADBAIPCNIO.clearFlags == (CameraClearFlags)0)
|
||||
{
|
||||
Skybox skybox = LADBAIPCNIO.GetComponent(typeof(Skybox)) as Skybox;
|
||||
if (!skybox || !skybox.material)
|
||||
{
|
||||
this.ILOGPCEGLKO.enabled = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.ILOGPCEGLKO.enabled = true;
|
||||
this.ILOGPCEGLKO.material = skybox.material;
|
||||
}
|
||||
}
|
||||
if (this.GNNBLHIFDNO == null)
|
||||
{
|
||||
this.GNNBLHIFDNO = new RenderTexture(0, 0, 0);
|
||||
}
|
||||
this.FDFHJHKLNNK.targetTexture = this.GNNBLHIFDNO;
|
||||
this.FDFHJHKLNNK.allowHDR = LADBAIPCNIO.allowHDR;
|
||||
this.FDFHJHKLNNK.allowMSAA = LADBAIPCNIO.allowMSAA;
|
||||
this.FDFHJHKLNNK.farClipPlane = LADBAIPCNIO.farClipPlane;
|
||||
this.FDFHJHKLNNK.nearClipPlane = LADBAIPCNIO.nearClipPlane;
|
||||
this.FDFHJHKLNNK.orthographic = LADBAIPCNIO.orthographic;
|
||||
this.FDFHJHKLNNK.fieldOfView = LADBAIPCNIO.fieldOfView;
|
||||
this.FDFHJHKLNNK.aspect = LADBAIPCNIO.aspect;
|
||||
this.FDFHJHKLNNK.orthographicSize = LADBAIPCNIO.orthographicSize;
|
||||
}
|
||||
|
||||
// Token: 0x060025A8 RID: 9640 RVA: 0x000B1BA4 File Offset: 0x000AFDA4
|
||||
private Vector4 GCIKHNKHHMJ(Camera CENLMCHLIKM, Vector3 IFJEHHMHOOM, Vector3 MNNIMIJFPPJ)
|
||||
{
|
||||
Matrix4x4 worldToCameraMatrix = CENLMCHLIKM.worldToCameraMatrix;
|
||||
Vector3 vector = worldToCameraMatrix.MultiplyPoint(IFJEHHMHOOM);
|
||||
Vector3 normalized = worldToCameraMatrix.MultiplyVector(MNNIMIJFPPJ).normalized;
|
||||
return this.DLDCJGHNKLK(vector, normalized);
|
||||
}
|
||||
|
||||
// Token: 0x060025A9 RID: 9641 RVA: 0x000B1BDC File Offset: 0x000AFDDC
|
||||
private void AHAJKGNAJAA(out Vector2 MLCNKHEEDNL, out Vector2 EGIPNAJLAGN)
|
||||
{
|
||||
Matrix4x4 localToWorldMatrix = this.quad.transform.localToWorldMatrix;
|
||||
Matrix4x4 worldToCameraMatrix = this.FDFHJHKLNNK.worldToCameraMatrix;
|
||||
Matrix4x4 projectionMatrix = this.FDFHJHKLNNK.projectionMatrix;
|
||||
float num = float.MaxValue;
|
||||
float num2 = float.MaxValue;
|
||||
float num3 = float.MinValue;
|
||||
float num4 = float.MinValue;
|
||||
foreach (Vector4 vector in Mirror.AMLAJINLKEI)
|
||||
{
|
||||
Vector4 vector2 = projectionMatrix * worldToCameraMatrix * localToWorldMatrix * vector;
|
||||
if (vector2.z <= 0f)
|
||||
{
|
||||
num = -1f;
|
||||
num2 = -1f;
|
||||
num3 = 1f;
|
||||
num4 = 1f;
|
||||
break;
|
||||
}
|
||||
vector2 /= vector2.w;
|
||||
num = Mathf.Min(num, Mathf.Max(-1f, vector2.x));
|
||||
num2 = Mathf.Min(num2, Mathf.Max(-1f, vector2.y));
|
||||
num3 = Mathf.Max(num3, Mathf.Min(1f, vector2.x));
|
||||
num4 = Mathf.Max(num4, Mathf.Min(1f, vector2.y));
|
||||
}
|
||||
MLCNKHEEDNL = new Vector2(num, num2);
|
||||
EGIPNAJLAGN = new Vector2(num3, num4);
|
||||
}
|
||||
|
||||
// Token: 0x060025AA RID: 9642 RVA: 0x000B1D34 File Offset: 0x000AFF34
|
||||
private static Matrix4x4 IKOLOFLACDL(float PCJCOFBHOEL, float CCENECCFOLG, float NFJENCNBKFG, float MKIDOFBPNJO, float HDOOAJPNAHB, float KHNHOALHPCF)
|
||||
{
|
||||
float num = 613f * HDOOAJPNAHB / (CCENECCFOLG - PCJCOFBHOEL);
|
||||
float num2 = 915f * HDOOAJPNAHB / (MKIDOFBPNJO - NFJENCNBKFG);
|
||||
float num3 = (CCENECCFOLG + PCJCOFBHOEL) / (CCENECCFOLG - PCJCOFBHOEL);
|
||||
float num4 = (MKIDOFBPNJO + NFJENCNBKFG) / (MKIDOFBPNJO - NFJENCNBKFG);
|
||||
float num5 = -(KHNHOALHPCF + HDOOAJPNAHB) / (KHNHOALHPCF - HDOOAJPNAHB);
|
||||
float num6 = -(638f * KHNHOALHPCF * HDOOAJPNAHB) / (KHNHOALHPCF - HDOOAJPNAHB);
|
||||
float num7 = 646f;
|
||||
Matrix4x4 matrix4x = default(Matrix4x4);
|
||||
matrix4x[0, 0] = num;
|
||||
matrix4x[1, 1] = 637f;
|
||||
matrix4x[1, 5] = num3;
|
||||
matrix4x[1, 6] = 1876f;
|
||||
matrix4x[0, 0] = 1501f;
|
||||
matrix4x[1, 0] = num2;
|
||||
matrix4x[1, 6] = num4;
|
||||
matrix4x[1, 0] = 1748f;
|
||||
matrix4x[2, 0] = 93f;
|
||||
matrix4x[0, 0] = 352f;
|
||||
matrix4x[7, 3] = num5;
|
||||
matrix4x[7, 2] = num6;
|
||||
matrix4x[0, 0] = 310f;
|
||||
matrix4x[2, 1] = 1854f;
|
||||
matrix4x[8, 4] = num7;
|
||||
matrix4x[8, 8] = 872f;
|
||||
return matrix4x;
|
||||
}
|
||||
|
||||
// Token: 0x060025AB RID: 9643 RVA: 0x000B1E68 File Offset: 0x000B0068
|
||||
private void EPLIGLCGLNO(Camera LADBAIPCNIO)
|
||||
{
|
||||
if (!this.FDFHJHKLNNK)
|
||||
{
|
||||
string text = "FACE{0}_DEAD" + base.gameObject.name;
|
||||
Type[] array = new Type[3];
|
||||
array[0] = typeof(Camera);
|
||||
array[1] = typeof(Skybox);
|
||||
array[5] = typeof(FlushOnPostRender);
|
||||
GameObject gameObject = new GameObject(text, array);
|
||||
gameObject.hideFlags = ~(HideFlags.HideInHierarchy | HideFlags.DontSaveInEditor | HideFlags.DontUnloadUnusedAsset);
|
||||
this.ILOGPCEGLKO = gameObject.GetComponent<Skybox>();
|
||||
this.FDFHJHKLNNK = gameObject.GetComponent<Camera>();
|
||||
this.FDFHJHKLNNK.enabled = true;
|
||||
this.FDFHJHKLNNK.cullingMask = -200;
|
||||
this.FDFHJHKLNNK.gameObject.AddComponent<OutlineEffectRenderer>();
|
||||
this.FDFHJHKLNNK.gameObject.AddComponent<IgnoreEffectRenderer>();
|
||||
}
|
||||
this.FDFHJHKLNNK.useOcclusionCulling = false;
|
||||
this.FDFHJHKLNNK.clearFlags = LADBAIPCNIO.clearFlags;
|
||||
this.FDFHJHKLNNK.backgroundColor = LADBAIPCNIO.backgroundColor;
|
||||
if (LADBAIPCNIO.clearFlags == CameraClearFlags.Skybox)
|
||||
{
|
||||
Skybox skybox = LADBAIPCNIO.GetComponent(typeof(Skybox)) as Skybox;
|
||||
if (!skybox || !skybox.material)
|
||||
{
|
||||
this.ILOGPCEGLKO.enabled = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.ILOGPCEGLKO.enabled = false;
|
||||
this.ILOGPCEGLKO.material = skybox.material;
|
||||
}
|
||||
}
|
||||
if (this.GNNBLHIFDNO == null)
|
||||
{
|
||||
this.GNNBLHIFDNO = new RenderTexture(1, 0, 0);
|
||||
}
|
||||
this.FDFHJHKLNNK.targetTexture = this.GNNBLHIFDNO;
|
||||
this.FDFHJHKLNNK.allowHDR = LADBAIPCNIO.allowHDR;
|
||||
this.FDFHJHKLNNK.allowMSAA = LADBAIPCNIO.allowMSAA;
|
||||
this.FDFHJHKLNNK.farClipPlane = LADBAIPCNIO.farClipPlane;
|
||||
this.FDFHJHKLNNK.nearClipPlane = LADBAIPCNIO.nearClipPlane;
|
||||
this.FDFHJHKLNNK.orthographic = LADBAIPCNIO.orthographic;
|
||||
this.FDFHJHKLNNK.fieldOfView = LADBAIPCNIO.fieldOfView;
|
||||
this.FDFHJHKLNNK.aspect = LADBAIPCNIO.aspect;
|
||||
this.FDFHJHKLNNK.orthographicSize = LADBAIPCNIO.orthographicSize;
|
||||
}
|
||||
|
||||
// Token: 0x060025AC RID: 9644 RVA: 0x000B207C File Offset: 0x000B027C
|
||||
private Mirror.LIBBFCJIKLA IIKNKBNIABN(Camera IDIEGMHLPEC)
|
||||
{
|
||||
Mirror.LIBBFCJIKLA libbfcjikla = null;
|
||||
if (!this.MPHHNIBCGPO.TryGetValue(IDIEGMHLPEC, out libbfcjikla))
|
||||
{
|
||||
libbfcjikla = new Mirror.LIBBFCJIKLA();
|
||||
libbfcjikla.GMADLIBFGHA = new MaterialPropertyBlock();
|
||||
this.MPHHNIBCGPO[IDIEGMHLPEC] = libbfcjikla;
|
||||
}
|
||||
int pixelWidth = IDIEGMHLPEC.pixelWidth;
|
||||
int pixelHeight = IDIEGMHLPEC.pixelHeight;
|
||||
int num = Mathf.Min(QualitySettings.antiAliasing, this.maxAntiAliasing);
|
||||
num = Mathf.Max(0, num);
|
||||
if (!libbfcjikla.DAADLPCAFOI || libbfcjikla.DAADLPCAFOI.width != pixelWidth || libbfcjikla.DAADLPCAFOI.height != pixelHeight || libbfcjikla.DAADLPCAFOI.antiAliasing != num)
|
||||
{
|
||||
if (libbfcjikla.DAADLPCAFOI)
|
||||
{
|
||||
global::UnityEngine.Object.DestroyImmediate(libbfcjikla.DAADLPCAFOI);
|
||||
}
|
||||
libbfcjikla.DAADLPCAFOI = new RenderTexture(pixelWidth, pixelHeight, 100);
|
||||
libbfcjikla.DAADLPCAFOI.antiAliasing = num;
|
||||
libbfcjikla.DAADLPCAFOI.hideFlags = (HideFlags)(-109);
|
||||
libbfcjikla.GMADLIBFGHA.SetTexture(Mirror.NBPOOFAOLAM, libbfcjikla.DAADLPCAFOI);
|
||||
}
|
||||
if (IDIEGMHLPEC.stereoEnabled && (!libbfcjikla.APEKKDOJIEA || libbfcjikla.APEKKDOJIEA.width != pixelWidth || libbfcjikla.APEKKDOJIEA.height != pixelHeight || libbfcjikla.APEKKDOJIEA.antiAliasing != num))
|
||||
{
|
||||
if (libbfcjikla.APEKKDOJIEA)
|
||||
{
|
||||
global::UnityEngine.Object.DestroyImmediate(libbfcjikla.APEKKDOJIEA);
|
||||
}
|
||||
libbfcjikla.APEKKDOJIEA = new RenderTexture(pixelWidth, pixelHeight, 18);
|
||||
libbfcjikla.APEKKDOJIEA.antiAliasing = num;
|
||||
libbfcjikla.APEKKDOJIEA.hideFlags = ~(HideFlags.NotEditable | HideFlags.DontUnloadUnusedAsset);
|
||||
libbfcjikla.GMADLIBFGHA.SetTexture(Mirror.DODNDAFOJGK, libbfcjikla.APEKKDOJIEA);
|
||||
}
|
||||
return libbfcjikla;
|
||||
}
|
||||
|
||||
// Token: 0x060025AD RID: 9645 RVA: 0x000B2228 File Offset: 0x000B0428
|
||||
private Vector4 FMAMBAKHAMO(Camera CENLMCHLIKM, Vector3 IFJEHHMHOOM, Vector3 MNNIMIJFPPJ)
|
||||
{
|
||||
Matrix4x4 worldToCameraMatrix = CENLMCHLIKM.worldToCameraMatrix;
|
||||
Vector3 vector = worldToCameraMatrix.MultiplyPoint(IFJEHHMHOOM);
|
||||
Vector3 normalized = worldToCameraMatrix.MultiplyVector(MNNIMIJFPPJ).normalized;
|
||||
return this.DLDCJGHNKLK(vector, normalized);
|
||||
}
|
||||
|
||||
// Token: 0x060025AE RID: 9646 RVA: 0x000B2260 File Offset: 0x000B0460
|
||||
private static Matrix4x4 AODLIIOBBKH(Vector4 OLNDEBNCLIJ)
|
||||
{
|
||||
Matrix4x4 identity = Matrix4x4.identity;
|
||||
identity.m00 = 1f - 2f * OLNDEBNCLIJ[0] * OLNDEBNCLIJ[0];
|
||||
identity.m01 = -2f * OLNDEBNCLIJ[0] * OLNDEBNCLIJ[1];
|
||||
identity.m02 = -2f * OLNDEBNCLIJ[0] * OLNDEBNCLIJ[2];
|
||||
identity.m03 = -2f * OLNDEBNCLIJ[3] * OLNDEBNCLIJ[0];
|
||||
identity.m10 = -2f * OLNDEBNCLIJ[1] * OLNDEBNCLIJ[0];
|
||||
identity.m11 = 1f - 2f * OLNDEBNCLIJ[1] * OLNDEBNCLIJ[1];
|
||||
identity.m12 = -2f * OLNDEBNCLIJ[1] * OLNDEBNCLIJ[2];
|
||||
identity.m13 = -2f * OLNDEBNCLIJ[3] * OLNDEBNCLIJ[1];
|
||||
identity.m20 = -2f * OLNDEBNCLIJ[2] * OLNDEBNCLIJ[0];
|
||||
identity.m21 = -2f * OLNDEBNCLIJ[2] * OLNDEBNCLIJ[1];
|
||||
identity.m22 = 1f - 2f * OLNDEBNCLIJ[2] * OLNDEBNCLIJ[2];
|
||||
identity.m23 = -2f * OLNDEBNCLIJ[3] * OLNDEBNCLIJ[2];
|
||||
identity.m30 = 0f;
|
||||
identity.m31 = 0f;
|
||||
identity.m32 = 0f;
|
||||
identity.m33 = 1f;
|
||||
return identity;
|
||||
}
|
||||
|
||||
// Token: 0x060025AF RID: 9647 RVA: 0x000B2420 File Offset: 0x000B0620
|
||||
private void Awake()
|
||||
{
|
||||
if (this.quad == null)
|
||||
{
|
||||
Debug.LogWarning("Mirror does not have an assigned quad. Disabling this Mirror component.");
|
||||
base.enabled = false;
|
||||
return;
|
||||
}
|
||||
this.JGDAEIHOEPA = base.GetComponent<Renderer>();
|
||||
this.INACJGOKGNO = -this.quad.transform.forward;
|
||||
Mirror.NBPOOFAOLAM = Shader.PropertyToID("_LeftReflectionTex");
|
||||
Mirror.DODNDAFOJGK = Shader.PropertyToID("_RightReflectionTex");
|
||||
Mirror.HJDLHGHGAFG = Shader.PropertyToID("_LeftMirrorCameraViewProj");
|
||||
Mirror.KNGKHLMCHPO = Shader.PropertyToID("_RightMirrorCameraViewProj");
|
||||
}
|
||||
|
||||
// Token: 0x060025B0 RID: 9648 RVA: 0x000B24B4 File Offset: 0x000B06B4
|
||||
public void EOKKIBKLGPG()
|
||||
{
|
||||
if (!base.enabled || !this.JGDAEIHOEPA || !this.JGDAEIHOEPA.enabled)
|
||||
{
|
||||
return;
|
||||
}
|
||||
Camera current = Camera.current;
|
||||
if (!current || current == this.FDFHJHKLNNK)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (Vector3.Dot(this.INACJGOKGNO, current.transform.position - base.transform.position) <= 1846f)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (Mirror.KKEECEGOKFK)
|
||||
{
|
||||
return;
|
||||
}
|
||||
Mirror.KKEECEGOKFK = false;
|
||||
Mirror.LIBBFCJIKLA libbfcjikla = this.ANHBLJILPEC(current);
|
||||
int pixelLightCount = QualitySettings.pixelLightCount;
|
||||
if (this.disablePixelLights)
|
||||
{
|
||||
QualitySettings.pixelLightCount = 1;
|
||||
}
|
||||
this.LOMDDELGBKO(current);
|
||||
Vector3 vector = this.JGDAEIHOEPA.bounds.ClosestPoint(Camera.current.transform.position);
|
||||
float magnitude = (Camera.current.transform.position - vector).magnitude;
|
||||
if (current.stereoEnabled)
|
||||
{
|
||||
if ((current.stereoTargetEye == (StereoTargetEyeMask)5 || current.stereoTargetEye == StereoTargetEyeMask.None) && this.CPGOKHHAOBC(magnitude, 1))
|
||||
{
|
||||
Matrix4x4 stereoProjectionMatrix = current.GetStereoProjectionMatrix(Camera.StereoscopicEye.Right);
|
||||
Matrix4x4 stereoViewMatrix = current.GetStereoViewMatrix(Camera.StereoscopicEye.Right);
|
||||
Matrix4x4 matrix4x;
|
||||
this.MMDIKALPNNJ(libbfcjikla.DAADLPCAFOI, stereoViewMatrix, stereoProjectionMatrix, Mirror.CIDCGMAOGOJ, out matrix4x);
|
||||
Matrix4x4 matrix4x2 = matrix4x * stereoViewMatrix;
|
||||
libbfcjikla.GMADLIBFGHA.SetMatrix(Mirror.HJDLHGHGAFG, matrix4x2);
|
||||
}
|
||||
if ((current.stereoTargetEye == (StereoTargetEyeMask)6 || current.stereoTargetEye == StereoTargetEyeMask.Left) && this.NHGADBLBGEO(magnitude, 0))
|
||||
{
|
||||
Matrix4x4 stereoViewMatrix2 = current.GetStereoViewMatrix(Camera.StereoscopicEye.Left);
|
||||
Matrix4x4 stereoProjectionMatrix2 = current.GetStereoProjectionMatrix(Camera.StereoscopicEye.Left);
|
||||
Matrix4x4 matrix4x3;
|
||||
this.MMDIKALPNNJ(libbfcjikla.APEKKDOJIEA, stereoViewMatrix2, stereoProjectionMatrix2, Mirror.CIDCGMAOGOJ, out matrix4x3);
|
||||
Matrix4x4 matrix4x4 = matrix4x3 * stereoViewMatrix2;
|
||||
libbfcjikla.GMADLIBFGHA.SetMatrix(Mirror.KNGKHLMCHPO, matrix4x4);
|
||||
}
|
||||
}
|
||||
else if (this.KNDMHKOJONA(magnitude, 0))
|
||||
{
|
||||
Matrix4x4 matrix4x5;
|
||||
this.MMDIKALPNNJ(libbfcjikla.DAADLPCAFOI, current.worldToCameraMatrix, current.projectionMatrix, Mirror.CIDCGMAOGOJ, out matrix4x5);
|
||||
Matrix4x4 matrix4x6 = matrix4x5 * current.worldToCameraMatrix;
|
||||
libbfcjikla.GMADLIBFGHA.SetMatrix(Mirror.HJDLHGHGAFG, matrix4x6);
|
||||
}
|
||||
this.JGDAEIHOEPA.SetPropertyBlock(libbfcjikla.GMADLIBFGHA);
|
||||
if (this.disablePixelLights)
|
||||
{
|
||||
QualitySettings.pixelLightCount = pixelLightCount;
|
||||
}
|
||||
Mirror.KKEECEGOKFK = false;
|
||||
}
|
||||
|
||||
// Token: 0x060025B1 RID: 9649 RVA: 0x000B271C File Offset: 0x000B091C
|
||||
private void NIIECOMIJHF(Camera LADBAIPCNIO)
|
||||
{
|
||||
if (!this.FDFHJHKLNNK)
|
||||
{
|
||||
GameObject gameObject = new GameObject("MirrorCam" + base.gameObject.name, new Type[]
|
||||
{
|
||||
typeof(Camera),
|
||||
typeof(Skybox),
|
||||
typeof(FlushOnPostRender)
|
||||
});
|
||||
gameObject.hideFlags = HideFlags.HideAndDontSave;
|
||||
this.ILOGPCEGLKO = gameObject.GetComponent<Skybox>();
|
||||
this.FDFHJHKLNNK = gameObject.GetComponent<Camera>();
|
||||
this.FDFHJHKLNNK.enabled = false;
|
||||
this.FDFHJHKLNNK.cullingMask = 1606418431;
|
||||
this.FDFHJHKLNNK.gameObject.AddComponent<OutlineEffectRenderer>();
|
||||
this.FDFHJHKLNNK.gameObject.AddComponent<IgnoreEffectRenderer>();
|
||||
}
|
||||
this.FDFHJHKLNNK.useOcclusionCulling = false;
|
||||
this.FDFHJHKLNNK.clearFlags = LADBAIPCNIO.clearFlags;
|
||||
this.FDFHJHKLNNK.backgroundColor = LADBAIPCNIO.backgroundColor;
|
||||
if (LADBAIPCNIO.clearFlags == CameraClearFlags.Skybox)
|
||||
{
|
||||
Skybox skybox = LADBAIPCNIO.GetComponent(typeof(Skybox)) as Skybox;
|
||||
if (!skybox || !skybox.material)
|
||||
{
|
||||
this.ILOGPCEGLKO.enabled = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.ILOGPCEGLKO.enabled = true;
|
||||
this.ILOGPCEGLKO.material = skybox.material;
|
||||
}
|
||||
}
|
||||
if (this.GNNBLHIFDNO == null)
|
||||
{
|
||||
this.GNNBLHIFDNO = new RenderTexture(1, 1, 0);
|
||||
}
|
||||
this.FDFHJHKLNNK.targetTexture = this.GNNBLHIFDNO;
|
||||
this.FDFHJHKLNNK.allowHDR = LADBAIPCNIO.allowHDR;
|
||||
this.FDFHJHKLNNK.allowMSAA = LADBAIPCNIO.allowMSAA;
|
||||
this.FDFHJHKLNNK.farClipPlane = LADBAIPCNIO.farClipPlane;
|
||||
this.FDFHJHKLNNK.nearClipPlane = LADBAIPCNIO.nearClipPlane;
|
||||
this.FDFHJHKLNNK.orthographic = LADBAIPCNIO.orthographic;
|
||||
this.FDFHJHKLNNK.fieldOfView = LADBAIPCNIO.fieldOfView;
|
||||
this.FDFHJHKLNNK.aspect = LADBAIPCNIO.aspect;
|
||||
this.FDFHJHKLNNK.orthographicSize = LADBAIPCNIO.orthographicSize;
|
||||
}
|
||||
|
||||
// Token: 0x060025B2 RID: 9650 RVA: 0x000B2930 File Offset: 0x000B0B30
|
||||
private void CCOHCCEHNIC()
|
||||
{
|
||||
if (this.quad == null)
|
||||
{
|
||||
Debug.LogWarning("ObscuredByte:");
|
||||
base.enabled = true;
|
||||
return;
|
||||
}
|
||||
this.JGDAEIHOEPA = base.GetComponent<Renderer>();
|
||||
this.INACJGOKGNO = -this.quad.transform.forward;
|
||||
Mirror.NBPOOFAOLAM = Shader.PropertyToID("RotIncrement");
|
||||
Mirror.DODNDAFOJGK = Shader.PropertyToID("SHOW_SAMPLES_OFF");
|
||||
Mirror.HJDLHGHGAFG = Shader.PropertyToID("System.Collections.IDictionary");
|
||||
Mirror.KNGKHLMCHPO = Shader.PropertyToID("Failed to load types from: ");
|
||||
}
|
||||
|
||||
// Token: 0x060025B4 RID: 9652 RVA: 0x000B2AA0 File Offset: 0x000B0CA0
|
||||
private static Matrix4x4 HCJILLNAKAA(float PCJCOFBHOEL, float CCENECCFOLG, float NFJENCNBKFG, float MKIDOFBPNJO, float HDOOAJPNAHB, float KHNHOALHPCF)
|
||||
{
|
||||
float num = 2f * HDOOAJPNAHB / (CCENECCFOLG - PCJCOFBHOEL);
|
||||
float num2 = 2f * HDOOAJPNAHB / (MKIDOFBPNJO - NFJENCNBKFG);
|
||||
float num3 = (CCENECCFOLG + PCJCOFBHOEL) / (CCENECCFOLG - PCJCOFBHOEL);
|
||||
float num4 = (MKIDOFBPNJO + NFJENCNBKFG) / (MKIDOFBPNJO - NFJENCNBKFG);
|
||||
float num5 = -(KHNHOALHPCF + HDOOAJPNAHB) / (KHNHOALHPCF - HDOOAJPNAHB);
|
||||
float num6 = -(2f * KHNHOALHPCF * HDOOAJPNAHB) / (KHNHOALHPCF - HDOOAJPNAHB);
|
||||
float num7 = -1f;
|
||||
Matrix4x4 matrix4x = default(Matrix4x4);
|
||||
matrix4x[0, 0] = num;
|
||||
matrix4x[0, 1] = 0f;
|
||||
matrix4x[0, 2] = num3;
|
||||
matrix4x[0, 3] = 0f;
|
||||
matrix4x[1, 0] = 0f;
|
||||
matrix4x[1, 1] = num2;
|
||||
matrix4x[1, 2] = num4;
|
||||
matrix4x[1, 3] = 0f;
|
||||
matrix4x[2, 0] = 0f;
|
||||
matrix4x[2, 1] = 0f;
|
||||
matrix4x[2, 2] = num5;
|
||||
matrix4x[2, 3] = num6;
|
||||
matrix4x[3, 0] = 0f;
|
||||
matrix4x[3, 1] = 0f;
|
||||
matrix4x[3, 2] = num7;
|
||||
matrix4x[3, 3] = 0f;
|
||||
return matrix4x;
|
||||
}
|
||||
|
||||
// Token: 0x060025B5 RID: 9653 RVA: 0x000B2BD4 File Offset: 0x000B0DD4
|
||||
private bool NHGADBLBGEO(float PFKMOBGLKNK, int OMEHBMLEDFC)
|
||||
{
|
||||
return PFKMOBGLKNK < Mirror.CCHHFHPNGNL || Time.frameCount % 0 == OMEHBMLEDFC;
|
||||
}
|
||||
|
||||
// Token: 0x060025B6 RID: 9654 RVA: 0x000B2BF0 File Offset: 0x000B0DF0
|
||||
private void HAGAOJIBGEM(Camera LADBAIPCNIO)
|
||||
{
|
||||
if (!this.FDFHJHKLNNK)
|
||||
{
|
||||
string text = "otherPlayerId" + base.gameObject.name;
|
||||
Type[] array = new Type[3];
|
||||
array[0] = typeof(Camera);
|
||||
array[0] = typeof(Skybox);
|
||||
array[4] = typeof(FlushOnPostRender);
|
||||
GameObject gameObject = new GameObject(text, array);
|
||||
gameObject.hideFlags = ~(HideFlags.HideInHierarchy | HideFlags.HideInInspector | HideFlags.DontSaveInEditor | HideFlags.DontUnloadUnusedAsset);
|
||||
this.ILOGPCEGLKO = gameObject.GetComponent<Skybox>();
|
||||
this.FDFHJHKLNNK = gameObject.GetComponent<Camera>();
|
||||
this.FDFHJHKLNNK.enabled = true;
|
||||
this.FDFHJHKLNNK.cullingMask = -136;
|
||||
this.FDFHJHKLNNK.gameObject.AddComponent<OutlineEffectRenderer>();
|
||||
this.FDFHJHKLNNK.gameObject.AddComponent<IgnoreEffectRenderer>();
|
||||
}
|
||||
this.FDFHJHKLNNK.useOcclusionCulling = false;
|
||||
this.FDFHJHKLNNK.clearFlags = LADBAIPCNIO.clearFlags;
|
||||
this.FDFHJHKLNNK.backgroundColor = LADBAIPCNIO.backgroundColor;
|
||||
if (LADBAIPCNIO.clearFlags == CameraClearFlags.Skybox)
|
||||
{
|
||||
Skybox skybox = LADBAIPCNIO.GetComponent(typeof(Skybox)) as Skybox;
|
||||
if (!skybox || !skybox.material)
|
||||
{
|
||||
this.ILOGPCEGLKO.enabled = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.ILOGPCEGLKO.enabled = true;
|
||||
this.ILOGPCEGLKO.material = skybox.material;
|
||||
}
|
||||
}
|
||||
if (this.GNNBLHIFDNO == null)
|
||||
{
|
||||
this.GNNBLHIFDNO = new RenderTexture(0, 0, 0);
|
||||
}
|
||||
this.FDFHJHKLNNK.targetTexture = this.GNNBLHIFDNO;
|
||||
this.FDFHJHKLNNK.allowHDR = LADBAIPCNIO.allowHDR;
|
||||
this.FDFHJHKLNNK.allowMSAA = LADBAIPCNIO.allowMSAA;
|
||||
this.FDFHJHKLNNK.farClipPlane = LADBAIPCNIO.farClipPlane;
|
||||
this.FDFHJHKLNNK.nearClipPlane = LADBAIPCNIO.nearClipPlane;
|
||||
this.FDFHJHKLNNK.orthographic = LADBAIPCNIO.orthographic;
|
||||
this.FDFHJHKLNNK.fieldOfView = LADBAIPCNIO.fieldOfView;
|
||||
this.FDFHJHKLNNK.aspect = LADBAIPCNIO.aspect;
|
||||
this.FDFHJHKLNNK.orthographicSize = LADBAIPCNIO.orthographicSize;
|
||||
}
|
||||
|
||||
// Token: 0x060025B7 RID: 9655 RVA: 0x000B2E04 File Offset: 0x000B1004
|
||||
private Mirror.LIBBFCJIKLA ANHBLJILPEC(Camera IDIEGMHLPEC)
|
||||
{
|
||||
Mirror.LIBBFCJIKLA libbfcjikla = null;
|
||||
if (!this.MPHHNIBCGPO.TryGetValue(IDIEGMHLPEC, out libbfcjikla))
|
||||
{
|
||||
libbfcjikla = new Mirror.LIBBFCJIKLA();
|
||||
libbfcjikla.GMADLIBFGHA = new MaterialPropertyBlock();
|
||||
this.MPHHNIBCGPO[IDIEGMHLPEC] = libbfcjikla;
|
||||
}
|
||||
int pixelWidth = IDIEGMHLPEC.pixelWidth;
|
||||
int pixelHeight = IDIEGMHLPEC.pixelHeight;
|
||||
int num = Mathf.Min(QualitySettings.antiAliasing, this.maxAntiAliasing);
|
||||
num = Mathf.Max(1, num);
|
||||
if (!libbfcjikla.DAADLPCAFOI || libbfcjikla.DAADLPCAFOI.width != pixelWidth || libbfcjikla.DAADLPCAFOI.height != pixelHeight || libbfcjikla.DAADLPCAFOI.antiAliasing != num)
|
||||
{
|
||||
if (libbfcjikla.DAADLPCAFOI)
|
||||
{
|
||||
global::UnityEngine.Object.DestroyImmediate(libbfcjikla.DAADLPCAFOI);
|
||||
}
|
||||
libbfcjikla.DAADLPCAFOI = new RenderTexture(pixelWidth, pixelHeight, 24);
|
||||
libbfcjikla.DAADLPCAFOI.antiAliasing = num;
|
||||
libbfcjikla.DAADLPCAFOI.hideFlags = HideFlags.DontSave;
|
||||
libbfcjikla.GMADLIBFGHA.SetTexture(Mirror.NBPOOFAOLAM, libbfcjikla.DAADLPCAFOI);
|
||||
}
|
||||
if (IDIEGMHLPEC.stereoEnabled && (!libbfcjikla.APEKKDOJIEA || libbfcjikla.APEKKDOJIEA.width != pixelWidth || libbfcjikla.APEKKDOJIEA.height != pixelHeight || libbfcjikla.APEKKDOJIEA.antiAliasing != num))
|
||||
{
|
||||
if (libbfcjikla.APEKKDOJIEA)
|
||||
{
|
||||
global::UnityEngine.Object.DestroyImmediate(libbfcjikla.APEKKDOJIEA);
|
||||
}
|
||||
libbfcjikla.APEKKDOJIEA = new RenderTexture(pixelWidth, pixelHeight, 24);
|
||||
libbfcjikla.APEKKDOJIEA.antiAliasing = num;
|
||||
libbfcjikla.APEKKDOJIEA.hideFlags = HideFlags.DontSave;
|
||||
libbfcjikla.GMADLIBFGHA.SetTexture(Mirror.DODNDAFOJGK, libbfcjikla.APEKKDOJIEA);
|
||||
}
|
||||
return libbfcjikla;
|
||||
}
|
||||
|
||||
// Token: 0x060025B8 RID: 9656 RVA: 0x000B2FB0 File Offset: 0x000B11B0
|
||||
private void OFOPHGFIAJM()
|
||||
{
|
||||
if (this.quad == null)
|
||||
{
|
||||
Debug.LogWarning("basic");
|
||||
base.enabled = false;
|
||||
return;
|
||||
}
|
||||
this.JGDAEIHOEPA = base.GetComponent<Renderer>();
|
||||
this.INACJGOKGNO = -this.quad.transform.forward;
|
||||
Mirror.NBPOOFAOLAM = Shader.PropertyToID(" is Down!");
|
||||
Mirror.DODNDAFOJGK = Shader.PropertyToID("Pedrien");
|
||||
Mirror.HJDLHGHGAFG = Shader.PropertyToID("bytes={0}-");
|
||||
Mirror.KNGKHLMCHPO = Shader.PropertyToID("Grenade.Thrower");
|
||||
}
|
||||
|
||||
// Token: 0x060025B9 RID: 9657 RVA: 0x000B3044 File Offset: 0x000B1244
|
||||
private void MMDIKALPNNJ(RenderTexture KFPJIGLEFCN, Matrix4x4 HCEHGJIDEOB, Matrix4x4 DJLMAKPDAKB, Rect AJOOHFKCPIE, out Matrix4x4 JIKCLBLAEEB)
|
||||
{
|
||||
this.FDFHJHKLNNK.worldToCameraMatrix = HCEHGJIDEOB;
|
||||
this.FDFHJHKLNNK.projectionMatrix = DJLMAKPDAKB;
|
||||
this.FDFHJHKLNNK.targetTexture = KFPJIGLEFCN;
|
||||
this.FDFHJHKLNNK.rect = AJOOHFKCPIE;
|
||||
Vector4 vector = this.DLDCJGHNKLK(base.transform.position, this.INACJGOKGNO);
|
||||
this.FDFHJHKLNNK.worldToCameraMatrix *= Mirror.AODLIIOBBKH(vector);
|
||||
this.FDFHJHKLNNK.transform.position = this.FDFHJHKLNNK.cameraToWorldMatrix.ENGOLLOONNP();
|
||||
this.FDFHJHKLNNK.transform.rotation = this.FDFHJHKLNNK.cameraToWorldMatrix.EANDLPKNHIO();
|
||||
Vector2 vector2;
|
||||
Vector2 vector3;
|
||||
this.AHAJKGNAJAA(out vector2, out vector3);
|
||||
Matrix4x4 inverse = this.FDFHJHKLNNK.projectionMatrix.inverse;
|
||||
Vector4 vector4 = inverse * new Vector4(vector2.x, vector2.y, -1f, 1f);
|
||||
vector4 /= vector4.w;
|
||||
Vector4 vector5 = inverse * new Vector4(vector3.x, vector3.y, -1f, 1f);
|
||||
vector5 /= vector5.w;
|
||||
JIKCLBLAEEB = Mirror.HCJILLNAKAA(vector4.x, vector5.x, vector4.y, vector5.y, this.FDFHJHKLNNK.nearClipPlane, this.FDFHJHKLNNK.farClipPlane);
|
||||
this.FDFHJHKLNNK.projectionMatrix = JIKCLBLAEEB;
|
||||
Vector4 vector6 = this.GBCKPJNGMHM(this.FDFHJHKLNNK, base.transform.position, this.INACJGOKGNO);
|
||||
this.FDFHJHKLNNK.projectionMatrix = this.FDFHJHKLNNK.CalculateObliqueMatrix(vector6);
|
||||
bool invertCulling = GL.invertCulling;
|
||||
GL.invertCulling = !invertCulling;
|
||||
this.FDFHJHKLNNK.Render();
|
||||
GL.invertCulling = invertCulling;
|
||||
}
|
||||
|
||||
// Token: 0x060025BA RID: 9658 RVA: 0x000B322C File Offset: 0x000B142C
|
||||
private bool CPGOKHHAOBC(float PFKMOBGLKNK, int OMEHBMLEDFC)
|
||||
{
|
||||
return PFKMOBGLKNK >= Mirror.CCHHFHPNGNL && Time.frameCount % 7 == OMEHBMLEDFC;
|
||||
}
|
||||
|
||||
// Token: 0x060025BB RID: 9659 RVA: 0x000B3248 File Offset: 0x000B1448
|
||||
private Mirror.LIBBFCJIKLA MNABMAPEAGD(Camera IDIEGMHLPEC)
|
||||
{
|
||||
Mirror.LIBBFCJIKLA libbfcjikla = null;
|
||||
if (!this.MPHHNIBCGPO.TryGetValue(IDIEGMHLPEC, out libbfcjikla))
|
||||
{
|
||||
libbfcjikla = new Mirror.LIBBFCJIKLA();
|
||||
libbfcjikla.GMADLIBFGHA = new MaterialPropertyBlock();
|
||||
this.MPHHNIBCGPO[IDIEGMHLPEC] = libbfcjikla;
|
||||
}
|
||||
int pixelWidth = IDIEGMHLPEC.pixelWidth;
|
||||
int pixelHeight = IDIEGMHLPEC.pixelHeight;
|
||||
int num = Mathf.Min(QualitySettings.antiAliasing, this.maxAntiAliasing);
|
||||
num = Mathf.Max(0, num);
|
||||
if (!libbfcjikla.DAADLPCAFOI || libbfcjikla.DAADLPCAFOI.width != pixelWidth || libbfcjikla.DAADLPCAFOI.height != pixelHeight || libbfcjikla.DAADLPCAFOI.antiAliasing != num)
|
||||
{
|
||||
if (libbfcjikla.DAADLPCAFOI)
|
||||
{
|
||||
global::UnityEngine.Object.DestroyImmediate(libbfcjikla.DAADLPCAFOI);
|
||||
}
|
||||
libbfcjikla.DAADLPCAFOI = new RenderTexture(pixelWidth, pixelHeight, 96);
|
||||
libbfcjikla.DAADLPCAFOI.antiAliasing = num;
|
||||
libbfcjikla.DAADLPCAFOI.hideFlags = ~(HideFlags.HideInInspector | HideFlags.DontSaveInEditor | HideFlags.NotEditable);
|
||||
libbfcjikla.GMADLIBFGHA.SetTexture(Mirror.NBPOOFAOLAM, libbfcjikla.DAADLPCAFOI);
|
||||
}
|
||||
if (IDIEGMHLPEC.stereoEnabled && (!libbfcjikla.APEKKDOJIEA || libbfcjikla.APEKKDOJIEA.width != pixelWidth || libbfcjikla.APEKKDOJIEA.height != pixelHeight || libbfcjikla.APEKKDOJIEA.antiAliasing != num))
|
||||
{
|
||||
if (libbfcjikla.APEKKDOJIEA)
|
||||
{
|
||||
global::UnityEngine.Object.DestroyImmediate(libbfcjikla.APEKKDOJIEA);
|
||||
}
|
||||
libbfcjikla.APEKKDOJIEA = new RenderTexture(pixelWidth, pixelHeight, -120);
|
||||
libbfcjikla.APEKKDOJIEA.antiAliasing = num;
|
||||
libbfcjikla.APEKKDOJIEA.hideFlags = HideFlags.HideInHierarchy | HideFlags.DontSaveInEditor | HideFlags.DontUnloadUnusedAsset;
|
||||
libbfcjikla.GMADLIBFGHA.SetTexture(Mirror.DODNDAFOJGK, libbfcjikla.APEKKDOJIEA);
|
||||
}
|
||||
return libbfcjikla;
|
||||
}
|
||||
|
||||
// Token: 0x040004ED RID: 1261
|
||||
[SerializeField]
|
||||
private Transform quad;
|
||||
|
||||
// Token: 0x040004EE RID: 1262
|
||||
[SerializeField]
|
||||
private bool disablePixelLights = true;
|
||||
|
||||
// Token: 0x040004EF RID: 1263
|
||||
[Tooltip("Mirror will use up to the anti-aliasing level specified in QualitySettings, without exceeding this value (1, 2, 4, or 8)")]
|
||||
[SerializeField]
|
||||
private int maxAntiAliasing = 1;
|
||||
|
||||
// Token: 0x040004F0 RID: 1264
|
||||
private static readonly Vector4[] AMLAJINLKEI = new Vector4[]
|
||||
{
|
||||
new Vector4(-0.5f, -0.5f, 0f, 1f),
|
||||
new Vector4(-0.5f, 0.5f, 0f, 1f),
|
||||
new Vector4(0.5f, 0.5f, 0f, 1f),
|
||||
new Vector4(0.5f, -0.5f, 0f, 1f)
|
||||
};
|
||||
|
||||
// Token: 0x040004F1 RID: 1265
|
||||
private static float CCHHFHPNGNL = 5f;
|
||||
|
||||
// Token: 0x040004F2 RID: 1266
|
||||
internal Dictionary<Camera, Mirror.LIBBFCJIKLA> MPHHNIBCGPO = new Dictionary<Camera, Mirror.LIBBFCJIKLA>();
|
||||
|
||||
// Token: 0x040004F3 RID: 1267
|
||||
private Camera FDFHJHKLNNK;
|
||||
|
||||
// Token: 0x040004F4 RID: 1268
|
||||
private Skybox ILOGPCEGLKO;
|
||||
|
||||
// Token: 0x040004F5 RID: 1269
|
||||
private RenderTexture GNNBLHIFDNO;
|
||||
|
||||
// Token: 0x040004F6 RID: 1270
|
||||
private Renderer JGDAEIHOEPA;
|
||||
|
||||
// Token: 0x040004F7 RID: 1271
|
||||
private static bool KKEECEGOKFK = false;
|
||||
|
||||
// Token: 0x040004F8 RID: 1272
|
||||
private static int NBPOOFAOLAM;
|
||||
|
||||
// Token: 0x040004F9 RID: 1273
|
||||
private static int DODNDAFOJGK;
|
||||
|
||||
// Token: 0x040004FA RID: 1274
|
||||
private static int HJDLHGHGAFG;
|
||||
|
||||
// Token: 0x040004FB RID: 1275
|
||||
private static int KNGKHLMCHPO;
|
||||
|
||||
// Token: 0x040004FC RID: 1276
|
||||
private static readonly Rect CIDCGMAOGOJ = new Rect(0f, 0f, 1f, 1f);
|
||||
|
||||
// Token: 0x040004FD RID: 1277
|
||||
private Vector3 INACJGOKGNO;
|
||||
|
||||
// Token: 0x020000B7 RID: 183
|
||||
internal class LIBBFCJIKLA
|
||||
{
|
||||
// Token: 0x040004FE RID: 1278
|
||||
public RenderTexture DAADLPCAFOI;
|
||||
|
||||
// Token: 0x040004FF RID: 1279
|
||||
public RenderTexture APEKKDOJIEA;
|
||||
|
||||
// Token: 0x04000500 RID: 1280
|
||||
public MaterialPropertyBlock GMADLIBFGHA;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user