# reprojectTexture

Function · category: Graphics

Source: https://github.com/playcanvas/engine/blob/f059dc005842f76e052cdf44d8370c8c7ec475ac/src/scene/graphics/reproject-texture.js#L391

```ts
reprojectTexture(source: Texture, target: Texture, options?: object): boolean
```

This function reprojects textures between cubemap, equirectangular and octahedral formats. The
function can read and write textures with pixel data in RGBE, RGBM, linear and sRGB formats.
When specularPower is specified it will perform a phong-weighted convolution of the source (for
generating a gloss maps).

**Parameters**

- `source` ([`Texture`](https://api.playcanvas.com/engine/classes/Texture.md)): The source texture.
- `target` ([`Texture`](https://api.playcanvas.com/engine/classes/Texture.md)): The target texture.
- `options` (`object`, optional, default `{}`): The options object.
    - `options.distribution` (`string`, optional): Specify convolution distribution - 'none', 'lambert',
      'phong', 'ggx'. Default depends on specularPower.
    - `options.face` (`number`, optional): Optional cubemap face to update (default is update all faces).
    - `options.numSamples` (`number`, optional): Optional number of samples (default is 1024).
    - `options.rect` ([`Vec4`](https://api.playcanvas.com/engine/classes/Vec4.md), optional): Optional viewport rectangle.
    - `options.seamPixels` (`number`, optional): Optional number of seam pixels to render
    - `options.specularPower` (`number`, optional): Optional specular power. When specular power is
      specified, the source is convolved by a phong-weighted kernel raised to the specified power.
      Otherwise the function performs a standard resample.

**Returns** `boolean`: True if the reprojection was applied and false otherwise (e.g. if rect is empty)
