Difference between revisions of "LSL Constants/llGetEnvironment"
Jump to navigation
Jump to search
Rider Linden (talk | contribs) |
(Formatting update.) |
||
Line 1: | Line 1: | ||
{{LSL_Function/color|color}} | |||
==Parameters== | ==Parameters== | ||
{| class="sortable" {{Prettytable}} | {| class="sortable" {{Prettytable}} | ||
Line 7: | Line 9: | ||
!description | !description | ||
|- | |- | ||
|SKY_TRACKS | |[[SKY_TRACKS]] | ||
|15 | |15 | ||
|float sky2, float sky3, float sky4 | |[[float]] sky2, [[float]] sky3, [[float]] sky4 | ||
|Altitudes for sky transitions in the region. | |Altitudes for sky transitions in the region. | ||
|- | |- | ||
|SKY_AMBIENT | |[[SKY_AMBIENT]] | ||
|0 | |0 | ||
|vector ambient_color | |[[vector]] ambient_color | ||
|The ambient color of the environment. | |The ambient color of the environment. | ||
|- | |- | ||
|SKY_TEXTURE_DEFAULTS | |[[SKY_TEXTURE_DEFAULTS]] | ||
|1 | |1 | ||
|integer bloom_is_default, integer halo_is_default, integer rainbow_is_default | |[[integer]] bloom_is_default, [[integer]] halo_is_default, [[integer]] rainbow_is_default | ||
|Checks if the textures are currently set to use the default. For default values, the returned integer is 1. If the texture uses something other than the default, the returned value is 0. | |Checks if the textures are currently set to use the default. For default values, the returned integer is 1. If the texture uses something other than the default, the returned value is 0. | ||
|- | |- | ||
|SKY_CLOUDS | |[[SKY_CLOUDS]] | ||
|2 | |2 | ||
|vector color, float coverage, float scale, float variance, vector scroll, vector density, vector detail, integer is_default | |[[vector]] {{LSL Param|color}}, [[float]] coverage, [[float]] scale, [[float]] variance, [[vector]] scroll, [[vector]] density, [[vector]] detail, [[integer]] is_default | ||
|Environmental cloud information. | |Environmental cloud information. | ||
* color: The color used for the clouds. | * color: The color used for the clouds. | ||
Line 38: | Line 40: | ||
* is_default: 1 if the clouds are using the default texture. | * is_default: 1 if the clouds are using the default texture. | ||
|- | |- | ||
|SKY_DOME | |[[SKY_DOME]] | ||
|4 | |4 | ||
|float offset, float radius, float max_altitude | |[[float]] offset, [[float]] radius, [[float]] max_altitude | ||
|Sky dome information. | |Sky dome information. | ||
* offset | * offset | ||
Line 46: | Line 48: | ||
* maximum altitude | * maximum altitude | ||
|- | |- | ||
|SKY_GAMMA | |[[SKY_GAMMA]] | ||
|5 | |5 | ||
|float gamma | |[[float]] gamma | ||
|The gamma value applied to the scene. | |The gamma value applied to the scene. | ||
|- | |- | ||
|SKY_GLOW | |[[SKY_GLOW]] | ||
|6 | |6 | ||
|float glow_size, float glow_focus | |[[float]] glow_size, [[float]] glow_focus | ||
|Glow applied to the sun and moon. | |Glow applied to the sun and moon. | ||
* size of glow effect | * size of glow effect | ||
* focus of glow effect | * focus of glow effect | ||
|- | |- | ||
|SKY_MOON | |[[SKY_MOON]] | ||
|9 | |9 | ||
|rotation rot, float scale, float brightness, integer is_default_texture, vector direction, vector ambient_color, vector diffuse_color | |[[rotation]] {{LSL Param|rot}}, [[float]] scale, [[float]] brightness, [[integer]] is_default_texture, [[vector]] direction, [[vector]] ambient_color, [[vector]] diffuse_color | ||
|Detailed moon information | |Detailed moon information | ||
* rot: The current rotation applied to the moon. | * rot: The current rotation applied to the moon. | ||
Line 70: | Line 72: | ||
* diffuse_color: The diffuse color applied to the moon. | * diffuse_color: The diffuse color applied to the moon. | ||
|- | |- | ||
|SKY_STAR_BRIGHTNESS | |[[SKY_STAR_BRIGHTNESS]] | ||
|13 | |13 | ||
|float brightness | |[[float]] brightness | ||
| | | | ||
|- | |- | ||
|SKY_SUN | |[[SKY_SUN]] | ||
|14 | |14 | ||
|rotation rot, float scale, vector sun_color, integer is_default_texture, vector direction, vector ambient_color, vector diffuse_color | |[[rotation]] rot, [[float]] scale, [[vector]] sun_color, [[integer]] is_default_texture, [[vector]] direction, [[vector]] ambient_color, [[vector]] diffuse_color | ||
|Detailed sun information | |Detailed sun information | ||
* rot: The current rotation applied to the sun. | * rot: The current rotation applied to the sun. | ||
Line 87: | Line 89: | ||
* diffuse_color: The diffuse color applied to the sun. | * diffuse_color: The diffuse color applied to the sun. | ||
|- | |- | ||
|SKY_PLANET | |[[SKY_PLANET]] | ||
|10 | |10 | ||
|float planet_radius, float sky_bottom_radius, float sky_top_radius | |[[float]] planet_radius, [[float]] sky_bottom_radius, [[float]] sky_top_radius | ||
|Planet information used in rendering the sky | |Planet information used in rendering the sky | ||
* planet_radius | * planet_radius | ||
Line 95: | Line 97: | ||
* sky_top_radius | * sky_top_radius | ||
|- | |- | ||
|SKY_REFRACTION | |[[SKY_REFRACTION]] | ||
|11 | |11 | ||
|float moisture_level, float droplet_radius, float ice_level | |[[float]] moisture_level, [[float]] droplet_radius, [[float]] ice_level | ||
|Sky refraction parameters for rainbows and optical effects. | |Sky refraction parameters for rainbows and optical effects. | ||
* moisture_level | * moisture_level | ||
Line 103: | Line 105: | ||
* ice_level | * ice_level | ||
|- | |- | ||
|SKY_LIGHT | |[[SKY_LIGHT]] | ||
|8 | |8 | ||
|vector light_direction, vector unused, vector total_ambient | |[[vector]] light_direction, [[vector]] unused, [[vector]] total_ambient | ||
|Miscellaneous lighting values | |Miscellaneous lighting values | ||
* light_direction: unit vector indicating the direction of the dominant light source. | * light_direction: unit vector indicating the direction of the dominant light source. | ||
* unused: Returns a value - unknown use. | |||
* total_ambient: (TBC) | |||
|- | |- | ||
|WATER_BLUR_MULTIPLIER | |[[WATER_BLUR_MULTIPLIER]] | ||
|100 | |100 | ||
|float multiplier | |[[float]] multiplier | ||
|Multiplier applied to blur the scene when under water. | |Multiplier applied to blur the scene when under water. | ||
|- | |- | ||
|WATER_FOG | |[[WATER_FOG]] | ||
|101 | |101 | ||
|vector color, float density, float modulation | |[[vector]] {{LSL_Function/color|color}}, [[float]] density, [[float]] modulation | ||
|Fog parameters applied when underwater | |Fog parameters applied when underwater | ||
* color: The color of the underwater fog | * color: The color of the underwater fog | ||
Line 122: | Line 126: | ||
* modulation: | * modulation: | ||
|- | |- | ||
|WATER_FRESNEL | |[[WATER_FRESNEL]] | ||
|102 | |102 | ||
|float offset, float scale | |[[float]] offset, [[float]] scale | ||
|Fresnel scattering applied to the surface of the water. | |Fresnel scattering applied to the surface of the water. | ||
* offset | * offset | ||
* scale | * scale | ||
|- | |- | ||
|WATER_TEXTURE_DEFAULTS | |[[WATER_TEXTURE_DEFAULTS]] | ||
|103 | |103 | ||
|integer normal_is_default, integer transparent_is_default | |[[integer]] normal_is_default, [[integer]] transparent_is_default | ||
|Checks if the textures are currently set to use the default. For default values the returned integer is 1, if the texture uses something other than the default this value is 0. | |Checks if the textures are currently set to use the default. For default values the returned integer is 1, if the texture uses something other than the default this value is 0. | ||
|- | |- | ||
|WATER_NORMAL_SCALE | |[[WATER_NORMAL_SCALE]] | ||
|104 | |104 | ||
|vector scale | |[[vector]] scale | ||
|Scaling applied to the water normal map. | |Scaling applied to the water normal map. | ||
|- | |- | ||
|WATER_REFRACTION | |[[WATER_REFRACTION]] | ||
|105 | |105 | ||
|float scale_above, float scale_below | |[[float]] scale_above, [[float]] scale_below | ||
|Refraction factors when looking through the surface of the water. | |Refraction factors when looking through the surface of the water. | ||
* scale_above | * scale_above | ||
* scale_below | * scale_below | ||
|- | |- | ||
|WATER_WAVE_DIRECTION | |[[WATER_WAVE_DIRECTION]] | ||
|106 | |106 | ||
|vector large_wave, vector small_wave | |[[vector]] large_wave, [[vector]] small_wave | ||
|Vector for the directions of the waves Y represents north/south and X represents movement east/west. | |Vector for the directions of the waves Y represents north/south and X represents movement east/west. | ||
* large_wave: Large wave speed and direction. | * large_wave: Large wave speed and direction. | ||
* small_wave: Small wave speed and direction. | * small_wave: Small wave speed and direction. | ||
|- | |- | ||
|ENVIRONMENT_DAYINFO | |[[ENVIRONMENT_DAYINFO]] | ||
|200 | |200 | ||
|integer day_length, integer day_offset, float secs_since_midnight | |[[integer]] day_length, [[integer]] day_offset, [[float]] secs_since_midnight | ||
|Current time and day information | |Current time and day information | ||
* day_length: Number of seconds in the environments day cycle. | * day_length: Number of seconds in the environments day cycle. |
Revision as of 11:34, 1 August 2022
Parameters
parameter | integer value | return values | description |
---|---|---|---|
SKY_TRACKS | 15 | float sky2, float sky3, float sky4 | Altitudes for sky transitions in the region. |
SKY_AMBIENT | 0 | vector ambient_color | The ambient color of the environment. |
SKY_TEXTURE_DEFAULTS | 1 | integer bloom_is_default, integer halo_is_default, integer rainbow_is_default | Checks if the textures are currently set to use the default. For default values, the returned integer is 1. If the texture uses something other than the default, the returned value is 0. |
SKY_CLOUDS | 2 | vector color, float coverage, float scale, float variance, vector scroll, vector density, vector detail, integer is_default | Environmental cloud information.
|
SKY_DOME | 4 | float offset, float radius, float max_altitude | Sky dome information.
|
SKY_GAMMA | 5 | float gamma | The gamma value applied to the scene. |
SKY_GLOW | 6 | float glow_size, float glow_focus | Glow applied to the sun and moon.
|
SKY_MOON | 9 | rotation rot, float scale, float brightness, integer is_default_texture, vector direction, vector ambient_color, vector diffuse_color | Detailed moon information
|
SKY_STAR_BRIGHTNESS | 13 | float brightness | |
SKY_SUN | 14 | rotation rot, float scale, vector sun_color, integer is_default_texture, vector direction, vector ambient_color, vector diffuse_color | Detailed sun information
|
SKY_PLANET | 10 | float planet_radius, float sky_bottom_radius, float sky_top_radius | Planet information used in rendering the sky
|
SKY_REFRACTION | 11 | float moisture_level, float droplet_radius, float ice_level | Sky refraction parameters for rainbows and optical effects.
|
SKY_LIGHT | 8 | vector light_direction, vector unused, vector total_ambient | Miscellaneous lighting values
|
WATER_BLUR_MULTIPLIER | 100 | float multiplier | Multiplier applied to blur the scene when under water. |
WATER_FOG | 101 | vector, float density, float modulation | Fog parameters applied when underwater
|
WATER_FRESNEL | 102 | float offset, float scale | Fresnel scattering applied to the surface of the water.
|
WATER_TEXTURE_DEFAULTS | 103 | integer normal_is_default, integer transparent_is_default | Checks if the textures are currently set to use the default. For default values the returned integer is 1, if the texture uses something other than the default this value is 0. |
WATER_NORMAL_SCALE | 104 | vector scale | Scaling applied to the water normal map. |
WATER_REFRACTION | 105 | float scale_above, float scale_below | Refraction factors when looking through the surface of the water.
|
WATER_WAVE_DIRECTION | 106 | vector large_wave, vector small_wave | Vector for the directions of the waves Y represents north/south and X represents movement east/west.
|
ENVIRONMENT_DAYINFO | 200 | integer day_length, integer day_offset, float secs_since_midnight | Current time and day information
|