VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtHdrPostProcessor.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2020 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
6 #pragma once
7 
11 
12 // Get proper local export symbol
14 
17 
18 #include <osg/Texture2D>
19 #include <osg/ref_ptr>
20 
21 #include <rapidjson/document.h>
22 
24 
25 namespace makVrv
26 {
27  class DtDe;
28  class DtChannel;
29 
33  {
34 
35  public:
38 
40  virtual ~DtHdrPostProcessor();
41  private:
44 
47 
49  DtHdrPostProcessor& operator=(const DtHdrPostProcessor&);
50  public:
51 
53  virtual void slot_reloadShaders();
54 
56 
57  virtual void slot_enableHdrAutoExposureChanged(bool val);
58  virtual void slot_enableHdrExposureCorrelationChanged(bool val);
59  virtual void slot_enableHdrBloomChanged(bool val);
60  virtual void slot_enableHdrStreaksChanged(bool val);
61  virtual void slot_enableHdrLensFlareChanged(double val);
62  virtual void slot_autoExposureRateScaleChanged(double val);
63  virtual void slot_autoExposurePreScaleChanged(double val);
64  virtual void slot_autoExposureMinDiffChanged(double val);
65  virtual void slot_autoExposureMaxDiffChanged(double val);
66  virtual void slot_autoExposureClampMinChanged(double val);
67  virtual void slot_autoExposureClampMaxChanged(double val);
68  virtual void slot_autoExposurePostScaleChanged(double val);
69  virtual void slot_bloomScaleChanged(double val);
70  virtual void slot_streakIntensityScaleChanged(double val);
71  virtual void slot_numStreaksChanged(int val);
72  virtual void slot_streaksLenScaleChanged(double val);
73  virtual void slot_streakRotationOffsetChanged(double val);
74  virtual void slot_lensFlareScaleChanged(double val);
75  virtual void slot_gammaChanged(double val);
76  virtual void slot_hdrResolutionScaleChanged(int val);
78 
80  virtual bool update(DtChannel *channel);
81 
83  virtual void setInputTexture(const DtChannel *channel, osg::Texture* texture );
84 
86  virtual osg::ref_ptr< osg::Texture > inputTexture();
87 
89  virtual bool postProcessorEnabled() const;
90 
91  protected:
92 
97  int calcHdrRes(int width, int height, int scale);
98 
99  virtual bool effectItrEnabled(EffectMap::iterator &effect);
100 
102 
103  virtual void getJsonValue(const rapidjson::Document& doc, const std::string& name, std::string& value);
104  virtual void getJsonValue(const rapidjson::Document& doc, const std::string& name, float& value);
105  virtual void getJsonValue(const rapidjson::Document& doc, const std::string& name, int& value);
106  virtual void getJsonValue(const rapidjson::Document& doc, const std::string& name, bool& value);
107  virtual void getJsonValue(const rapidjson::Document& doc, const std::string& name, osg::Vec4& value );
108  virtual void getHdrOptions(int width, int height, DtHdrDrawable::DtHdrOptions& options);
110 
112 
113  // hdrHeight - height of the largest texture used for the hdr post process effects
114  // hdrWidth - should be the same as height and is the width of the texture
115  // lumThreshold - threshold for post process effects set higher to reduce the effects
116  // lumScalar - scales the intensity values used by the post process effects before applying
117  // the effects. Increase to increase intensity of the effects
118  // starGenLevel - level of the blur buffer that the star gen should use (keep it at 0)
119  // blendAmount - amount of the effects buffer to blend into the main buffer.
120  // reduce to reduce the effects intensity
121  // streakDec - larger values increase the intensity of the streaks (keep between 0 and 1)
122  // ghostScalar1 - effects how the different ghost/len flares look
123  // ghostScalar2 - more values to effect the ghost/lens flares
124  // gausCompCoeff - How much of each bloom size to use from smallest to largest
125  // streakStride - Another knob to control how long the streaks are
126  // blurScalar - width of each of the bloom passes from smallest to largest
128 
129  protected:
130 
132 
133  int myViewX;
134  int myViewY;
137 
140 
142 
143  };
144 
146  {
147  public:
148 
151 
154 
156  virtual ~DtHdrPostProcessorCreator();
157 
158  protected:
159 
161  DtPostProcessor* create(DtDe& de, const std::string& postProcessType);
162  };
163 
164 }
Diagonal crossing liens.
Definition: DtTacticalGraphicUtilities.h:93
post processor class that handles HDR post processing effects
Definition: DtHdrPostProcessor.h:32
int myViewHeight
Definition: DtHdrPostProcessor.h:136
DtPostProcessor * create(DtDe &de, const std::string &postProcessType)
Create an instance of DtPostProcessor.
DtPostProcessorCreator is the common base class for all post processor creators.
Definition: DtPostProcessor.h:213
This class provides the management of post processors and their post processing effects.
Definition: DtPostProcessManagerInterface.h:24
DtHdrPostProcessorCreator()
CTOR.
DtSignalConnectionManager myConnections
Definition: DtHdrPostProcessor.h:141
The abstract Channel Class.
Definition: DtChannel.h:29
structure to hold all the HDR settings so they can more easily be passed to the drawable.
Definition: DtHdrDrawable.h:112
osg::ref_ptr< osg::Texture > myLensFlareTexture
Definition: DtHdrPostProcessor.h:139
Class to manage disconnection of boost connections on deletion.
Definition: DtSignalConnectionManager.h:24
osg::ref_ptr< DtHdrDrawable > myHdrDrawable
Definition: DtHdrPostProcessor.h:138
virtual ~DtHdrPostProcessorCreator()
DTOR.
#define DT_DLL_VRVPOSTPROCESSOR
Definition: vrvPostProcessor.h:19
Definition: DtHdrPostProcessor.h:145
This file contains the declaration of the class DtHdrDrawable which is used for rendering HDR post pr...
int myViewWidth
Definition: DtHdrPostProcessor.h:135
DtDe & myDe
Definition: DtHdrPostProcessor.h:131
int myViewY
Definition: DtHdrPostProcessor.h:134
Contains DLL export macros.
Base class to provide boost signal/slot management.
The DtDe is the core component of any VR-Vantage application.
Definition: DtDe.h:69
int myViewX
Definition: DtHdrPostProcessor.h:133
This class provides the OSG-specific implementation of a post processor.
Definition: DtPostProcessor.h:62

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)