Skip to content

Possible issue using filter() inside of PGraphics for Syphon in Processing? #41

Description

@CaseyJNova

MacBook Pro Retina Mid-2015
OSX 11.5.1
Processing 3.5.4

I am using the Syphon Processing library and I have found a possible issue when it comes to using the filter() function inside of the PGraphics canvas for sending out frames via a Syphon Server.

I have noted that the filters used, BLUR & INVERT, do appear correctly in the Processing window however they do not appear to be sent out correctly in the Syphon output.

Is there a reason for this?

Possible solution or fix?

Or, should I try to apply the filters in a different manner altogether?

Thank you for any tips or help!

Please see code and screenshot below:

import codeanticode.syphon.*;

PGraphics canvas;
SyphonServer server;

void setup() { 
  size(400,400, P3D);
  canvas = createGraphics(400, 400, P3D);
  frameRate(30);
  
  // Create syhpon server to send frames out.
  server = new SyphonServer(this, "Processing Syphon");
}

void draw() {
  canvas.beginDraw();
  canvas.background(127);
  canvas.lights();
  canvas.translate(width/2, height/2);
  canvas.rotateX(frameCount * 0.01);
  canvas.rotateY(frameCount * 0.01);  
  canvas.box(150);
  canvas.filter(INVERT);
  canvas.filter(BLUR, 3);
  canvas.endDraw();
  image(canvas, 0, 0);
  server.sendImage(canvas);
}

Screen Shot 2022-01-28 at 3 19 44 PM

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions