mirror of
https://github.com/godotengine/godot.git
synced 2024-11-21 03:18:37 +08:00
Merge pull request #18855 from clayjohn/doc_procedural_sky
Added Documentation for Procedural Sky
This commit is contained in:
commit
17e84568a4
@ -1,8 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="ProceduralSky" inherits="Sky" category="Core" version="3.1">
|
||||
<brief_description>
|
||||
Type of [Sky] that is generated procedurally based on user input parameters.
|
||||
</brief_description>
|
||||
<description>
|
||||
ProceduralSky provides a way to create an effective background quickly by defining procedural parameters for the sun, the sky and the ground. The sky and ground are very similar, they are defined by a color at the horizon, another color, and finally an easing curve to interpolate between these two colors. Similarly the sun is described by a position in the sky, a color, and an easing curve. However, the sun also defines a minimum and maximum angle, these two values define at what distance the easing curve begins and ends from the sun, and thus end up defining the size of the sun in the sky.
|
||||
The ProceduralSky is updated on the CPU after the parameters change and stored in a texture and then displayed as a background in the scene. This makes it relatively unsuitable for realtime updates during gameplay. But with a small texture size it is still feasible to update relatively frequently becuase it is updated on a background thread when multi-threading is available.
|
||||
</description>
|
||||
<tutorials>
|
||||
</tutorials>
|
||||
@ -12,36 +15,52 @@
|
||||
</methods>
|
||||
<members>
|
||||
<member name="ground_bottom_color" type="Color" setter="set_ground_bottom_color" getter="get_ground_bottom_color">
|
||||
Color of the ground at the bottom.
|
||||
</member>
|
||||
<member name="ground_curve" type="float" setter="set_ground_curve" getter="get_ground_curve">
|
||||
How quickly the [member ground_horizon_color] fades into the [member ground_bottom_color].
|
||||
</member>
|
||||
<member name="ground_energy" type="float" setter="set_ground_energy" getter="get_ground_energy">
|
||||
Amount of energy contribution from the ground.
|
||||
</member>
|
||||
<member name="ground_horizon_color" type="Color" setter="set_ground_horizon_color" getter="get_ground_horizon_color">
|
||||
Color of the ground at the horizon.
|
||||
</member>
|
||||
<member name="sky_curve" type="float" setter="set_sky_curve" getter="get_sky_curve">
|
||||
How quickly the [member sky_horizon_color] fades into the [member sky_top_color].
|
||||
</member>
|
||||
<member name="sky_energy" type="float" setter="set_sky_energy" getter="get_sky_energy">
|
||||
Amount of energy contribution from the sky.
|
||||
</member>
|
||||
<member name="sky_horizon_color" type="Color" setter="set_sky_horizon_color" getter="get_sky_horizon_color">
|
||||
Color of the sky at the horizon.
|
||||
</member>
|
||||
<member name="sky_top_color" type="Color" setter="set_sky_top_color" getter="get_sky_top_color">
|
||||
Color of the sky at the top.
|
||||
</member>
|
||||
<member name="sun_angle_max" type="float" setter="set_sun_angle_max" getter="get_sun_angle_max">
|
||||
Distance from center of sun where it fades out completely.
|
||||
</member>
|
||||
<member name="sun_angle_min" type="float" setter="set_sun_angle_min" getter="get_sun_angle_min">
|
||||
Distance from sun where it goes from solid to starting to fade.
|
||||
</member>
|
||||
<member name="sun_color" type="Color" setter="set_sun_color" getter="get_sun_color">
|
||||
Color of the sun.
|
||||
</member>
|
||||
<member name="sun_curve" type="float" setter="set_sun_curve" getter="get_sun_curve">
|
||||
How quickly the sun fades away between [member sun_angle_min] and [member sun_angle_max]
|
||||
</member>
|
||||
<member name="sun_energy" type="float" setter="set_sun_energy" getter="get_sun_energy">
|
||||
Amount of energy contribution from the sun.
|
||||
</member>
|
||||
<member name="sun_latitude" type="float" setter="set_sun_latitude" getter="get_sun_latitude">
|
||||
The suns height using polar coordinates.
|
||||
</member>
|
||||
<member name="sun_longitude" type="float" setter="set_sun_longitude" getter="get_sun_longitude">
|
||||
The direction of the sun using polar coordinates.
|
||||
</member>
|
||||
<member name="texture_size" type="int" setter="set_texture_size" getter="get_texture_size" enum="ProceduralSky.TextureSize">
|
||||
Size of [Texture] that the ProceduralSky will generate.
|
||||
</member>
|
||||
</members>
|
||||
<constants>
|
||||
|
Loading…
Reference in New Issue
Block a user