PBR: Shader Compilation Error on Mac OS (GLSL110)
See original GitHub issueSo when running on Mac OS X in the default mode, you only get the compability profile and thus OpenGL 2.0 and GLSL110. According to the source code, this should not be a problem for PBR, we have our GLSLCompat.glsllib and we have the “Language Switch Statements”.
In this case it seems the latter has gone wrong and I need to investigate why. I might open another issue to track the exact issue, this is mainly to track the defect as is and make it more prominent for searches.
Do note that this also affects the SDK in it’s current state and basically all PBR on Mac OS X and probably also every shader wanting to use GLSL120+ language features.
com.jme3.renderer.RendererException: compile error in: ShaderSource[name=Common/MatDefs/Light/PBRLighting.frag, defines, type=Fragment, language=GLSL110]
ERROR: 0:200: GLSL 110 does not allow sub- or super-matrix constructors
ERROR: 0:201: Use of undeclared identifier 'wToLocalRot'
ERROR: 0:201: Use of undeclared identifier 'wToLocalRot'
ERROR: 0:214: Use of undeclared identifier 'wToLocalRot'
ERROR: 0:215: Use of undeclared identifier 'rayLs'
ERROR: 0:218: Use of undeclared identifier 'wToLocalRot'
ERROR: 0:222: Use of undeclared identifier 'rayLs'
ERROR: 0:223: Use of undeclared identifier 'rayLs'
ERROR: 0:224: Use of undeclared identifier 'firstPlaneIntersect'
ERROR: 0:224: Use of undeclared identifier 'secondPlaneIntersect'
ERROR: 0:225: Use of undeclared identifier 'furthestPlane'
ERROR: 0:225: Use of undeclared identifier 'furthestPlane'
ERROR: 0:225: Use of undeclared identifier 'furthestPlane'
ERROR: 0:227: Attempt to use 'distance' as a variable
ERROR: 0:228: Use of undeclared identifier 'intersectPositionWs'
at com.jme3.renderer.opengl.GLRenderer.updateShaderSourceData(GLRenderer.java:1476)
at com.jme3.renderer.opengl.GLRenderer.updateShaderData(GLRenderer.java:1503)
at com.jme3.renderer.opengl.GLRenderer.setShader(GLRenderer.java:1567)
at com.jme3.material.logic.SinglePassAndImageBasedLightingLogic.render(SinglePassAndImageBasedLightingLogic.java:259)
at com.jme3.material.Technique.render(Technique.java:166)
at com.jme3.material.Material.render(Material.java:1026)
at com.jme3.renderer.RenderManager.renderGeometry(RenderManager.java:614)
at com.jme3.renderer.queue.RenderQueue.renderGeometryList(RenderQueue.java:266)
at com.jme3.renderer.queue.RenderQueue.renderQueue(RenderQueue.java:305)
at com.jme3.renderer.RenderManager.renderViewPortQueues(RenderManager.java:877)
at com.jme3.renderer.RenderManager.flushQueue(RenderManager.java:779)
at com.jme3.renderer.RenderManager.renderViewPort(RenderManager.java:1108)
at com.jme3.renderer.RenderManager.render(RenderManager.java:1158)
at com.jme3.app.SimpleApplication.update(SimpleApplication.java:272)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.runLoop(LwjglAbstractDisplay.java:151)
at com.jme3.system.lwjgl.LwjglDisplay.runLoop(LwjglDisplay.java:197)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:232)
... 1 more
Issue Analytics
- State:
- Created 4 years ago
- Comments:18 (18 by maintainers)
Top Results From Across the Web
Error when using 3D GLTF model(On MacOS X) - import-assets
I'm trying to use 3D models that I got off of Sketchfab in a BasicGame(In the SDK) This is the model: M16 Assault...
Read more >Opengl es 2.0 GLSL compiling fails on OSX when using const
My shader works fine under windows 7 and android. When i'm running my app under OS X i'm getting the following compiler errors...
Read more >Unable to compile effect - html shown in output of vertex code
Hi, I've upgraded to the latest release 5.0.0-alpha.65, and am encountering some errors in the console, output from Effect.
Read more >iOS offline shader compiler missing | Apple Developer Forums
I have been using the offline shader compiler for mac successfully, by first running. xcrun -sdk macosx -find metal. which returns the path...
Read more >PBR Bridge – How To Be Lazy & Focus On Your Art - Gumroad
And it comes with an Advanced PBR Shader with UDIM support which will ... supportv1.2.3 MacOS/Linux path preferences error handlingv1.2.2Substance 7.3: Fix ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
That would work, yes. I would’ve accessed every single value of the matrix, but this is much more effective. I’ll see if I can come up with a PR
Fixed in v3.3 branch at 9dfbcde