Texture2D.GetPixelBilinear Manual     Reference     Scripting  
Scripting > Runtime Classes > Texture2D

function GetPixelBilinear (u : float, v : float) : Color


Returns filtered pixel color at normalized coordinates (u, v).

Coordinates u and v go from 0.0 to 1.0, just like UV coordinates in meshes. If coordinates are out of bounds (larger than 1.0 or smaller than 0.0), they will be clamped or repeated based on the texture's wrap mode.

Returned pixel color is bilinearly filtered.

The texture must have the Is Readable flag set in the import settings, otherwise this function will fail.

See Also: GetPixel.