PBR shader2015 | View shader source code
- Written in HLSL
- Directional lights utilizing GGX distribution
- Ambient light and reflections from cubemap
- Metallic/roughness workflow
- Calculates tangent basis per pixel to enable overlapping and mirrored normal maps
- Lerps between normal-mapped normal and vertex normal based on angle to surface to remove overly reflective surfaces at grazing angles
I used ShaderTool to pipe all the data into the shader. While this allowed me to create the shader in a short time span, it also came with a few drawbacks, such as no support for HDR cubemaps and the fact that mipmaps are recomputed for DDS textures when they are loaded. This stopped me from using HDR cubemaps and pre-convolved GGX cubemaps that are synced between the authoring program (Knald Lys) and the shader.
Character model created by Joachim Häggström.