X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Feffects%2Fsky.h;h=7d8933d4a65f4a6facbb7799fbb99f59293bc6bb;hb=2a2917f41f02fa12e9354616d76bf45c9b5bf3e6;hp=782aef1ceb1d0b0faa2c5e58a6407118834b0457;hpb=adc26a2e141a2853b6c5025130c46a46cece4b84;p=libs%2Fgl.git diff --git a/source/effects/sky.h b/source/effects/sky.h index 782aef1c..7d8933d4 100644 --- a/source/effects/sky.h +++ b/source/effects/sky.h @@ -13,9 +13,14 @@ class Mesh; class Program; /** -Renders a procedurally generated sky at the background. Based on the paper -"A Scalable and Production Ready Sky and Atmosphere Rendering Technique" by -Sébastien Hillaire (https://sebh.github.io/publications/egsr2020.pdf). +Renders a procedurally generated sky at the background. + +In addition to the background, the transmittance of the sun light is calculated +to produce realistic lighting at dawn and dusk. + +Based on the techniques described in "A Scalable and Production Ready Sky and +Atmosphere Rendering Technique" by Sébastien Hillaire +(https://sebh.github.io/publications/egsr2020.pdf). */ class Sky: public Effect { @@ -39,6 +44,24 @@ public: static Planet earth(); }; + struct Template: Effect::Template + { + class Loader: public DataFile::DerivedObjectLoader + { + private: + static ActionMap shared_actions; + + public: + Loader(Template &, Collection &); + private: + virtual void init_actions(); + }; + + DirectionalLight *sun = 0; + + virtual Sky *create(const std::map &) const; + }; + private: Planet planet; DirectionalLight &sun;