render method

  1. @override
dynamic render(
  1. dynamic renderer,
  2. dynamic writeBuffer,
  3. dynamic readBuffer, {
  4. num? deltaTime,
  5. bool? maskActive,
})
override

Implementation

@override
render(renderer, writeBuffer, readBuffer, {num? deltaTime, bool? maskActive}) {
  if (uniforms[textureID] != null) {
    uniforms[textureID]["value"] = readBuffer.texture;
  }

  fsQuad.material = material;

  if (renderToScreen) {
    renderer.setRenderTarget(null);
    fsQuad.render(renderer);
  } else {
    renderer.setRenderTarget(writeBuffer);
    // TODO: Avoid using autoClear properties, see https://github.com/mrdoob/three.js/pull/15571#issuecomment-465669600
    if (clear) {
      renderer.clear(renderer.autoClearColor, renderer.autoClearDepth, renderer.autoClearStencil);
    }
    fsQuad.render(renderer);
  }
}