IRaptorRtLightSource
Reads one light system's scene lights for the Ray-traced preview and the Lights tool.
| Namespace | Assembly | Kind | Stability |
|---|---|---|---|
Raptor.Render.EditorTools | RaptorRender.Editor | interface | preview, since 0.1.0 |
A source packs its lights into the RT GPU layout (RaptorRtLight) and names the components the Lights tool lists, picks and edits. Its Id matches the IRaptorLightBackend.Id of the backend that owns those lights, and the active light backend selects the source (RaptorRtLightSources.Active).
public interface IRaptorRtLightSourceProperties
Id
string Id { get; }The id of the light backend this source reads: RaptorLightBackends.BakeryId, UnityId, or an added backend's id.
LightTypes
IReadOnlyList<Type> LightTypes { get; }The light component types this source reads. Contains no null entries, and is empty when the light system is not installed.
Methods
Gather
int Gather(RaptorRtSceneSettings settings, List<RaptorRtLight> lights, List<Vector4> areaTris, List<float> areaCdf, out int hash, out Cubemap skyCube, out Matrix4x4 skyRotation)Fills the GPU light list, the area-light triangles and the per-light CDF for the current scene, and returns the light count. hash changes whenever any input changes; the preview re-uploads only then.
| Parameter | Type | Description |
|---|---|---|
settings | RaptorRtSceneSettings | The scene settings. |
lights | List<RaptorRtLight> | Filled with the GPU light list. |
areaTris | List<Vector4> | Filled with the area-light triangles. |
areaCdf | List<float> | Filled with the area lights' per-light CDF. |
hash | out int | A hash of what was read. |
skyCube | out Cubemap | The sky cubemap, or null. |
skyRotation | out Matrix4x4 | The sky's rotation. |
Returns: The light count.
ReadSettings
RaptorRtSceneSettings ReadSettings()Returns the scene's global settings that affect how a bake looks. Does not create anything.
Returns: The settings.
Traces
bool Traces(Component light)Returns whether this source traces light, a component of one of the LightTypes.
| Parameter | Type | Description |
|---|---|---|
light | Component | The light. |
Returns: True if it is traced.
Related types
- RaptorRtSceneSettings: Scene-wide settings from a light source that affect how a bake looks.
- RaptorRtLightSources: The Ray-traced preview's light sources.
- IRaptorLightBackend: Supplies the component on a placed RAPTOR light: a Bakery light when Bakery is installed, otherwise a Unity Light.
- RaptorLightBackends: The light backend registry.