* Begin capturing rendering to an offscreen buffer for post-effect processing. * Call endPostEffect() after rendering to blit the result to the screen. * No-op on Canvas renderer. * @param {Renderable} renderable - the renderable with postEffects to apply * @returns {boolean} false (Canvas r
(renderable)
| 386 | * @ignore |
| 387 | */ |
| 388 | beginPostEffect(renderable) { |
| 389 | // on Canvas, only set customShader for single-effect fast path |
| 390 | const effects = renderable.postEffects.filter((fx) => { |
| 391 | return fx.enabled !== false; |
| 392 | }); |
| 393 | if (effects.length === 1) { |
| 394 | this.customShader = effects[0]; |
| 395 | } else { |
| 396 | this.customShader = undefined; |
| 397 | } |
| 398 | return false; |
| 399 | } |
| 400 | |
| 401 | /** |
| 402 | * End post-effect capture and blit the offscreen buffer to the screen |
no outgoing calls
no test coverage detected