CustomRenderTexture

Struct CustomRenderTexture 

Source
pub struct CustomRenderTexture {
Show 36 fields pub m_AntiAliasing: i32, pub m_ColorFormat: i32, pub m_CubemapFaceMask: u32, pub m_CurrentUpdateZoneSpace: i32, pub m_Dimension: i32, pub m_DoubleBuffered: bool, pub m_GenerateMips: bool, pub m_Height: i32, pub m_InitColor: ColorRGBA, pub m_InitMaterial: PPtr, pub m_InitTexture: PPtr, pub m_InitializationMode: i32, pub m_Material: PPtr, pub m_MipMap: bool, pub m_Name: String, pub m_SRGB: bool, pub m_ShaderPass: u32, pub m_TextureSettings: GLTextureSettings, pub m_UpdateMode: i32, pub m_UpdatePeriod: f32, pub m_UpdateZoneSpace: i32, pub m_UpdateZones: Vec<UpdateZoneInfo>, pub m_VolumeDepth: i32, pub m_Width: i32, pub m_WrapUpdateZones: bool, pub m_BindMS: Option<bool>, pub m_DepthFormat: Option<i32>, pub m_DepthStencilFormat: Option<i32>, pub m_DownscaleFallback: Option<bool>, pub m_EnableCompatibleFormat: Option<bool>, pub m_ForcedFallbackFormat: Option<i32>, pub m_InitSource: Option<i32>, pub m_IsAlphaChannelOptional: Option<bool>, pub m_MipCount: Option<i32>, pub m_ShadowSamplingMode: Option<i32>, pub m_UseDynamicScale: Option<bool>,
}
Expand description

CustomRenderTexture is a class of the Unity engine since version 5.6.0b1. Exert from Unity’s scripting documentation: 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.

Fields§

§m_AntiAliasing: i32

The antialiasing level for the RenderTexture.

§m_ColorFormat: i32§m_CubemapFaceMask: u32

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.

§m_CurrentUpdateZoneSpace: i32§m_Dimension: i32

Dimensionality (type) of the Texture (Read Only).

§m_DoubleBuffered: bool

When this parameter is set to true, Unity double-buffers the Custom Render Texture so that you can access it during its own update.

§m_GenerateMips: bool§m_Height: i32

Height of the Texture in pixels (Read Only).

§m_InitColor: ColorRGBA§m_InitMaterial: PPtr

PPtr<Material>: (5.6.0b1 - 2022.3.2f1)

§m_InitTexture: PPtr

PPtr<Texture>: (5.6.0b1 - 2022.3.2f1)

§m_InitializationMode: i32

Determine how Unity initializes a texture.

§m_Material: PPtr

The Material that Unity uses to initialize the content of a Custom Render Texture. PPtr<Material>: (5.6.0b1 - 2022.3.2f1)

§m_MipMap: bool§m_Name: String

The name of the object.

§m_SRGB: bool

Does this render texture use sRGB read/write conversions? (Read Only).

§m_ShaderPass: u32

The Shader Pass Unity uses to update the Custom Render Texture.

§m_TextureSettings: GLTextureSettings§m_UpdateMode: i32

Determine how Unity updates the Custom Render Texture.

§m_UpdatePeriod: f32

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.

§m_UpdateZoneSpace: i32

The space in which Unity expresses update zones. You can set this to Normalized or Pixel space.

§m_UpdateZones: Vec<UpdateZoneInfo>§m_VolumeDepth: i32

Volume extent of a 3D render texture or number of slices of array texture.

§m_Width: i32

Width of the Texture in pixels (Read Only).

§m_WrapUpdateZones: bool

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.

§m_BindMS: Option<bool>

bool: (2017.3.0b1 - 2022.3.2f1)

§m_DepthFormat: Option<i32>

i32: (5.6.0b1 - 2021.2.0a17)

§m_DepthStencilFormat: Option<i32>

The format of the depth/stencil buffer. i32: (2021.2.0b1 - 2022.3.2f1)

§m_DownscaleFallback: Option<bool>

bool: (2017.3.0b1 - 2022.3.2f1)

§m_EnableCompatibleFormat: Option<bool>

bool: (2019.1.0b1 - 2022.3.2f1)

§m_ForcedFallbackFormat: Option<i32>

i32: (2017.3.0b1 - 2022.3.2f1)

§m_InitSource: Option<i32>

i32: (5.6.0f1 - 2022.3.2f1)

§m_IsAlphaChannelOptional: Option<bool>

bool: (2020.2.0b1 - 2022.3.2f1)

§m_MipCount: Option<i32>

i32: (2019.2.0b1 - 2022.3.2f1)

§m_ShadowSamplingMode: Option<i32>

i32: (2021.2.0f1 - 2022.3.2f1)

§m_UseDynamicScale: Option<bool>

Is the render texture marked to be scaled by the Dynamic Resolution system. bool: (2017.3.0b1 - 2022.3.2f1)

Trait Implementations§

Source§

impl Debug for CustomRenderTexture

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for CustomRenderTexture

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for CustomRenderTexture

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,