LightFlareData

consoledoc.h

Defines a light flare effect usable by scene lights.

More...

LightFlareData

float

Size scale applied to all elements of the flare.

float

If positive an occlusion query is used to test flare visibility, else it uses simple raycasts.

bool

If false the flare does not render in reflections, else only non-zero distance elements are rendered.

FlareElements

bool

Allows the user to disable this flare globally for any lights referencing it.

filename

The texture / sprite sheet for this flare.

RectF

A rectangle specified in pixels of the flareTexture image.

float

Where this element appears along the flare beam.

float

Size scale applied to this element.

LinearColorF

Used to modulate this element's color if elementUseLightColor is false.

bool

Defines if this element orients to point along the flare beam or if it is always upright.

bool

If true this element's color is modulated by the light color. If false, elementTint will be used.

Public Functions

void

Intended as a helper to developers and editor scripts.

Detailed Description

Defines a light flare effect usable by scene lights.

LightFlareData is a datablock which defines a type of flare effect. This may then be referenced by other classes which support the rendering of a flare: Sun, ScatterSky, LightBase.

A flare contains one or more elements defined in the element* named fields of LightFlareData, with a maximum of ten elements. Each element is rendered as a 2D sprite in screenspace.

// example from Full Template, core/art/datablocks/lights.cs
datablock LightFlareData( LightFlareExample0 )
{
   overallScale = 2.0;
   flareEnabled = true;
   renderReflectPass = true;
   flareTexture = "./../special/lensFlareSheet1";
   occlusionRadius = 0.25;
   
   elementRect[0] = "0 512 512 512";
   elementDist[0] = 0.0;
   elementScale[0] = 0.5;
   elementTint[0] = "1.0 1.0 1.0";
   elementRotate[0] = false;
   elementUseLightColor[0] = false;
   
   elementRect[1] = "512 0 512 512";
   elementDist[1] = 0.0;
   elementScale[1] = 2.0;
   elementTint[1] = "0.5 0.5 0.5";
   elementRotate[1] = false;
   elementUseLightColor[1] = false;
};
The elementDist field defines where along the flare's beam the element appears. A distance of 0.0 is directly over the light source, a distance of 1.0 is at the screen center, and a distance of 2.0 is at the position of the light source mirrored across the screen center.

LightFlareData

float overallScale 

Size scale applied to all elements of the flare.

float occlusionRadius 

If positive an occlusion query is used to test flare visibility, else it uses simple raycasts.

bool renderReflectPass 

If false the flare does not render in reflections, else only non-zero distance elements are rendered.

FlareElements

bool flareEnabled 

Allows the user to disable this flare globally for any lights referencing it.

filename flareTexture 

The texture / sprite sheet for this flare.

RectF elementRect [20]

A rectangle specified in pixels of the flareTexture image.

float elementDist [20]

Where this element appears along the flare beam.

float elementScale [20]

Size scale applied to this element.

LinearColorF elementTint [20]

Used to modulate this element's color if elementUseLightColor is false.

bool elementRotate [20]

Defines if this element orients to point along the flare beam or if it is always upright.

bool elementUseLightColor [20]

If true this element's color is modulated by the light color. If false, elementTint will be used.

Public Functions

apply()

Intended as a helper to developers and editor scripts.

Force trigger an inspectPostApply