Show / Hide Table of Contents

Class RenderTexture

Inheritance
Object
Object
Texture
RenderTexture
CustomRenderTexture
Inherited Members
Texture.masterTextureLimit
Texture.anisotropicFiltering
Texture.SetGlobalAnisotropicFilteringLimits(Int32, Int32)
Texture.isReadable
Texture.wrapMode
Texture.wrapModeU
Texture.wrapModeV
Texture.wrapModeW
Texture.filterMode
Texture.anisoLevel
Texture.mipMapBias
Texture.texelSize
Texture.GetNativeTexturePtr()
Texture.GetNativeTextureID()
Texture.updateCount
Texture.IncrementUpdateCount()
Texture.imageContentsHash
Texture.totalTextureMemory
Texture.desiredTextureMemory
Texture.targetTextureMemory
Texture.currentTextureMemory
Texture.nonStreamingTextureMemory
Texture.streamingMipmapUploadCount
Texture.streamingRendererCount
Texture.streamingTextureCount
Texture.nonStreamingTextureCount
Texture.streamingTexturePendingLoadCount
Texture.streamingTextureLoadingCount
Texture.SetStreamingTextureMaterialDebugProperties()
Texture.streamingTextureForceLoadAll
Texture.streamingTextureDiscardUnusedMips
Object.GetInstanceID()
Object.GetHashCode()
Object.Equals(Object)
Object.name
Object.Instantiate(Object, Vector3, Quaternion)
Object.Instantiate(Object, Vector3, Quaternion, Transform)
Object.Instantiate(Object)
Object.Instantiate(Object, Transform)
Object.Instantiate(Object, Transform, Boolean)
Object.Instantiate<T>(T)
Object.Instantiate<T>(T, Vector3, Quaternion)
Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
Object.Instantiate<T>(T, Transform)
Object.Instantiate<T>(T, Transform, Boolean)
Object.Destroy(Object, Single)
Object.Destroy(Object)
Object.DestroyImmediate(Object, Boolean)
Object.DestroyImmediate(Object)
Object.FindObjectsOfType(Type)
Object.DontDestroyOnLoad(Object)
Object.hideFlags
Object.DestroyObject(Object, Single)
Object.DestroyObject(Object)
Object.FindSceneObjectsOfType(Type)
Object.FindObjectsOfTypeIncludingAssets(Type)
Object.FindObjectsOfType<T>()
Object.FindObjectOfType<T>()
Object.FindObjectsOfTypeAll(Type)
Object.FindObjectOfType(Type)
Object.ToString()
Object.Equals(Object, Object)
Object.ReferenceEquals(Object, Object)
Object.GetType()
Object.MemberwiseClone()
Namespace: UnityEngine
Assembly: UnityEngine.dll
Syntax
public class RenderTexture : Texture

Constructors

| Improve this Doc View Source

RenderTexture()

Declaration
protected RenderTexture()
| Improve this Doc View Source

RenderTexture(Int32, Int32, Int32)

Declaration
[ExcludeFromDocs]
public RenderTexture(int width, int height, int depth)
Parameters
Type Name Description
Int32 width
Int32 height
Int32 depth
| Improve this Doc View Source

RenderTexture(Int32, Int32, Int32, GraphicsFormat)

Declaration
public RenderTexture(int width, int height, int depth, GraphicsFormat format)
Parameters
Type Name Description
Int32 width
Int32 height
Int32 depth
GraphicsFormat format
| Improve this Doc View Source

RenderTexture(Int32, Int32, Int32, RenderTextureFormat)

Declaration
[ExcludeFromDocs]
public RenderTexture(int width, int height, int depth, RenderTextureFormat format)
Parameters
Type Name Description
Int32 width
Int32 height
Int32 depth
RenderTextureFormat format
| Improve this Doc View Source

RenderTexture(Int32, Int32, Int32, RenderTextureFormat, RenderTextureReadWrite)

Declaration
public RenderTexture(int width, int height, int depth, [DefaultValue("RenderTextureFormat.Default")] RenderTextureFormat format, [DefaultValue("RenderTextureReadWrite.Default")] RenderTextureReadWrite readWrite)
Parameters
Type Name Description
Int32 width
Int32 height
Int32 depth
RenderTextureFormat format
RenderTextureReadWrite readWrite
| Improve this Doc View Source

RenderTexture(RenderTexture)

Declaration
public RenderTexture(RenderTexture textureToCopy)
Parameters
Type Name Description
RenderTexture textureToCopy
| Improve this Doc View Source

RenderTexture(RenderTextureDescriptor)

Declaration
public RenderTexture(RenderTextureDescriptor desc)
Parameters
Type Name Description
RenderTextureDescriptor desc

Properties

| Improve this Doc View Source

active

Declaration
public static RenderTexture active { get; set; }
Property Value
Type Description
RenderTexture

antiAliasing

Declaration
public int antiAliasing { get; set; }
Property Value
Type Description
Int32

autoGenerateMips

Declaration
public bool autoGenerateMips { get; set; }
Property Value
Type Description
Boolean

bindTextureMS

Declaration
public bool bindTextureMS { get; set; }
Property Value
Type Description
Boolean
| Improve this Doc View Source

colorBuffer

Declaration
public RenderBuffer colorBuffer { get; }
Property Value
Type Description
RenderBuffer

depth

Declaration
public int depth { get; set; }
Property Value
Type Description
Int32
| Improve this Doc View Source

depthBuffer

Declaration
public RenderBuffer depthBuffer { get; }
Property Value
Type Description
RenderBuffer
| Improve this Doc View Source

descriptor

Declaration
public RenderTextureDescriptor descriptor { get; set; }
Property Value
Type Description
RenderTextureDescriptor

dimension

Declaration
public override TextureDimension dimension { get; set; }
Property Value
Type Description
TextureDimension
Overrides
Texture.dimension

enableRandomWrite

Declaration
public bool enableRandomWrite { get; set; }
Property Value
Type Description
Boolean

format

Declaration
public RenderTextureFormat format { get; set; }
Property Value
Type Description
RenderTextureFormat

height

Declaration
public override int height { get; set; }
Property Value
Type Description
Int32
Overrides
Texture.height
| Improve this Doc View Source

isCubemap

Declaration
[Obsolete("Use RenderTexture.dimension instead.", false)]
public bool isCubemap { get; set; }
Property Value
Type Description
Boolean
| Improve this Doc View Source

isPowerOfTwo

Declaration
public bool isPowerOfTwo { get; set; }
Property Value
Type Description
Boolean
| Improve this Doc View Source

isVolume

Declaration
[Obsolete("Use RenderTexture.dimension instead.", false)]
public bool isVolume { get; set; }
Property Value
Type Description
Boolean

memorylessMode

Declaration
public RenderTextureMemoryless memorylessMode { get; set; }
Property Value
Type Description
RenderTextureMemoryless

sRGB

Declaration
public bool sRGB { get; }
Property Value
Type Description
Boolean

useDynamicScale

Declaration
public bool useDynamicScale { get; set; }
Property Value
Type Description
Boolean

useMipMap

Declaration
public bool useMipMap { get; set; }
Property Value
Type Description
Boolean

volumeDepth

Declaration
public int volumeDepth { get; set; }
Property Value
Type Description
Int32

vrUsage

Declaration
public VRTextureUsage vrUsage { get; set; }
Property Value
Type Description
VRTextureUsage

width

Declaration
public override int width { get; set; }
Property Value
Type Description
Int32
Overrides
Texture.width

Methods

ConvertToEquirect(RenderTexture, Camera.MonoOrStereoscopicEye)

Declaration
public void ConvertToEquirect(RenderTexture equirect, Camera.MonoOrStereoscopicEye eye = Camera.MonoOrStereoscopicEye.Mono)
Parameters
Type Name Description
RenderTexture equirect
Camera.MonoOrStereoscopicEye eye

Create()

Declaration
public bool Create()
Returns
Type Description
Boolean
| Improve this Doc View Source

DiscardContents()

Declaration
public void DiscardContents()

DiscardContents(Boolean, Boolean)

Declaration
public void DiscardContents(bool discardColor, bool discardDepth)
Parameters
Type Name Description
Boolean discardColor
Boolean discardDepth

GenerateMips()

Declaration
public void GenerateMips()

GetNativeDepthBufferPtr()

Declaration
public IntPtr GetNativeDepthBufferPtr()
Returns
Type Description
IntPtr
| Improve this Doc View Source

GetTemporary(Int32, Int32)

Declaration
[ExcludeFromDocs]
public static RenderTexture GetTemporary(int width, int height)
Parameters
Type Name Description
Int32 width
Int32 height
Returns
Type Description
RenderTexture
| Improve this Doc View Source

GetTemporary(Int32, Int32, Int32)

Declaration
[ExcludeFromDocs]
public static RenderTexture GetTemporary(int width, int height, int depthBuffer)
Parameters
Type Name Description
Int32 width
Int32 height
Int32 depthBuffer
Returns
Type Description
RenderTexture
| Improve this Doc View Source

GetTemporary(Int32, Int32, Int32, RenderTextureFormat)

Declaration
[ExcludeFromDocs]
public static RenderTexture GetTemporary(int width, int height, int depthBuffer, RenderTextureFormat format)
Parameters
Type Name Description
Int32 width
Int32 height
Int32 depthBuffer
RenderTextureFormat format
Returns
Type Description
RenderTexture
| Improve this Doc View Source

GetTemporary(Int32, Int32, Int32, RenderTextureFormat, RenderTextureReadWrite)

Declaration
[ExcludeFromDocs]
public static RenderTexture GetTemporary(int width, int height, int depthBuffer, RenderTextureFormat format, RenderTextureReadWrite readWrite)
Parameters
Type Name Description
Int32 width
Int32 height
Int32 depthBuffer
RenderTextureFormat format
RenderTextureReadWrite readWrite
Returns
Type Description
RenderTexture
| Improve this Doc View Source

GetTemporary(Int32, Int32, Int32, RenderTextureFormat, RenderTextureReadWrite, Int32)

Declaration
[ExcludeFromDocs]
public static RenderTexture GetTemporary(int width, int height, int depthBuffer, RenderTextureFormat format, RenderTextureReadWrite readWrite, int antiAliasing)
Parameters
Type Name Description
Int32 width
Int32 height
Int32 depthBuffer
RenderTextureFormat format
RenderTextureReadWrite readWrite
Int32 antiAliasing
Returns
Type Description
RenderTexture
| Improve this Doc View Source

GetTemporary(Int32, Int32, Int32, RenderTextureFormat, RenderTextureReadWrite, Int32, RenderTextureMemoryless)

Declaration
[ExcludeFromDocs]
public static RenderTexture GetTemporary(int width, int height, int depthBuffer, RenderTextureFormat format, RenderTextureReadWrite readWrite, int antiAliasing, RenderTextureMemoryless memorylessMode)
Parameters
Type Name Description
Int32 width
Int32 height
Int32 depthBuffer
RenderTextureFormat format
RenderTextureReadWrite readWrite
Int32 antiAliasing
RenderTextureMemoryless memorylessMode
Returns
Type Description
RenderTexture
| Improve this Doc View Source

GetTemporary(Int32, Int32, Int32, RenderTextureFormat, RenderTextureReadWrite, Int32, RenderTextureMemoryless, VRTextureUsage)

Declaration
[ExcludeFromDocs]
public static RenderTexture GetTemporary(int width, int height, int depthBuffer, RenderTextureFormat format, RenderTextureReadWrite readWrite, int antiAliasing, RenderTextureMemoryless memorylessMode, VRTextureUsage vrUsage)
Parameters
Type Name Description
Int32 width
Int32 height
Int32 depthBuffer
RenderTextureFormat format
RenderTextureReadWrite readWrite
Int32 antiAliasing
RenderTextureMemoryless memorylessMode
VRTextureUsage vrUsage
Returns
Type Description
RenderTexture
| Improve this Doc View Source

GetTemporary(Int32, Int32, Int32, RenderTextureFormat, RenderTextureReadWrite, Int32, RenderTextureMemoryless, VRTextureUsage, Boolean)

Declaration
public static RenderTexture GetTemporary(int width, int height, [DefaultValue("0")] int depthBuffer, [DefaultValue("RenderTextureFormat.Default")] RenderTextureFormat format, [DefaultValue("RenderTextureReadWrite.Default")] RenderTextureReadWrite readWrite, [DefaultValue("1")] int antiAliasing, [DefaultValue("RenderTextureMemoryless.None")] RenderTextureMemoryless memorylessMode, [DefaultValue("VRTextureUsage.None")] VRTextureUsage vrUsage, [DefaultValue("false")] bool useDynamicScale)
Parameters
Type Name Description
Int32 width
Int32 height
Int32 depthBuffer
RenderTextureFormat format
RenderTextureReadWrite readWrite
Int32 antiAliasing
RenderTextureMemoryless memorylessMode
VRTextureUsage vrUsage
Boolean useDynamicScale
Returns
Type Description
RenderTexture
| Improve this Doc View Source

GetTemporary(RenderTextureDescriptor)

Declaration
public static RenderTexture GetTemporary(RenderTextureDescriptor desc)
Parameters
Type Name Description
RenderTextureDescriptor desc
Returns
Type Description
RenderTexture

IsCreated()

Declaration
public bool IsCreated()
Returns
Type Description
Boolean

MarkRestoreExpected()

Declaration
public void MarkRestoreExpected()

Release()

Declaration
public void Release()

ReleaseTemporary(RenderTexture)

Declaration
public static void ReleaseTemporary(RenderTexture temp)
Parameters
Type Name Description
RenderTexture temp
| Improve this Doc View Source

ResolveAntiAliasedSurface()

Declaration
public void ResolveAntiAliasedSurface()
| Improve this Doc View Source

ResolveAntiAliasedSurface(RenderTexture)

Declaration
public void ResolveAntiAliasedSurface(RenderTexture target)
Parameters
Type Name Description
RenderTexture target

SetGlobalShaderProperty(String)

Declaration
public void SetGlobalShaderProperty(string propertyName)
Parameters
Type Name Description
String propertyName

SupportsStencil(RenderTexture)

Declaration
public static bool SupportsStencil(RenderTexture rt)
Parameters
Type Name Description
RenderTexture rt
Returns
Type Description
Boolean

Extension Methods

MustExtensions.MustBeEqual<T>(T, T)
MustExtensions.MustBeEqual<T>(T, T, String)
MustExtensions.MustNotBeEqual<T>(T, T)
MustExtensions.MustNotBeEqual<T>(T, T, String)
MustExtensions.MustBeNull<T>(T)
MustExtensions.MustBeNull<T>(T, String)
MustExtensions.MustNotBeNull<T>(T)
MustExtensions.MustNotBeNull<T>(T, String)
  • Improve this Doc
  • View Source
Back to top Generated by DocFX