5 #include "framebuffer.h"
6 #include "programdata.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 Texture2D transmittance_lookup;
46 const Program &transmittance_shprog;
47 Framebuffer transmittance_fbo;
48 bool transmittance_lookup_dirty;
50 const Program &distant_shprog;
51 Framebuffer distant_fbo;
52 const Mesh &fullscreen_mesh;
53 const Program &backdrop_shprog;
54 const Sampler &sampler;
55 const Sampler &wrap_sampler;
56 mutable ProgramData shdata;
60 Sky(Resources &, Renderable &, const Light &);
62 void set_planet(const Planet &);
63 void set_view_height(float);
65 virtual void setup_frame(Renderer &);
66 virtual void finish_frame();
67 virtual void render(Renderer &, Tag = Tag()) const;