addLight

open fun addLight(position: ERROR CLASS: Symbol not found for Triple<kotlin/Float, kotlin/Float, kotlin/Float>, target: ERROR CLASS: Symbol not found for Triple<kotlin/Float, kotlin/Float, kotlin/Float> = 0F to 0F to 0F, color: Color = Color.WHITE, directional: Boolean = true)

Adds a light to the shader.

Parameters

position

The position of the light in 3D space.

target

The target point the light is pointing to.

color

The color of the light. Defaults to white.

directional

Whether the light is directional or point light. If the light is directional, the position is treated as a direction vector. If the light is a point, the light will attenuate with distance.


open fun addLight(x: Float, y: Float, z: Float, targetX: Float = 0.0f, targetY: Float = 0.0f, targetZ: Float = 0.0f, color: Color = Color.WHITE, directional: Boolean = true)

Adds a light to the shader using individual float parameters for position and target.

Parameters

x

The x-coordinate of the light's position.

y

The y-coordinate of the light's position.

z

The z-coordinate of the light's position.

targetX

The x-coordinate of the light's target point.

targetY

The y-coordinate of the light's target point.

targetZ

The z-coordinate of the light's target point.

color

The color of the light. Defaults to white.

directional

Whether the light is directional or point light. If the light is directional, the position is treated as a direction vector. If the light is a point, the light will attenuate with distance.