49 lines
1.3 KiB
C#
49 lines
1.3 KiB
C#
using System;
|
|
using UnityEngine;
|
|
|
|
namespace LOS
|
|
{
|
|
// Token: 0x02000105 RID: 261
|
|
[ExecuteInEditMode]
|
|
[AddComponentMenu("Line of Sight/Deprecated/LOS Final Resolve")]
|
|
public class LOSFinalResolve : MonoBehaviour
|
|
{
|
|
// Token: 0x060015ED RID: 5613 RVA: 0x0019C5F3 File Offset: 0x0019A7F3
|
|
private void OnEnable()
|
|
{
|
|
Debug.LogWarning("The LOS Final Resolve script component is obsolete, you can safely remove this script.");
|
|
}
|
|
|
|
// Token: 0x060015EE RID: 5614 RVA: 0x0019C5FF File Offset: 0x0019A7FF
|
|
private void OnPreRender()
|
|
{
|
|
if (base.GetComponent<Camera>().actualRenderingPath == RenderingPath.DeferredShading)
|
|
{
|
|
this.m_ActiveRT = RenderTexture.active;
|
|
return;
|
|
}
|
|
this.m_ActiveRT = null;
|
|
}
|
|
|
|
// Token: 0x060015EF RID: 5615 RVA: 0x0019C624 File Offset: 0x0019A824
|
|
private void OnRenderImage(RenderTexture src, RenderTexture dest)
|
|
{
|
|
if (base.GetComponent<Camera>().actualRenderingPath != RenderingPath.DeferredShading || !this.m_ActiveRT || !(src != this.m_ActiveRT))
|
|
{
|
|
Graphics.Blit(src, dest);
|
|
return;
|
|
}
|
|
if (src.format == this.m_ActiveRT.format)
|
|
{
|
|
Graphics.Blit(src, this.m_ActiveRT);
|
|
Graphics.Blit(this.m_ActiveRT, dest);
|
|
return;
|
|
}
|
|
Debug.LogWarning("Cant resolve texture, because of different formats!");
|
|
}
|
|
|
|
// Token: 0x04002617 RID: 9751
|
|
private RenderTexture m_ActiveRT;
|
|
}
|
|
}
|