NAP
blinnphongcolorshader.h
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2  * License, v. 2.0. If a copy of the MPL was not distributed with this
3  * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
4 
5 #pragma once
6 
7 // External Includes
8 #include <nap/resource.h>
9 #include <shader.h>
10 
11 namespace nap
12 {
13  // Forward declares
14  class Core;
15  class RenderAdvancedService;
16 
20  namespace uniform
21  {
22  namespace blinnphongcolor
23  {
24  namespace sampler
25  {
26  inline constexpr const char* environmentMap = "environmentMap";
27  }
28 
29  inline constexpr const char* ambient = "ambient";
30  inline constexpr const char* diffuse = "diffuse";
31  inline constexpr const char* specular = "specular";
32  inline constexpr const char* fresnel = "fresnel";
33  inline constexpr const char* shininess = "shininess";
34  inline constexpr const char* alpha = "alpha";
35  inline constexpr const char* reflection = "reflection";
36  inline constexpr const char* environment = "environment";
37  inline constexpr const char* uboStruct = "UBO";
38  }
39  }
40 
70  class NAPAPI BlinnPhongColorShader : public Shader
71  {
72  RTTI_ENABLE(Shader)
73  public:
75 
81  virtual bool init(utility::ErrorState& errorState) override;
82 
83  private:
84  RenderAdvancedService* mRenderAdvancedService = nullptr;
85  };
86 }
nap::uniform::blinnphongcolor::ambient
constexpr const char * ambient
Ambient color material property.
Definition: blinnphongcolorshader.h:29
nap::uniform::blinnphongcolor::uboStruct
constexpr const char * uboStruct
UBO that contains all the uniforms.
Definition: blinnphongcolorshader.h:37
nap::uniform::blinnphongcolor::environment
constexpr const char * environment
Whether to sample an environment map [0, 1].
Definition: blinnphongcolorshader.h:36
nap::uniform::blinnphongcolor::alpha
constexpr const char * alpha
Alpha [0, 1].
Definition: blinnphongcolorshader.h:34
nap::uniform::blinnphongcolor::fresnel
constexpr const char * fresnel
Fresnel [scale, power].
Definition: blinnphongcolorshader.h:32
nap::RenderAdvancedService
Definition: renderadvancedservice.h:99
nap::utility::ErrorState
Definition: errorstate.h:19
nap::Shader
Definition: shader.h:105
nap::uniform::blinnphongcolor::shininess
constexpr const char * shininess
Shininess [0, x].
Definition: blinnphongcolorshader.h:33
nap::Core
Definition: core.h:82
nap::uniform::blinnphongcolor::sampler::environmentMap
constexpr const char * environmentMap
Name of the environment map sampler.
Definition: blinnphongcolorshader.h:26
nap
Definition: templateapp.h:17
nap::uniform::blinnphongcolor::specular
constexpr const char * specular
Specular color material property.
Definition: blinnphongcolorshader.h:31
nap::uniform::blinnphongcolor::reflection
constexpr const char * reflection
Reflection [0, 1].
Definition: blinnphongcolorshader.h:35
nap::uniform::blinnphongcolor::diffuse
constexpr const char * diffuse
Diffuse color material property.
Definition: blinnphongcolorshader.h:30
nap::BlinnPhongColorShader
Definition: blinnphongcolorshader.h:70