GetPixelBilinear(float, float, float, int)
Gets the filtered pixel color at the normalized coordinates ( u, v, w ).
Read time 1 minuteLast updated 6 days ago
Definition
- Type: Method
- Namespace: UnityEngine
- Assembly: UnityEngine.CoreModule
public Color GetPixelBilinear(float u, float v, float w, int mipLevel)
Parameters
The u coordinate of the pixel to get.
The v coordinate of the pixel to get.
The w coordinate of the pixel to get.
The mipmap level to read from. The range is through the texture's Texture.mipmapCount. The default value is .
00Returns
Type | Description |
|---|---|
| Color | The pixel color. |
Remarks
This method gets pixel data from the texture in CPU memory. Texture.isReadable must be .
trueUnity uses bilinear filtering to return the pixel color.
The lower left corner is (0, 0, 0). If the pixel coordinate is outside the texture's dimensions, Unity clamps or repeats it, depending on the texture's TextureWrapMode.
You can't use with textures that use Crunch texture compression. Use Texture3D.GetPixels32 instead.
GetPixelBilinearAdditional Resources: Texture3D.GetPixel.