I2Djs-v3
  • Introduction to I2Djs
  • Getting Started
    • Installation
    • Quick Start
    • Resources
  • Guide
    • Canvas: Create-animate
    • SVG: Create-animate
    • WebGL: Create-animate
    • Data Join-Action
    • Animation-Chaining
    • Canvas: Textures & Sprite animation
    • Canvas: Heatmap
    • WebGL: Heatmap
    • WebGL: Custom Shaders
    • Canvas: GeoWorld Map with D3 modules
    • Canvas: Clipping, Masking, Pattern
    • SVG: Clipping, Masking, Pattern
    • I2Djs + Physics Engine - MatterJs
  • API Reference
    • Layers
      • Canvas Layer
      • SVG Layer
      • WebGL Layer
    • Elements API
    • Canvas additional features
    • WebGL additional features
      • Custom Shader
      • Geometry
      • Render Target
      • Texture Object
    • Join Action
    • Animation
    • Chaining
    • Path
    • Events
    • Behaviour
      • Zoom and Pan
      • Drag
  • Examples
    • Canvas
    • SVG
    • WebGL
Powered by GitBook
On this page

Was this helpful?

  1. API Reference
  2. WebGL additional features

Render Target

A buffer to save the intermediate computations. A buffer when RenderTarget is set, it captures the output of a fragment shader. This feature is useful in creating an effect that involves one or more shaders processing. For example, applying postprocessing to a rendered image before displaying it on the screen.

Syntax:

webglRenderer.RenderTarget({
    texture: Texture
});

Example:

var Texture = webglRenderer.TextureObject({
    width: webglRenderer.width * webglRenderer.pixelRatio,
    height: webglRenderer.height * webglRenderer.pixelRatio,
    border: 0,
    format: 'RGBA',
    type: 'UNSIGNED_BYTE',
    warpS: 'CLAMP_TO_EDGE',
    warpT: 'CLAMP_TO_EDGE',
    magFilter: 'LINEAR',
    minFilter: 'LINEAR',
    mipMap: false
});

var renderTarget = webglRenderer.RenderTarget({
    texture: Texture
})
PreviousGeometryNextTexture Object

Last updated 4 years ago

Was this helpful?