# Use shader with another createCanvas

**URL:** <https://discourse.processing.org/t/use-shader-with-another-createcanvas/39280>\
**Category:** Coding Questions\
**Created:** [October 15, 2022, 9:10am UTC](https://discourse.processing.org/t/use-shader-with-another-createcanvas/39280 "2022-10-15T09:10:17Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![sableraph](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/sableraph/32/251_2.png) [@sableraph](https://discourse.processing.org/u/sableraph)\
**Post date:** [October 15, 2022, 10:16am UTC](https://discourse.processing.org/t/use-shader-with-another-createcanvas/39280/2 "2022-10-15T10:16:55Z")

</div>

I believe this is called double buffering. You have a back buffer and a front buffer and switch them every frame.

The thread below should have the answers you’re looking for 🙂

> [@Backbuffer in p5js](https://discourse.processing.org/t/backbuffer-in-p5js/29769):
>
> I found a shader on the GLSL Sandbox website that I want to use. (It might be their e#375.15.) This shader wants to use WebGL’s backbuffer feature. It seems from a Google search that p5js does not allow reference to backbuffer. The p5js example that i did find uses creategrahics (same dimensions as the canvas) and ‘backbuffer.image(canvas, width \* -0.5, height \* -0.5, width, height)’ to populate it in the sketch’s draw function, so my question is ‘Is this (using createGrahics) really what I hav…

---

_[View the full topic](https://discourse.processing.org/t/use-shader-with-another-createcanvas/39280)._
