Skip to content

Latest commit

 

History

History
110 lines (71 loc) · 2.11 KB

File metadata and controls

110 lines (71 loc) · 2.11 KB

Components that let entities emit light.

Specs

Common part

color

putils::Vector3f color;

Normalized color.

diffuseStrength, specularStrength

float diffuseStrength;
float specularStrength;

castShadows

bool castShadows = true;

shadowPCFSamples

int shadowPCFSamples = 1;

Number of samples to take into account for Percentage Closer Filtering. Increasing this will reduce shadow aliasing at the cost of GPU processing time.

shadowMapSize

int shadowMapSize = 1024;

Size of the shadow map texture. Increasing this will increase shadow accuracy at the cost of GPU memory.

shadowMapBias

float shadowMapBias = .00001f;

Bias applied when reading the shadow map. Increasing this will reduce "shadow acne", but also increase the risk of shadows not being applied properly.

DirLightComponent

Used to represent a directional light, such as the sun.

direction

putils::Vector3f direction;

ambientStrength

float ambientStrength;

cascadeEnds

float cascadeEnds[KENGINE_CSM_COUNT] = { 50.f };

Distances for each "cascade" of the Cascaded Shadow Map.

PointLightComponent

Used to represent a point light, such as a light bulb.

constant, linear, quadratic

float constant = 1.f;
float linear = .09f;
float quadratic = .032f;

Reference values provided by Ogre3D.

SpotLightComponent

Used to represent a spot light, such as a flash light. Inherits from PointLightComponent.

direction

putils::Vector3f direction;

cutOff, outerCutoff

float cutOff = std::cos(12.5f);
float outerCutOff = std::cos(15.f);