PCG-FPS
v2 m0.22.4
Simple First Person Shooter with Procedurally Generated Level
|
Go to the documentation of this file. 1 #ifndef SKR_FPS2_RENDERER_OPENGL_POINTLIGHT_H
2 #define SKR_FPS2_RENDERER_OPENGL_POINTLIGHT_H
38 std::array<float, 3> pos,
66 #pragma region Inline functions to generate names for shader variables
164 #endif // !SKR_FPS2_RENDERER_OPENGL_POINTLIGHT_H
glm::vec3 _ambientColor
ambient color
Definition: PointLight.h:146
constexpr glm::vec3 Default_Specular_Color
default specular color
Definition: PointLight.h:17
static const std::string _PointLightMultipleName
name template of pointlight in shader if multiple are used
Definition: PointLight.h:155
static std::string GetPositionName()
function to generate name of position for shader variable
Definition: PointLight.cpp:38
float _linear
attenuation linear factor
Definition: PointLight.h:151
glm::vec3 _specularColor
specular color
Definition: PointLight.h:148
void SetBasicLight(Shader shader, PointLight pl, glm::vec3 diffColor)
set basic light properties in given shader
Definition: PointLight.cpp:126
static const std::string _PointLightSingleName
name template of pointlight in shader
Definition: PointLight.h:156
constexpr glm::vec3 Default_Ambient_Color
default ambient color
Definition: PointLight.h:15
glm::vec3 _diffuseColor
diffuse color
Definition: PointLight.h:147
PointLight(std::array< float, 3 > pos, glm::vec3 ambientColor=Default_Ambient_Color, glm::vec3 diffuseColor=Default_Diffuse_Color, glm::vec3 specularColor=Default_Specular_Color, float constant=Default_Attenuation_Constant, float linear=Default_Attenuation_Linear, float quadratic=Default_Attenuation_Quadratic)
contructor
Definition: PointLight.cpp:21
constexpr glm::vec3 Default_Diffuse_Color
default diffuse color
Definition: PointLight.h:16
handles shader loading, compiling and linking. Also provides access to set uniform ids and usage.
Definition: Shader.h:31
constexpr float Default_Attenuation_Constant
default attenuation constant factor
Definition: PointLight.h:19
void SetPointLight(Shader shader)
set light properties in given shader
Definition: PointLight.cpp:136
float _quadratic
attenuation quadrtic factor
Definition: PointLight.h:152
void SetBasicLighting(Shader shader)
set basic light properties in given shader
Definition: PointLight.cpp:110
static std::string GetConstantName()
function to generate name of attenuation constant factor for shader variable
Definition: PointLight.cpp:78
float _constant
attenuation constant factor
Definition: PointLight.h:150
Definition: AssetPath.h:10
static std::string GetAmbientName()
function to generate name of ambient color for shader variable
Definition: PointLight.cpp:48
glm::vec3 _position
position
Definition: PointLight.h:144
static std::string GetQuadraticName()
function to generate name of attenuation quadratic factor for shader variable
Definition: PointLight.cpp:98
constexpr float Default_Attenuation_Quadratic
default attenuation quadratic factor
Definition: PointLight.h:21
defines a point light, emitting light in all directions
Definition: PointLight.h:26
static std::string GetSpecularName()
function to generate name of specular color for shader variable
Definition: PointLight.cpp:68
constexpr float Default_Attenuation_Linear
default attenuation linear factor
Definition: PointLight.h:20
static std::string GetLinearName()
function to generate name of attenuation linear factor for shader variable
Definition: PointLight.cpp:88
static std::string GetDiffuseName()
function to generate name of diffuse color for shader variable
Definition: PointLight.cpp:58