Method ReAllocateIfNeeded
ReAllocateIfNeeded(ref RTHandle, in RenderTextureDescriptor, FilterMode, TextureWrapMode, bool, int, float, string)
Re-allocate fixed-size RTHandle if it is not allocated or doesn't match the descriptor
Declaration
public static bool ReAllocateIfNeeded(ref RTHandle handle, in RenderTextureDescriptor descriptor, FilterMode filterMode = FilterMode.Point, TextureWrapMode wrapMode = TextureWrapMode.Repeat, bool isShadowMap = false, int anisoLevel = 1, float mipMapBias = 0, string name = "")
Parameters
Type | Name | Description |
---|---|---|
RTHandle | handle | RTHandle to check (can be null) |
Render |
descriptor | Descriptor for the RTHandle to match |
Filter |
filterMode | Filtering mode of the RTHandle. |
Texture |
wrapMode | Addressing mode of the RTHandle. |
bool | isShadowMap | Set to true if the depth buffer should be used as a shadow map. |
int | anisoLevel | Anisotropic filtering level. |
float | mipMapBias | Bias applied to mipmaps during filtering. |
string | name | Name of the RTHandle. |
Returns
Type | Description |
---|---|
bool |
ReAllocateIfNeeded(ref RTHandle, Vector2, in RenderTextureDescriptor, FilterMode, TextureWrapMode, bool, int, float, string)
Re-allocate dynamically resized RTHandle if it is not allocated or doesn't match the descriptor
Declaration
public static bool ReAllocateIfNeeded(ref RTHandle handle, Vector2 scaleFactor, in RenderTextureDescriptor descriptor, FilterMode filterMode = FilterMode.Point, TextureWrapMode wrapMode = TextureWrapMode.Repeat, bool isShadowMap = false, int anisoLevel = 1, float mipMapBias = 0, string name = "")
Parameters
Type | Name | Description |
---|---|---|
RTHandle | handle | RTHandle to check (can be null) |
Vector2 | scaleFactor | Constant scale for the RTHandle size computation. |
Render |
descriptor | Descriptor for the RTHandle to match |
Filter |
filterMode | Filtering mode of the RTHandle. |
Texture |
wrapMode | Addressing mode of the RTHandle. |
bool | isShadowMap | Set to true if the depth buffer should be used as a shadow map. |
int | anisoLevel | Anisotropic filtering level. |
float | mipMapBias | Bias applied to mipmaps during filtering. |
string | name | Name of the RTHandle. |
Returns
Type | Description |
---|---|
bool | If the RTHandle should be re-allocated |
ReAllocateIfNeeded(ref RTHandle, ScaleFunc, in RenderTextureDescriptor, FilterMode, TextureWrapMode, bool, int, float, string)
Re-allocate dynamically resized RTHandle if it is not allocated or doesn't match the descriptor
Declaration
public static bool ReAllocateIfNeeded(ref RTHandle handle, ScaleFunc scaleFunc, in RenderTextureDescriptor descriptor, FilterMode filterMode = FilterMode.Point, TextureWrapMode wrapMode = TextureWrapMode.Repeat, bool isShadowMap = false, int anisoLevel = 1, float mipMapBias = 0, string name = "")
Parameters
Type | Name | Description |
---|---|---|
RTHandle | handle | RTHandle to check (can be null) |
Scale |
scaleFunc | Function used for the RTHandle size computation. |
Render |
descriptor | Descriptor for the RTHandle to match |
Filter |
filterMode | Filtering mode of the RTHandle. |
Texture |
wrapMode | Addressing mode of the RTHandle. |
bool | isShadowMap | Set to true if the depth buffer should be used as a shadow map. |
int | anisoLevel | Anisotropic filtering level. |
float | mipMapBias | Bias applied to mipmaps during filtering. |
string | name | Name of the RTHandle. |
Returns
Type | Description |
---|---|
bool | If an allocation was done |