NAP
fadeshader.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 
17  // FadeShader sampler names
18  namespace uniform
19  {
20  namespace fade
21  {
22  inline constexpr const char* uboStruct = "UBO";
23  inline constexpr const char* color = "color";
24  inline constexpr const char* alpha = "alpha";
25  }
26  }
27 
41  class NAPAPI FadeShader : public Shader
42  {
43  RTTI_ENABLE(Shader)
44  public:
45  FadeShader(Core& core);
46 
52  virtual bool init(utility::ErrorState& errorState) override;
53 
54  private:
55  RenderAdvancedService* mRenderAdvancedService = nullptr;
56  };
57 }
nap::FadeShader
Definition: fadeshader.h:41
nap::RenderAdvancedService
Definition: renderadvancedservice.h:99
nap::uniform::fade::uboStruct
constexpr const char * uboStruct
Name of the uniform struct.
Definition: fadeshader.h:22
nap::utility::ErrorState
Definition: errorstate.h:19
nap::uniform::fade::alpha
constexpr const char * alpha
Name of the alpha uniform.
Definition: fadeshader.h:24
nap::Shader
Definition: shader.h:105
nap::Core
Definition: core.h:82
nap
Definition: templateapp.h:17
nap::uniform::fade::color
constexpr const char * color
Name of the color uniform.
Definition: fadeshader.h:23