distant light item

Used for operations concerning individual distant lights.
Distant light settings are composed of one or more distant light items; the distant_light_item class expresses one of those distant light items.


xshade
scene
distant_light
distant_light_item

List of Properties

ambient Ambient light
diffuse Diffuse reflection
direction Direction of the light
glare Glare
has_shadow_map_bias Whether the light has intrinsic shadow map bias
has_shadow_map_blur Whether the light has intrinsic shadow map blur
has_shadow_map_size Whether the light has intrinsic shadow map size
intensity The light intensity
light_color The light color
shadow Shadow
shadow_map_bias The light's shadow map bias
shadow_map_blur The light's shadow map blur
shadow_map_size The light's shadow map size
shadow_type The light's shadow type
size The distant light size
softness Shadow softness
specular Specular reflection strength




Used by getting a distant light with xshade.scene().distant_light.distant_light_item(0).

Property Details

ambient

Ambient light.

  • Get
  • Set

Type :
  float

print xshade.scene().distant_light.distant_light_item(0).ambient

diffuse

Diffuse reflection.

  • Get
  • Set

Type :
  float

print xshade.scene().distant_light.distant_light_item(0).diffuse

direction

Direction of the light.

  • Get
  • Set

Type :
  vec3

print xshade.scene().distant_light.distant_light_item(0).direction

glare

Glare.

  • Get
  • Set

Type :
  float

print xshade.scene().distant_light.distant_light_item(0).glare

has_shadow_map_bias

Whether the light has intrinsic shadow map bias.

  • Get
  • Set

Type :
  bool

print xshade.scene().distant_light.distant_light_item(0).has_shadow_map_bias

has_shadow_map_blur

Whether the light has intrinsic shadow map blur.

  • Get
  • Set

Type :
  bool

print xshade.scene().distant_light.distant_light_item(0).has_shadow_map_blur

has_shadow_map_size

Whether the light has intrinsic shadow map size.

  • Get
  • Set

Type :
  bool

print xshade.scene().distant_light.distant_light_item(0).has_shadow_map_size

intensity

The light intensity.

  • Get
  • Set

Type :
  float

print xshade.scene().distant_light.distant_light_item(0).intensity

light_color

The light color.

  • Get
  • Set

Type :
  rgb

print xshade.scene().distant_light.distant_light_item(0).light_color

shadow

Shadow.

  • Get
  • Set

Type :
  float

print xshade.scene().distant_light.distant_light_item(0).shadow

shadow_map_bias

The light's shadow map bias.

  • Get
  • Set

Type :
  float
Returns an incorrect value if has_shadow_map_bias is not on.

print xshade.scene().distant_light.distant_light_item(0).shadow_map_bias

shadow_map_blur

The light's shadow map blur.

  • Get
  • Set

Type :
  float
Returns an incorrect value if has_shadow_map_blur is not on.

print xshade.scene().distant_light.distant_light_item(0).shadow_map_blur

shadow_map_size

The light's shadow map size.

  • Get
  • Set

Type :
  int
Returns an incorrect value if has_shadow_map_size is not on.

print xshade.scene().distant_light.distant_light_item(0).shadow_map_size

shadow_type

The light's shadow type.

  • Get
  • Set

Type :
  int : 0 : Inherit, 1 : Ray Tracing, 2 : Shadow Map

print xshade.scene().distant_light.distant_light_item(0).shadow_type

size

The distant light size.

  • Get
  • Set

Type :
  float

print xshade.scene().distant_light.distant_light_item(0).size

softness

Shadow softness.

  • Get
  • Set

Type :
  float

print xshade.scene().distant_light.distant_light_item(0).softness

specular

Specular reflection strength.

  • Get
  • Set

Type :
  float

print xshade.scene().distant_light.distant_light_item(0).specular