120 lines
3.9 KiB
C#
120 lines
3.9 KiB
C#
using System;
|
|
|
|
namespace UnityEngine.Rendering
|
|
{
|
|
// Token: 0x0200041F RID: 1055
|
|
public struct RenderTargetIdentifier
|
|
{
|
|
// Token: 0x06003826 RID: 14374 RVA: 0x00060608 File Offset: 0x0005E808
|
|
public RenderTargetIdentifier(BuiltinRenderTextureType type)
|
|
{
|
|
this.m_Type = type;
|
|
this.m_NameID = -1;
|
|
this.m_InstanceID = 0;
|
|
}
|
|
|
|
// Token: 0x06003827 RID: 14375 RVA: 0x00060620 File Offset: 0x0005E820
|
|
public RenderTargetIdentifier(string name)
|
|
{
|
|
this.m_Type = BuiltinRenderTextureType.None;
|
|
this.m_NameID = Shader.PropertyToID(name);
|
|
this.m_InstanceID = 0;
|
|
}
|
|
|
|
// Token: 0x06003828 RID: 14376 RVA: 0x00060640 File Offset: 0x0005E840
|
|
public RenderTargetIdentifier(int nameID)
|
|
{
|
|
this.m_Type = BuiltinRenderTextureType.None;
|
|
this.m_NameID = nameID;
|
|
this.m_InstanceID = 0;
|
|
}
|
|
|
|
// Token: 0x06003829 RID: 14377 RVA: 0x00060658 File Offset: 0x0005E858
|
|
public RenderTargetIdentifier(Texture tex)
|
|
{
|
|
this.m_Type = ((!(tex == null) && !(tex is RenderTexture)) ? BuiltinRenderTextureType.BindableTexture : BuiltinRenderTextureType.None);
|
|
this.m_NameID = -1;
|
|
this.m_InstanceID = ((!tex) ? 0 : tex.GetInstanceID());
|
|
}
|
|
|
|
// Token: 0x0600382A RID: 14378 RVA: 0x000606B0 File Offset: 0x0005E8B0
|
|
public static implicit operator RenderTargetIdentifier(BuiltinRenderTextureType type)
|
|
{
|
|
return new RenderTargetIdentifier(type);
|
|
}
|
|
|
|
// Token: 0x0600382B RID: 14379 RVA: 0x000606CC File Offset: 0x0005E8CC
|
|
public static implicit operator RenderTargetIdentifier(string name)
|
|
{
|
|
return new RenderTargetIdentifier(name);
|
|
}
|
|
|
|
// Token: 0x0600382C RID: 14380 RVA: 0x000606E8 File Offset: 0x0005E8E8
|
|
public static implicit operator RenderTargetIdentifier(int nameID)
|
|
{
|
|
return new RenderTargetIdentifier(nameID);
|
|
}
|
|
|
|
// Token: 0x0600382D RID: 14381 RVA: 0x00060704 File Offset: 0x0005E904
|
|
public static implicit operator RenderTargetIdentifier(Texture tex)
|
|
{
|
|
return new RenderTargetIdentifier(tex);
|
|
}
|
|
|
|
// Token: 0x0600382E RID: 14382 RVA: 0x00060720 File Offset: 0x0005E920
|
|
public override string ToString()
|
|
{
|
|
return UnityString.Format("Type {0} NameID {1} InstanceID {2}", new object[] { this.m_Type, this.m_NameID, this.m_InstanceID });
|
|
}
|
|
|
|
// Token: 0x0600382F RID: 14383 RVA: 0x00060770 File Offset: 0x0005E970
|
|
public override int GetHashCode()
|
|
{
|
|
return (this.m_Type.GetHashCode() * 23 + this.m_NameID.GetHashCode()) * 23 + this.m_InstanceID.GetHashCode();
|
|
}
|
|
|
|
// Token: 0x06003830 RID: 14384 RVA: 0x000607C0 File Offset: 0x0005E9C0
|
|
public override bool Equals(object obj)
|
|
{
|
|
bool flag;
|
|
if (!(obj is RenderTargetIdentifier))
|
|
{
|
|
flag = false;
|
|
}
|
|
else
|
|
{
|
|
RenderTargetIdentifier renderTargetIdentifier = (RenderTargetIdentifier)obj;
|
|
flag = this.m_Type == renderTargetIdentifier.m_Type && this.m_NameID == renderTargetIdentifier.m_NameID && this.m_InstanceID == renderTargetIdentifier.m_InstanceID;
|
|
}
|
|
return flag;
|
|
}
|
|
|
|
// Token: 0x06003831 RID: 14385 RVA: 0x00060824 File Offset: 0x0005EA24
|
|
public bool Equals(RenderTargetIdentifier rhs)
|
|
{
|
|
return this.m_Type == rhs.m_Type && this.m_NameID == rhs.m_NameID && this.m_InstanceID == rhs.m_InstanceID;
|
|
}
|
|
|
|
// Token: 0x06003832 RID: 14386 RVA: 0x00060870 File Offset: 0x0005EA70
|
|
public static bool operator ==(RenderTargetIdentifier lhs, RenderTargetIdentifier rhs)
|
|
{
|
|
return lhs.m_Type == rhs.m_Type && lhs.m_NameID == rhs.m_NameID && lhs.m_InstanceID == rhs.m_InstanceID;
|
|
}
|
|
|
|
// Token: 0x06003833 RID: 14387 RVA: 0x000608C0 File Offset: 0x0005EAC0
|
|
public static bool operator !=(RenderTargetIdentifier lhs, RenderTargetIdentifier rhs)
|
|
{
|
|
return lhs.m_Type != rhs.m_Type || lhs.m_NameID != rhs.m_NameID || lhs.m_InstanceID != rhs.m_InstanceID;
|
|
}
|
|
|
|
// Token: 0x04000F4F RID: 3919
|
|
private BuiltinRenderTextureType m_Type;
|
|
|
|
// Token: 0x04000F50 RID: 3920
|
|
private int m_NameID;
|
|
|
|
// Token: 0x04000F51 RID: 3921
|
|
private int m_InstanceID;
|
|
}
|
|
}
|