ebruneton / precomputed_atmospheric_scattering

This project provides a new implementation of our EGSR 2008 paper "Precomputed Atmospheric Scattering".
BSD 3-Clause "New" or "Revised" License
908 stars 120 forks source link

Changing the color of the star #5

Closed Iter-Ator closed 7 years ago

Iter-Ator commented 7 years ago

Hi!

Thank you for the awesome demo.

Is it possible to change the spectrum (temperature) of the star? The emittance at a given wavelength can be calculated from temperature by Planck's radiation law, but where should I give the calculated values to the Model, to use it as the star's color?

ebruneton commented 7 years ago

Yes, this is possible. You need to pass these values in the solar_irradiance vector parameter of the model constructor (see https://github.com/ebruneton/precomputed_atmospheric_scattering/blob/master/atmosphere/model.h, line 158). The demo uses the Sun spectrum (see https://github.com/ebruneton/precomputed_atmospheric_scattering/blob/master/atmosphere/demo/demo.cc, lines 158-171).