Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

applying fx after 3d tint produces error #32

Open
verybigelephants opened this issue May 2, 2018 · 6 comments
Open

applying fx after 3d tint produces error #32

verybigelephants opened this issue May 2, 2018 · 6 comments
Assignees
Labels
Projects

Comments

@verybigelephants
Copy link

When trying to apply the pixelate filter at the end of the drawing loop like this fx.render().pixelate(i).compose(); on a scene with some 3d mesh with some tint() applied to it breaks the renderer and it throws this error #1

btw great library for simpler quick hassle free post procesing!

@cansik cansik self-assigned this May 3, 2018
@cansik cansik added the bug label May 3, 2018
@cansik
Copy link
Owner

cansik commented May 3, 2018

Thank you, I will check it out. Do you have a simple example that shows the bug? And are you running it on a mac?

@verybigelephants
Copy link
Author

i am running windows and the project i am working with uses kinect and a lot of dependencies, so making it run would probably be a real pain sorry :/

@cansik
Copy link
Owner

cansik commented May 7, 2018

Usually it is really helpful to provide a mcve. Otherwise I have to guess what could be wrong, and how you implemented it. For example here,I don't know if you are going to apply the tint before or after applying the fx...

@cansik
Copy link
Owner

cansik commented May 7, 2018

Just tested it out with a tint(100); in the Simple Effect, and it works. So please provide a mcve so I can investigate further.

@verybigelephants
Copy link
Author

sorry i haven't replied in a while, i have a lot of work recently, i will try to provide a working example as soon as possible

@Silenoid
Copy link

Silenoid commented Jul 18, 2018

Hi, I'm having the exact same problem.
There is not truly a need for an mcve: i've just cut everything off and I'm still having the error (I was working on a complex android project, than tried this library in java mode).

Here is the code:

PostFX fx;

void setup(){
    size(360,640,P2D);
    fx = new PostFX(this);
}

void draw(){
  background(255);  
  fx.render().pixelate(100).compose();
}

this is the exception I get when in Android mode using P3D rendering:

java.lang.reflect.InvocationTargetException
	at java.lang.reflect.Constructor.newInstance(Native Method)
	at ch.bildspur.postfx.builder.PostFXBuilder.getPass(PostFXBuilder.java:38)
	at ch.bildspur.postfx.builder.PostFXBuilder.pixelate(PostFXBuilder.java:187)
	at com.tesis.jupitermezziversarium.sketch_3D_Semplice.draw(sketch_3D_Semplice.java:101)
	at processing.core.PApplet.handleDraw(PApplet.java:1818)
	at processing.opengl.PSurfaceGLES$RendererGLES.onDrawFrame(PSurfaceGLES.java:264)
	at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1535)
	at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1240)
Caused by: java.lang.NoSuchMethodError: No virtual method sketchPath()Ljava/lang/String; in class Lprocessing/core/PApplet; or its super classes (declaration of 'processing.core.PApplet' appears in /data/app/com.tesis.jupitermezziversarium-1/base.apk)
	at ch.bildspur.postfx.pass.BasePass.getLibPath(BasePass.java:79)
	at ch.bildspur.postfx.pass.BasePass.<init>(BasePass.java:21)
	at ch.bildspur.postfx.pass.PixelatePass.<init>(PixelatePass.java:19)
	at ch.bildspur.postfx.pass.PixelatePass.<init>(PixelatePass.java:15)
	... 8 more
FATAL EXCEPTION: GLThread 5531
Process: com.tesis.jupitermezziversarium, PID: 28947
java.lang.NullPointerException: Attempt to invoke virtual method 'void ch.bildspur.postfx.pass.PixelatePass.setAmount(float)' on a null object reference
	at ch.bildspur.postfx.builder.PostFXBuilder.pixelate(PostFXBuilder.java:189)
	at com.tesis.jupitermezziversarium.sketch_3D_Semplice.draw(sketch_3D_Semplice.java:101)
	at processing.core.PApplet.handleDraw(PApplet.java:1818)
	at processing.opengl.PSurfaceGLES$RendererGLES.onDrawFrame(PSurfaceGLES.java:264)
	at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1535)
	at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1240)

Searching on the Internet I've got not so much infos, only that it could be related to shader compiling, but if not everyone is getting this error message I don't know what to think.
Anyway the library is awesome, thanks a lot for your work <3

@cansik cansik added this to To do in Release 0.5 Aug 28, 2019
@cansik cansik moved this from To do to In progress in Release 0.5 Aug 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Release 0.5
  
In progress
Development

No branches or pull requests

3 participants