renderPass method
dynamic
renderPass(
- dynamic renderer,
- dynamic passMaterial,
- dynamic renderTarget,
- dynamic clearColor,
- dynamic clearAlpha,
- dynamic clear,
Implementation
renderPass(
renderer, passMaterial, renderTarget, clearColor, clearAlpha, clear) {
// print("renderPass passMaterial: ${passMaterial} renderTarget: ${renderTarget} ");
// print(passMaterial.uniforms);
// setup pass state
renderer.autoClear = false;
renderer.setRenderTarget(renderTarget);
if (clearColor != null) {
renderer.setClearColor(clearColor);
renderer.setClearAlpha(clearAlpha ?? 0.0);
renderer.clear();
}
// 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);
this.fsQuad.material = passMaterial;
this.fsQuad.render(renderer);
// restore original state
renderer.autoClear = oldAutoClear;
renderer.setClearColor(this.oldClearColor);
renderer.setClearAlpha(oldClearAlpha);
}