Skip to content

viktor4006094/PolarizingFilter

Repository files navigation

A Polarizing Filter Function for Real-Time Rendering

This repository hosts the source code of the example application used in the article A Polarizing Filter Function for Real-Time Rendering.

Polarizing Filter Demonstration


unfiltered

filter angle = 160°

filter angle = 90°

unfiltered

filter angle = 120°

filter angle = 30°

unfiltered

filter angle = 112°

filter angle = 0°

Projects and Settings

This implmeentation is based on Nvidia's Falcor Rendering Framework 3.2.2 and adds the following projects.

  • PolarizingFilterRenderer A copy of Falcor's ForwardRenderer with an included polarizing filter.
    • Settings
      • Polarizing Filter
        • Filter angle - The counterclockwise rotation angle of the linear polarizing filter in degrees, with 0 repressenting a horizontally angled filter.
  • MaterialDemoRenderer Can be used to compare the effect of our approximate function with the correct IOR-based function (see the article for more details). All surfaces use the same material in this mode.
    • Settings
      • Polarizing Filter
        • Filter angle - Same as in PolarizingFilterRenderer.
        • Show difference - Visualize the exaggerated difference between the reference version and the approximate version.
        • Reference version - Use the IOR-based version of the filter instead the approximate version.
      • Custom Material
        • Presets - Select material values from a predefined list of materials.
        • IoR n - The simple refractive index for RGB color channels.
        • IoR k - The extinction coefficient for RGB color channels.
        • Roughness - Linear roughness value.
        • Use as dielectric - Material will have a metalness value of 0 when using the approximate version of the filter.

Polarizing Filter Source Code

The HLSL implementation code of the polarizing filter can be found in PolarizingFilterRenderer.hlsl, see the article for more details.

Requirements and Installation

Follow the installation guide for Falcor 3.2.2 if you want to build this project. The same restrictions and requirements apply.

The Sun Temple and Bistro test scenes can be downloaded from the Open Research Content Archive (ORCA). Scenes can also be created/modified with the included SceneEditor project.

Citation

@article{Enfeldt2021Polarizing,
    author  = {Viktor Enfeldt and Prashant Goswami}, 
    title   = {A Polarizing Filter Function for Real-Time Rendering},
    year    = 2021,
    month   = {June},
    day     = 17,
    journal = {Journal of Computer Graphics Techniques (JCGT)},
    volume  = 10,
    number  = 2,
    pages   = {29--52},
    url     = {http://jcgt.org/published/0010/02/03/},
    issn    = {2331-7418}
}