# ScaledTextureWidth(RenderTexture)

> Provides the current, scaled width of a render texture.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine.XR](/engine/6000.5/script-reference/unityengine/xr.md)
* **Assembly:** UnityEngine.XRModule

```csharp
public int ScaledTextureWidth(RenderTexture renderTexture)
```

### Parameters

**** (\[RenderTexture]\(/engine/6000.5/script-reference/unityengine/rendertexture)): A scalable XR eye texture.

### Returns

| Type                                                       | Description                                                                                                                                                                                                                                                                                                                                                                            |
| ---------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [int](https://learn.microsoft.com/dotnet/api/system.int32) | The width after dynamic scaling. If the texture was not created with both the [DynamicallyScalable](/engine/6000.5/script-reference/unityengine/rendertexturecreationflags/dynamicallyscalable.md) and [EyeTexture](/engine/6000.5/script-reference/unityengine/rendertexturecreationflags/eyetexture.md) flags, or dynamic resolution is not enabled, the original width is returned. |

### Remarks

Render textures created with both the [DynamicallyScalable](/engine/6000.5/script-reference/unityengine/rendertexturecreationflags/dynamicallyscalable.md) and [EyeTexture](/engine/6000.5/script-reference/unityengine/rendertexturecreationflags/eyetexture.md) flags are subject to scaling when dynamic resolution is active. This function returns the effective, scaled width for the current frame.

If you pass in a texture that is not affected by dynamic resolution, this method returns the original width.

The scaled width can be useful when you need to know the exact size of an eye texture when XR dynamic resolution is enabled. For example, you might need the size for post-processing effects in custom shaders that use screen-space texture coordinates, to program custom XR render passes, or to create custom render pipelines.
