Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


Custom Render Texture Inspector window reference

Explore the settings for a Custom Render Texture.
Read time 4 minutesLast updated 4 days ago

The Custom Render Textures Inspector window displays many of the same properties as the Render Texture Inspector, and some properties specific to Custom Render Textures.

Render Texture:

Property:

Function:

DimensionDimension of the Render Texture.
     2DMakes the Render Texture two-dimensional.
     CubeMakes the Render Texture a cube map.
     3DMakes the Render Texture three-dimensional.
SizeThe size of the Render Texture in pixels.
Color FormatThe format of the Render Texture.
sRGB (Color Render Texture)Enable to allow the Render Texture to use sRGB read/write conversions (Read Only).
MipmapEnable this property to allow the Render Texture to use a mipmap.
Auto-generateEnable this property to automatically generate the mipmap to use.
Wrap ModeDefines how the Texture behaves when tiled.
     RepeatThe Texture repeats itself as a tile.
     ClampUnity stretches the edges of the Texture.
Filter ModeDefines how Unity filters the Texture when it is stretched by 3D transformations.
     PointThe Texture becomes blocky up close.
     BilinearThe Texture becomes blurry up close.
     TrilinearLike Bilinear, but the Texture also blurs between different mipmap levels.
Aniso LevelIncreases Texture quality when viewing the texture at a steep angle. Good for floor and ground textures.

Custom Texture:

These properties are exclusive to Custom Render Textures. Custom Texture parameters are separated into three categories:
  • Material: Defines what shader is used to update the texture.
  • Initialization: Controls how the texture is initialized before the shader performs any updates.
  • Update: Controls how the shader updates the texture.

Property:

Function:

MaterialThe Material that Unity uses to update the Custom Render Texture.
     Shader PassThe Shader Pass that Unity uses to update the Custom Render Texture. The drop-down shows all passes available in your Material.
Initialization ModeThe rate at which Unity initializes the texture.
     OnLoadUnity initializes the texture once upon creation.
     RealtimeUnity initializes the texture every frame.
     OnDemandUnity initializes the texture on demand from the script.
SourceHow Unity texture initializes the texture.
     Texture and ColorUnity uses a texture multiplied by a color to initialize the texture.
         Initialization ColorDefines the color that Unity uses to initialize the Custom Render Texture. If you also provide an Initialization Texture, Unity uses the multiplication of the color and the texture to initialize the Custom Render Texture.
         Initialization TextureDefines the texture that Unity uses to initialize the Custom Render Texture. If you also provide an Initialization Color, Unity uses the multiplication of the color and the texture to initialize the Custom Render Texture.
     MaterialUnity uses a Material to initialize the texture.
         Initialization MaterialDefines the Material that Unity uses to initialize the Custom Render Texture.
Update ModeThe rate at which the shader updates the Custom Render Texture.
     OnLoadThe shader updates the texture once upon creation.
     RealtimeThe shader updates the texture every frame.
     OnDemandThe shader updates the texture on demand from script.
PeriodThe amount of time in seconds over which Unity updates a real-time texture. A value of 0.0 updates every frame. This property is only available when the Update Mode to property is set to Realtime.
Double BufferedDouble-buffers the texture. Each update swaps the two buffers. This allows you to read the result of the preceding update in the shader.
Wrap Update ZonesEnable to allow partial update zones to wrap around the border of the texture.
Cubemap Faces(Cubemap only) Series of toggle allowing user to enable/disable update on each of the cube map faces.
Update Zone SpaceThe coordinate system where Unity defines the update zones.
     NormalizedAll coordinates and sizes are between 0 and 1 with the top-left corner starting at (0, 0).
     PixelAll coordinates and sizes are expressed in pixels limited by the width and height of the texture. Top-left corner starting at (0, 0).
Update Zone ListList of update zones for the texture. For more information, see Update Zones.

Exporting Custom Render Texture to a file

You can export Custom Render Textures to a PNG or EXR file (depending on the texture format) in the Export menu.

Update Zones

Property:

Function:

CenterThe coordinates of the center of the update zone..
SizeThe size of the update zone.
RotationThe orientation of the update zone in degrees (unavailable for 3D textures).
Shader PassDefines the Shader Pass to use for this update zone. If you set this property as default, this update zone uses the Shader Pass that you defined in the main part of the inspector. Otherwise it will use the Shader Pass you provide.
Swap (Double Buffer)(Only for Double Buffered textures) When you enable this property, Unity swaps the buffers before processing this update zone.