5 #include "framebuffer.h"
6 #include "programdata.h"
7 #include "rendertarget.h"
17 Renders a procedurally generated sky at the background. Based on the paper
18 "A Scalable and Production Ready Sky and Atmosphere Rendering Technique" by
19 Sébastien Hillaire (https://sebh.github.io/publications/egsr2020.pdf).
21 class Sky: public Effect
26 Color rayleigh_scatter;
30 float rayleigh_density_decay;
31 float mie_density_decay;
32 float ozone_band_center;
33 float ozone_band_extent;
34 float atmosphere_thickness;
40 static Planet earth();
45 RenderTarget transmittance_lookup;
46 const Program &transmittance_shprog;
47 bool transmittance_lookup_dirty;
49 const Program &distant_shprog;
50 const Mesh &fullscreen_mesh;
51 const Program &backdrop_shprog;
52 const Sampler &sampler;
53 const Sampler &wrap_sampler;
54 mutable ProgramData shdata;
58 Sky(Renderable &, const Light &);
60 void set_planet(const Planet &);
61 void set_view_height(float);
63 virtual void setup_frame(Renderer &);
64 virtual void finish_frame();
65 virtual void render(Renderer &, Tag = Tag()) const;