I have created a library for physically based rendering (PBR) in Processing. PBR is a rendering method for more accurate (and nicer) lighting of surfaces, here’s a demo video .
At the core, is just a replacement of the default shader, plus the required initialization, so it should play nicely with any existing sketch or library.
So, I was told to post this on the “Libraries” category instead of “Gallery”, but then it has been moved to “Gallery”, where it was already posted ¯\_(ツ)_/¯.
@GoToLoop could you please move it back to “Libraries”? It seems that’s the way to be added to the contribution manager.
The sample videos look amazing! Great work!
I’m trying to explore this library, but there is an error that does not allow me even run the examples:
Cannot compile fragment shader:
ERROR: 0:167: Invalid call of undeclared identifier ‘texture2D’
ERROR: 0:174: Invalid call of undeclared identifier ‘texture2D’
ERROR: 0:180: Invalid call of undeclared identifier ‘texture2D’
ERROR: 0:187: Use of undeclared identifier ‘base’
ERROR: 0:187: Use of undeclared identifier ‘metallic’
ERROR: 0:204: Use of undeclared identifier ‘roughness’
ERROR: 0:205: Use of undeclared identifier ‘mipLevel’
ERROR: 0:266: Use of undeclared identifier ‘specular’
ERROR: 0:267: Use of undeclared identifier ‘specfresnel’
ERROR: 0:267: Use of undeclared identifier ‘roughness’
ERROR: 0:270: Use of undeclared identifier ‘specref’
ERROR: 0:273: Use of undeclared identifier ‘specfresnel’
ERROR: 0:280: Use of undeclared identifier ‘specref’
ERROR: 0:281: Use of undeclared identifier ‘diffref’
ERROR: 0:285: Use of undeclared identifier ‘roughness’
ERROR: 0:286: Use of undeclared identifier ‘specular’
ERROR: 0:286: Use of undeclared identifier ‘brdf’
ERROR: 0:286: Use of undeclared identifier ‘brdf’
ERROR: 0:288: Use of undeclared identifier ‘iblspec’
ERROR: 0:288: Use of undeclared identifier ‘envspec’
ERROR: 0:292: Use of undeclared identifier ‘base’
ERROR: 0:292: Use of undeclared identifier ‘metallic’
ERROR: 0:295: Use of undeclared identifier ‘result’
ERROR: 0:295: Use of undeclared identifier ‘result’
ERROR: 0:296: Use of undeclared identifier ‘result’
How to fix this?
If I comment out mat.bind() — sketch runs, but obviously without textures.
Thanks