#include <Light.hpp>
◆ LightType
Enumerator |
---|
Directional | |
Spot | |
Point | |
◆ color
vec<float, 3> dz::ecs::Light::color |
◆ direction
vec<float, 3> dz::ecs::Light::direction |
◆ GLSLMain
std::vector<std::tuple<float, std::string, ShaderModuleType> > dz::ecs::Light::GLSLMain |
|
inlinestatic |
Initial value:= {
{3.5f, R"(
vec3 frag_pos = vec3(inPosition);
vec3 view_dir = normalize(camera.position - frag_pos);
int lights_size = Lights.data.length();
vec3 light_color = vec3(0.0);
for (int light_index = 0; light_index < lights_size; light_index++) {
light_color += CalculateLight(inNormal, frag_pos, view_dir, Lights.data[light_index]);
}
current_color = vec4(light_color, 1.0) * current_color;
}
@ Fragment
Definition Shader.hpp:17
◆ GLSLMethods
◆ GLSLStruct
std::string dz::ecs::Light::GLSLStruct |
|
inlinestatic |
Initial value:= R"(
struct Light {
int type;
float intensity;
float range;
float innerCone;
vec3 position;
int padding1;
vec3 direction;
int padding2;
vec3 color;
float outerCone;
};
)"
◆ innerCone
float dz::ecs::Light::innerCone |
◆ intensity
float dz::ecs::Light::intensity |
◆ outerCone
float dz::ecs::Light::outerCone |
◆ padding1
int dz::ecs::Light::padding1 = 0 |
◆ padding2
int dz::ecs::Light::padding2 = 0 |
◆ PID
size_t dz::ecs::Light::PID = 4 |
|
inlinestaticconstexpr |
◆ position
vec<float, 3> dz::ecs::Light::position |
◆ Priority
float dz::ecs::Light::Priority = 3.5f |
|
inlinestatic |
◆ ProviderName
std::string dz::ecs::Light::ProviderName = "Light" |
|
inlinestatic |
◆ range
float dz::ecs::Light::range |
◆ StructName
std::string dz::ecs::Light::StructName = "Light" |
|
inlinestatic |
◆ type
int dz::ecs::Light::type = 0 |
The documentation for this struct was generated from the following file: