Custom Render Textures are an extension to Render Textures that allow you to render directly to the Texture using a Shader.
Custom Render Textures are an extension to Render Textures that allow you to update a texture with a Shader, and then use it in a regular Material. This is useful for implementing all kinds of complex simulations, for instance: water caustics, ripple simulations for rain effects, or splatting liquids against a wall. Also provided is a scripting and Shader framework to help with more complicated configurations like partial or multi-pass updates, and varying update frequency.
cubemapFaceMask | The bit field that you can use to enable or disable update on each of the cubemap faces. The bit order from least to most significant bit is as follows: +X, -X, +Y, -Y, +Z, -Z. |
doubleBuffered | When this parameter is set to true, Unity double-buffers the Custom Render Texture so that you can access it during its own update. |
initializationColor | The color that Unity uses to initialize a Custom Render Texture. Unity ignores this parameter if an initializationMaterial is set. |
initializationMaterial | The Material that Unity uses to initialize a Custom Render Texture. Initialization texture and color are ignored if you have set this parameter. |
initializationMode | Determine how Unity initializes a texture. |
initializationSource | Determine if Unity initializes the Custom Render Texture with a Texture and a Color or a Material. |
initializationTexture | The Texture that Unity uses to initialize a Custom Render Texture, multiplied by the initialization color. Unity ignores this parameter if an initializationMaterial is set. |
material | The Material that Unity uses to initialize the content of a Custom Render Texture. |
shaderPass | The Shader Pass Unity uses to update the Custom Render Texture. |
updateMode | Determine how Unity updates the Custom Render Texture. |
updatePeriod | The period in seconds that Unity updates real-time Custom Render Textures. A value of 0.0 means Unity updates real-time Custom Render Textures every frame. |
updateZoneSpace | The space in which Unity expresses update zones. You can set this to Normalized or Pixel space. |
wrapUpdateZones | When this parameter is set to true, Unity wraps Update zones around the border of the Custom Render Texture. Otherwise, Unity clamps Update zones at the border of the Custom Render Texture. |
CustomRenderTexture | 创建一个新的自定义渲染纹理。 |
ClearUpdateZones | 清除所有更新区域。 |
EnsureDoubleBufferConsistency | Updates the internal Render Texture that a Custom Render Texture uses for double buffering, so that it matches the size and format of the Custom Render Texture. |
GetDoubleBufferRenderTexture | Gets the Render Texture that this Custom Render Texture uses for double buffering. |
GetUpdateZones | 返回更新区域列表。 |
Initialize | Initializes the Custom Render Texture at the start of the next frame. Unity calls /Initialise()/ before /CustomRenderTexture.Update/. |
SetUpdateZones | 为自定义渲染纹理设置更新区域列表。 |
Update | Triggers an update of the Custom Render Texture. |