Problem using smooth() and cubemap shaders

edited September 2014 in GLSL / Shaders

I am using the cubemap shaders from Processing's DomeProjection shader example, and I'm having problems when I call smooth() in setup.

The model only appears as black whenever I call anything other than smooth(4). I would like to have a higher degree of smoothing for my app.

When I call anything other than smooth(4) in the DomeProjection example, it throws an exception:

Exception in thread "AWT-EventQueue-0" java.lang.RuntimeException: Cannot validate shader program: Unknow error at processing.core.PGraphics.showException(PGraphics.java:7852) at processing.opengl.PShader.init(PShader.java:936) at processing.opengl.PShader.getAttributeLoc(PShader.java:605) at processing.opengl.PShader.loadAttributes(PShader.java:1123) at processing.opengl.PGraphicsOpenGL.getLineShader(PGraphicsOpenGL.java:6807)

Answers

  • edited October 2014

    I noticed this problem with smooth() and cubemap shaders as well. A workaround is using a PGraphics. Strangely enough when I use a PGraphics I can use a cubemap shader plus smooth(32) and not end up with a black model. It's a strange 'solution', because the main sketch is also a PGraphics, but it works and it is better than the alternative of not using a higher smooth setting. Note that for this workaround you still can only set the higher smooth setting in the PGraphics, because setting a higher smooth in the main sketch will still cause the cubemap PShader to go black even though it is used in a separate PGraphics. Not sure what is causing this, but this is the only workaround I found so far...

Sign In or Register to comment.