convert gl2 shader for gl3 compatibility walkthrough
Hey everyone checking out the gl3 package. There was recently a reply to the jit.gl.bfg article mentioning that one of the patches was not working in gl3. The reason being the shader failed to automatically transform to a gl3 compatible shader, and the solution being to manually convert. We do have some documentation in the gl3 package that explains some things about this process (called "Updating GLSL Shaders for GL3") but I thought a video walkthrough might be of benefit to those of bravely trudging through the gl3 jungle.
It's a bit long, and a bit rambling, but gets the job done. Check it out here: https://drive.google.com/file/d/1glhYBsb3DG7FGoixfzHebv-KXclQKU5Z/
Thanks for this. Very helpful.
Rob, you're the best!
thank you!
Hi from the future, and thanks a lot for these explanations!
Before having a go at converting at GL2 GLSLshader to GL3, I wonder if the instructions are still up to date in 2025 and OpenGL 4.1?
The docs also have been reorganised in Max 9, the porting guide bit is now here:
And are you still interested in bug reports about the lua auto-porter?
OpenGL Version 4.1 Metal - 88.1, GLSL Version 4.10
lua: runtime error:
lua: [string "-- gl3_transformer.lua..."]:254: assertion failed!
lua: stack traceback:
lua: [C]: in function 'assert'
lua: [string "-- gl3_transformer.lua..."]:254: in function <[string "-- gl3_transformer.lua..."]:200>
jit.gl.slab: error transforming gl2 shader
BTW, the jxs xml parser doesn't seem to like <!-- comments -->, unfortunately.