NAP
blinnphongtextureshader.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 blinnphongtexture
23  {
24  namespace sampler
25  {
26  inline constexpr const char* colorTexture = "colorTexture";
27  inline constexpr const char* environmentMap = "environmentMap";
28  }
29 
30  inline constexpr const char* ambient = "ambient";
31  inline constexpr const char* diffuse = "diffuse";
32  inline constexpr const char* specular = "specular";
33  inline constexpr const char* fresnel = "fresnel";
34  inline constexpr const char* shininess = "shininess";
35  inline constexpr const char* alpha = "alpha";
36  inline constexpr const char* reflection = "reflection";
37  inline constexpr const char* environment = "environment";
38 
39  inline constexpr const char* uboStruct = "UBO";
40  }
41  }
42 
73  class NAPAPI BlinnPhongTextureShader : public Shader
74  {
75  RTTI_ENABLE(Shader)
76  public:
78 
84  virtual bool init(utility::ErrorState& errorState) override;
85 
86  private:
87  RenderAdvancedService* mRenderAdvancedService = nullptr;
88  };
89 }
nap::uniform::blinnphongtexture::fresnel
constexpr const char * fresnel
Fresnel [scale, power].
Definition: blinnphongtextureshader.h:33
nap::RenderAdvancedService
Definition: renderadvancedservice.h:99
nap::uniform::blinnphongtexture::sampler::environmentMap
constexpr const char * environmentMap
Name of the environment map sampler.
Definition: blinnphongtextureshader.h:27
nap::utility::ErrorState
Definition: errorstate.h:19
nap::uniform::blinnphongtexture::reflection
constexpr const char * reflection
Reflection [0, 1].
Definition: blinnphongtextureshader.h:36
nap::uniform::blinnphongtexture::diffuse
constexpr const char * diffuse
Diffuse color material property.
Definition: blinnphongtextureshader.h:31
nap::uniform::blinnphongtexture::shininess
constexpr const char * shininess
Shininess [0, x].
Definition: blinnphongtextureshader.h:34
nap::uniform::blinnphongtexture::uboStruct
constexpr const char * uboStruct
UBO that contains all the uniforms.
Definition: blinnphongtextureshader.h:39
nap::Shader
Definition: shader.h:105
nap::uniform::blinnphongtexture::specular
constexpr const char * specular
Specular color material property.
Definition: blinnphongtextureshader.h:32
nap::Core
Definition: core.h:82
nap::uniform::blinnphongtexture::alpha
constexpr const char * alpha
Alpha [0, 1].
Definition: blinnphongtextureshader.h:35
nap
Definition: templateapp.h:17
nap::uniform::blinnphongtexture::ambient
constexpr const char * ambient
Ambient color material property.
Definition: blinnphongtextureshader.h:30
nap::BlinnPhongTextureShader
Definition: blinnphongtextureshader.h:73
nap::uniform::blinnphongtexture::sampler::colorTexture
constexpr const char * colorTexture
Name of the color texture sampler.
Definition: blinnphongtextureshader.h:26
nap::uniform::blinnphongtexture::environment
constexpr const char * environment
Whether to sample an environment map [0, 1].
Definition: blinnphongtextureshader.h:37