Skip to content
0.2.0-dev Download ZIP
33 lines ·3.0 KB Raw
1<?xml version="1.0" encoding="UTF-8" ?>
2<class name="FogMaterial" inherits="Material" api_type="core" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
3 <brief_description>
4 A material that controls how volumetric fog is rendered, to be assigned to a [FogVolume].
5 </brief_description>
6 <description>
7 A [Material] resource that can be used by [FogVolume]s to draw volumetric effects.
8 If you need more advanced effects, use a custom [url=$DOCS_URL/tutorials/shaders/shader_reference/fog_shader.html]fog shader[/url].
9 </description>
10 <tutorials>
11 </tutorials>
12 <members>
13 <member name="albedo" type="Color" setter="set_albedo" getter="get_albedo" default="Color(1, 1, 1, 1)" keywords="color, colour">
14 The single-scattering [Color] of the [FogVolume]. Internally, [member albedo] is converted into single-scattering, which is additively blended with other [FogVolume]s and the [member Environment.volumetric_fog_albedo].
15 </member>
16 <member name="density" type="float" setter="set_density" getter="get_density" default="1.0">
17 The density of the [FogVolume]. Denser objects are more opaque, but may suffer from under-sampling artifacts that look like stripes. Negative values can be used to subtract fog from other [FogVolume]s or global volumetric fog.
18 [b]Note:[/b] Due to limited precision, [member density] values between [code]-0.001[/code] and [code]0.001[/code] (exclusive) act like [code]0.0[/code]. This does not apply to [member Environment.volumetric_fog_density].
19 </member>
20 <member name="density_texture" type="Texture3D" setter="set_density_texture" getter="get_density_texture">
21 The 3D texture that is used to scale the [member density] of the [FogVolume]. This can be used to vary fog density within the [FogVolume] with any kind of static pattern. For animated effects, consider using a custom [url=$DOCS_URL/tutorials/shaders/shader_reference/fog_shader.html]fog shader[/url].
22 </member>
23 <member name="edge_fade" type="float" setter="set_edge_fade" getter="get_edge_fade" default="0.1">
24 The hardness of the edges of the [FogVolume]. A higher value will result in softer edges, while a lower value will result in harder edges.
25 </member>
26 <member name="emission" type="Color" setter="set_emission" getter="get_emission" default="Color(0, 0, 0, 1)">
27 The [Color] of the light emitted by the [FogVolume]. Emitted light will not cast light or shadows on other objects, but can be useful for modulating the [Color] of the [FogVolume] independently from light sources.
28 </member>
29 <member name="height_falloff" type="float" setter="set_height_falloff" getter="get_height_falloff" default="0.0">
30 The rate by which the height-based fog decreases in density as height increases in world space. A high falloff will result in a sharp transition, while a low falloff will result in a smoother transition. A value of [code]0.0[/code] results in uniform-density fog. The height threshold is determined by the height of the associated [FogVolume].
31 </member>
32 </members>
33</class>