# GLSL Shaders using Processing Pi on a Pi 3 B+

**URL:** <https://discourse.processing.org/t/glsl-shaders-using-processing-pi-on-a-pi-3-b/18614>\
**Category:** Processing for Pi\
**Created:** [March 12, 2020, 3:33am UTC](https://discourse.processing.org/t/glsl-shaders-using-processing-pi-on-a-pi-3-b/18614 "2020-03-12T03:33:16Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![monkstone](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/monkstone/32/64_2.png) [@monkstone](https://discourse.processing.org/u/monkstone)\
**Post date:** [July 21, 2020, 8:14pm UTC](https://discourse.processing.org/t/glsl-shaders-using-processing-pi-on-a-pi-3-b/18614/5 "2020-07-21T20:14:53Z")

</div>

@jshaw3 I revised your code slightly:-

```java
import processing.video.Movie;

PShader mixShader;

PGraphics pg;
PGraphics pg2;

Movie movie;
Movie movie2;

void settings() {
  size(640, 360, P2D);
  noSmooth();
}

void setup() {
  pg = createGraphics(640, 360, P2D);
  movie = new Movie(this, "LabspaceDawnv1blur2.mp4");
  movie.loop();
  movie2 = new Movie(this, "LabspaceFireblur2.mp4");
  movie2.loop();
  pg = createGraphics(width, height, P2D);
  pg2 = createGraphics(width, height, P2D);
  mixShader = loadShader("fadeshader.glsl");
  mixShader.set("iResolution", float(width), float(height));
  mixShader.set("iTime", millis()/1000.);

  mixShader.set("iChannel0", pg);
  mixShader.set("iChannel1", pg2);
}

void movieEvent(Movie m) {
  m.read();
}

void draw() {
  pg.beginDraw();
  pg.image(movie, 0, 0, width, height);
  pg.endDraw();
  pg2.beginDraw();
  pg2.image(movie2, 0, 0, width, height);
  pg2.endDraw();
  shader(mixShader);
  rect(0, 0, width, height);
}

```

Then I could run the sketch on RaspberryPI4 using ManjaroArmLinux (64 bit) and the latest iteration of [processing-4.0](https://discourse.processing.org/t/processing-in-style-with-java-11/13776/40) with the latest [video library](https://github.com/processing/processing-video/releases/tag/r6-v2.0-beta4). I also got rid off the sub-folder in the data folder (ps also movie files should not have spaces in their names). Since buster I’ve not bothered trying to install processing on my RasberryPI3B+. I’ll have a go with my [PiCrate](https://ruby-processing.github.io/PiCrate/) gem on the RaspberryPI3B+, and report back.

---

_[View the full topic](https://discourse.processing.org/t/glsl-shaders-using-processing-pi-on-a-pi-3-b/18614)._
