Target.md 619 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
# GL.Target

`GL.Target` allows to render a shader with any content (any React Native component rasterized as a uniform texture).

> **N.B.** This feature is advanced and experimental. It current does not yet support subviews content refreshing (like Image load event,...).

**Example:**

```js
render () {
  return <GL.View shader={shaders.myEffect3}
    width={200} height={100}>

    <GL.Target uniform="textureName">
    ...any React Native components
    </GL.Target>

  </GL.View>;
}
```

## Props

- **`uniform`** *string* **(required)**: The name of the shader texture uniform to use for rendering the content.