Get the latest tech news

Physically Based Rendering in Filament


**Physically Based Rendering in Filament** ![](images/filament_logo.png) # About This document is part of the [Filament project](https://github.com/google/filament). To report errors in this document please use the [project's issue tracker](https://github.com/google/filament/issues).

[TODO: talk about the issue with fr+fd] ### Energy loss in specular reflectance The Cook-Torrance BRDF we presented earlier attempts to model several events at the microfacet level but does so by accounting for a single bounce of light. The Lambertian BRDF // can be baked directly in the SH to save a multiplication here vec3 indirectDiffuse = max(irradianceSH(n), 0.0) * Fd_Lambert(); // Indirect contribution return diffuseColor * indirectDiffuse + indirectSpecular * specularColor; } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [Listing [optimizedIblEvaluation]: GLSL implementation of image based lighting evaluation] #### Pre-integration for multiscattering #### In section [Energy loss in specular reflectance] we discussed how to use a second scaled specular lobe to compensate for the energy loss due to only accounting for a single scattering event in our BRDF. [Figure [filamentReference]: Rendered in 2048x1440 with MSAA 4x at 60 fps on a Nexus 9 device (Tegra K1 GPU)](images/screenshot_ref_filament.jpg) The parameters used to render both scenes are the following: **Filament** - Material - Base color: sRGB 0.81, 0, 0 - Metallic: 0 - Roughness: 0 - Reflectance: 0.5 - Indirect light: IBL - 256x256 cubemap generated by cmgen from office.exr - Multiplier: 35,000 - Direct light: directional light - Linear color: 1.0, 0.96, 0.95 - Intensity: 120,000 lux - Exposure - Aperture: f/16 - Shutter speed: 1/125s - ISO: 100 **Mitsuba** - BSDF: roughplastic - Distribution: GGX - Alpha: 0 - Diffuse reflectance: sRGB 0.81, 0, 0 - Emitter: environment map - Source: office.exr - Scale: 35,000 - Emitter: directional - Irradiance: linear RGB 120,000 115,200 114,000 - Film: LDR - Exposure: -15.23, computed from log2(filamentExposure) - Integrator: path - Sampler: ldsampler - Sample count: 256 The full Mitsuba scene can be found as an annex.

Get the Android app

Or read this on Hacker News