[Solved] Error with ContrastAdjustmentFilter in Android

Hello everyone…

I am creating a game for android, I tried to use the ContrastAdjustmentFilter so I run my game on three different devices, on one it works fine, but on the other two it gives me the error below, does anyone know how to fix it?
I really don’t know much about material definitions. :neutral_face:

com.jme3.renderer.RendererException: compile error in: ShaderSource[name=Common/MatDefs/Post/ContrastAdjustment15.frag, defines, type=Fragment, language=GLSL320]
    0:3: P0003: Warning: Extension 'GL_ARB_texture_multisample' not supported
    0:224: S0060: Multiple output variables defined. Location must be specified for all outputs.
        at com.jme3.renderer.opengl.GLRenderer.updateShaderSourceData(GLRenderer.java:1548)
        at com.jme3.renderer.opengl.GLRenderer.updateShaderData(GLRenderer.java:1575)
        at com.jme3.renderer.opengl.GLRenderer.setShader(GLRenderer.java:1640)
        at com.jme3.material.logic.DefaultTechniqueDefLogic.render(DefaultTechniqueDefLogic.java:96)
        at com.jme3.material.Technique.render(Technique.java:167)
        at com.jme3.material.Material.render(Material.java:1052)
        at com.jme3.renderer.RenderManager.renderGeometry(RenderManager.java:651)
        at com.jme3.post.FilterPostProcessor.renderProcessing(FilterPostProcessor.java:233)
        at com.jme3.post.FilterPostProcessor.renderFilterChain(FilterPostProcessor.java:319)
        at com.jme3.post.FilterPostProcessor.postFrame(FilterPostProcessor.java:340)
        at com.jme3.renderer.RenderManager.renderViewPort(RenderManager.java:1194)
        at com.jme3.renderer.RenderManager.render(RenderManager.java:1248)
        at com.jme3.app.SimpleApplication.update(SimpleApplication.java:278)
        at com.jme3.app.AndroidHarness.update(AndroidHarness.java:413)
        at com.jme3.system.android.OGLESContext.onDrawFrame(OGLESContext.java:352)
        at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1571)
        at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1270

Not sure why it does not fall back to the second Technique if the first one is not supported. Probably I am missing something but anyway try to remove the first Technique (GLSL150) which requires GL_ARB_texture_multisample extension and see if it solves your issue.

Also, please put the stack trace inside code blocks so it would be easy to read.

3 Likes

Thank you very much this solved my issue :smiley: :smiley:

2 Likes