PBR Shader Demo in Blitzmax+MaxGUI+OpenB3D
by Krischan from www.syntaxbomb.com

This is a small sandbox demo how to implement GLSL 1.x (OpenGL 2.x) PBR shaders in Blitzmax and OpenB3D with additional features like:

- Radial range-based distance fog
- Parallax Occlusion Mapping (not working correct!)
- Multiple Lights
- Different Tonemapping Models
- Different Camera FOV

The demo creates a small demo level from a Data Field and you can walk around with WASD in it. The Mousebuttons switch a spotlight attached to the camera on/off.

The PBR model is set in the "Roughness" and "Metallic" textures, so when there is no Metallic texture, it is assumed that the non-metallic PBR model should be used. You can even delete additional textures, the demo checks if they are available and will only add them if yes.

The Height texture is needed to make the Parallax Occlusion Mapping work. You can change the light intensity in the "Variables" settings of the source. But there is no raycasting check so reflections will reflect "through walls" if the light intensity is set too high.

The demo runs either with Vsync enabled or when pressing the TAB Key, Vsync is disabled. The movement is frame independent. SPACE shows wireframe.

The F-Keys switch some features on/off while the Keys 1-7 enable or disable the different PBR textures in realtime to see how they change the details and lighting.

Have fun!