CloudyDay
 All Classes Functions Variables Enumerations
PostProcess.h
1 #pragma once
2 #include "hud.h"
3 
4 namespace osgCloudyDay
5 {
11  {
12  public:
21  {
22  HDRM_Linear,
23  HDRM_Reinhard,
24  HDRM_ReinhardModified,
25  HDRM_Uncharted
26  };
27 
35  PostProcess(int hdr_mapping, bool use_avglum, bool use_bloom, bool use_star);
39  ~PostProcess(void);
40 
45  virtual void SetupUniform(osg::ref_ptr<osg::StateSet> states);
50  virtual void SetupTextures(osg::ref_ptr<osg::StateSet> states);
51 
55  virtual void CreateCamera();
56 
61  void AddLUD(std::string path);
62 
63  protected:
64  int m_HDRMapping;
65 
66  bool m_use_AVGLuminance;
67  bool m_use_vignette;
68 
69  const std::string GetGLSLFragmentShader();
70  const std::string GetGLSLVertexShader();
71 
72  const std::string GetGLSLAssignLUD();
73  const std::string GetGLSLUniformLUD();
74  const std::string GetGLSLFragmentUncharted();
75  const std::string GetGLSLFragmentVignetteFunc();
76  const std::string GetGLSLFragmentMainFunc();
77  const std::string GetHDRMapping();
78  const std::string GetGlare();
79  const std::string GetVignette();
80  const std::string GetSRGB();
81 
82  const std::string GetGLSLFragmentHeader();
83 
84  osg::ref_ptr<osg::Texture2D> m_postprocess;
85  osg::ref_ptr<osg::Texture3D> tex3dlud;
86 
87  std::vector<osg::ref_ptr<osg::Texture3D>> m_lods;
88 
89  int num_lods;
90 
91  bool m_bloom;
92  bool m_star;
93  };
94 }