CustomRenderTexture

class in UnityEngine

Cambiar al Manual

Descripción

Custom Render Textures are an extension to Render Textures, enabling you to render directly to the Texture using a Shader.

Custom Render Textures are an extension to Render Textures allowing you easily to update the 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.

Variables

cubemapFaceMaskBitfield that allows to enable or disable update on each of the cubemap faces. Order from least significant bit is +X, -X, +Y, -Y, +Z, -Z.
doubleBufferedIf true, the Custom Render Texture is double buffered so that you can access it during its own update. otherwise the Custom Render Texture will be not be double buffered.
initializationColorColor with which the Custom Render Texture is initialized. This parameter will be ignored if an initializationMaterial is set.
initializationMaterialMaterial with which the Custom Render Texture is initialized. Initialization texture and color are ignored if this parameter is set.
initializationModeSpecify how the texture should be initialized.
initializationSourceSpecify if the texture should be initialized with a Texture and a Color or a Material.
initializationTextureTexture with which the Custom Render Texture is initialized (multiplied by the initialization color). This parameter will be ignored if an initializationMaterial is set.
materialMaterial with which the content of the Custom Render Texture is updated.
shaderPassShader Pass used to update the Custom Render Texture.
updateModeSpecify how the texture should be updated.
updatePeriodPeriod in seconds at which real-time textures are updated (0.0 will update every frame).
updateZoneSpaceSpace in which the update zones are expressed (Normalized or Pixel space).
wrapUpdateZonesIf true, Update zones will wrap around the border of the Custom Render Texture. Otherwise, Update zones will be clamped at the border of the Custom Render Texture.

Constructores

CustomRenderTextureCreate a new Custom Render Texture.

Funciones Públicas

ClearUpdateZonesClear all Update Zones.
EnsureDoubleBufferConsistencyUpdates the internal RenderTexture that a CustomRenderTexture uses for double buffering, so that it matches the size and format of the CustomRenderRexture.
GetDoubleBufferRenderTextureGets the RenderTexture that this CustomRenderTexture uses for double buffering.
GetUpdateZonesReturns the list of Update Zones.
InitializeTriggers an initialization of the Custom Render Texture.
SetUpdateZonesSetup the list of Update Zones for the Custom Render Texture.
UpdateTriggers the update of the Custom Render Texture.