raisin::AdditionalLight
struct · #include <rayrai/RenderQuality.hpp>
Lightweight imported or viewer light used for extra fill/rim lighting.
Extra lights are shading-only by default and are capped to keep the fast one-light path available. One of them can be promoted to the main shadow-casting light.
Public attributes
type
LightType typeLight model.
position
glm::vec3 positionWorld position, metres (point/spot/area).
direction
glm::vec3 directionDirection the light travels (directional/spot); normalized when added.
ambient
glm::vec3 ambientAmbient color contribution (linear RGB).
diffuse
glm::vec3 diffuseDiffuse color/intensity (linear RGB).
specular
glm::vec3 specularSpecular color/intensity (linear RGB).
constant
float constantAttenuation: intensity / (constant + linear * d + quadratic * d^2).
linear
float linearLinear attenuation term, 1/m.
quadratic
float quadraticQuadratic attenuation term, 1/m^2.
spotInnerCos
float spotInnerCosCosine of the full-intensity spot cone half-angle (swapped with outer if smaller).
spotOuterCos
float spotOuterCosCosine of the spot cutoff half-angle.
radius
float radiusLight source size, metres: the attenuation distance is at least this (a quarter, min 0.1 m, for area lights). Not a cutoff.
areaSize
glm::vec2 areaSizeArea-light extents along areaRight/areaUp, metres.
areaRight
glm::vec3 areaRightArea-light width axis.
areaUp
glm::vec3 areaUpArea-light height axis.
projectorMap
unsigned int projectorMapOptional GL 2D texture projected by the light; 0 = none.
projectorStrength
float projectorStrengthProjector blend, [0, 1].
projectorUvScaleOffset
glm::vec4 projectorUvScaleOffsetProjector UV transform (scale.xy, offset.zw).
negative
bool negativeSubtract this light's contribution instead of adding it.
temperatureEnabled
bool temperatureEnabledTint the light by temperatureKelvin.
temperatureKelvin
float temperatureKelvinColor temperature, kelvin.
distanceFadeEnabled
bool distanceFadeEnabledFade non-directional lights by distance from the camera.
distanceFadeBegin
float distanceFadeBeginCamera distance where the light fade starts, metres.
distanceFadeShadow
float distanceFadeShadowCamera distance where the shadow fade starts, metres.
distanceFadeLength
float distanceFadeLengthLength of the smooth fade band, metres.
castsShadows
bool castsShadowsAllow this light to be selected for a shadow map.