2022 Volume 10 Issue 2 Pages 162-169
Thin-film interference is widely known for the reason of the iridescence on a bubble and spilled oil. Although it is not difficult to calculate the interference of light waves, calculating high precision interference is still considered impractical in real-time rendering. The proposed method is to separate the interference calculation by pre-computing calculation and save the value in lookup texture. But instead of using angle and thickness like other methods, we are using optical path difference as an index in lookup texture to create a flexible and compact lookup texture. The rest of the calculation, which calculates the optical path difference from the thin-film attribute will be done in real-time. Compared with other methods, the lookup texture generated using optical path difference will consume significantly less memory since it reduces the texture dimension to a one-dimensional texture. With this, we can handle different parameter changes such as refractive index and reflectance value without generating a new lookup texture or impacting the rendering performance.