TextureExtensions.GetPixelCoordinates
Extension Method in TextureExtensions
Declaration
public static void GetPixelCoordinates(this Texture2D texture, float u, float v, out int px, out int py)Description
Maps the UV coordinates in the range [0..1] to pixel coordinates in the range [0..width-1] and [0..height-1].
Parameters
| texture | The texture to get the pixel coordinates from. |
| u | The UV coordinate in the x-axis. |
| v | The UV coordinate in the y-axis. |
| px | The output pixel coordinate in the x-axis. |
| py | The output pixel coordinate in the y-axis. |