[SimplePBR] Physically based rendering library

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.

There is more information on my website , the source is hosted at this Github repo , and there’s a compilation of sketches done with it.

I posted the library last year, but to the wrong forum section :grimacing:. The good news is that it is now updated and runs on every desktop platform.

Hope you enjoy it!

5 Likes

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.

Hey @kosowski,

Just had a look at your link and there are a few missing pieces:

  • Need to include documentation in the reference folder. This can simply be your library’s javadocs.
  • Need to include a library.properties file in the zip package.
  • Need a link to SimplePBR.txt (which is the same as the properties file) alongside the zip (so that the URLs match up to the extension).

See Library Basics on the wiki for more information.

Thanks!

Thanks @prisonerjohn, have to look into this, will get back to you when everything is ready.

@kosowski hi!

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

Now I see that I use version 0.1 meanwhile on Github the latest is 0.3.
After switching to 0.3 everything works, no errors. Sorry to bother you.

No problem, glad its working :slight_smile: