All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
HeatmapShapeShader.h
1 #pragma once
2 
3 #include "Shader.h"
4 #include "IdTypes.h"
5 #include "Graphics.h"
6 #include "VectorMath.h"
7 #include "Rendering.h"
8 #include <string>
9 
10 namespace Eegeo
11 {
12  namespace Shapes
13  {
14  namespace Heatmaps
15  {
17  {
18  public:
19  static HeatmapShapeShader* Create(const Rendering::TShaderId shaderId);
20 
21  void Use(Rendering::GLState& glState) const;
22 
23  void SetMVP(const m44& mvp) const;
24 
25  void SetOpacity(float opacity) const;
26 
27  void SetGradientSaturation(float colorSaturation) const;
28 
29  void SetGradientBrightness(float colorIntensity) const;
30 
31  void SetIntensityBias(float intensityBias) const;
32 
33  void SetIntensityScale(float intensityScale) const;
34 
35  void SetIntensityUnpack(const v2& unpack) const;
36 
37  void SetDensityBlend(float densityBlend) const;
38 
39  GLuint GetIntensityMinRadiusSamplerId() const { return 0; }
40 
41  GLuint GetIntensityMaxRadiusSamplerId() const { return 1; }
42 
43  GLuint GetGradientSamplerId() const { return 2; }
44 
45  protected:
47  const Rendering::TShaderId shaderId,
48  const std::string& vertexShaderCode,
49  const std::string& fragmentShaderCode
50  );
51 
52  private:
53  GLuint m_mvpUniformLocation;
54  GLuint m_intensityMinRadiusTextureSamplerUniformLocation;
55  GLuint m_intensityMaxRadiusTextureSamplerUniformLocation;
56  GLuint m_gradientTextureSamplerUniformLocation;
57  GLuint m_densityBlendUniformLocation;
58  GLuint m_intensityBiasUniformLocation;
59  GLuint m_intensityScaleUniformLocation;
60  GLuint m_intensityUnpackUniformLocation;
61  GLuint m_opacityUniformLocation;
62  GLuint m_gradientSaturationUniformLocation;
63  GLuint m_gradientBrightnessUniformLocation;
64  };
65  }
66  }
67 }