FogMaterial
继承: Material
< Resource
< RefCounted
< Object
A material that controls how volumetric fog is rendered, to be assigned to a FogVolume
.
描述
A Material
resource that can be used by FogVolume
s to draw volumetric effects.
If you need more advanced effects, use a custom fog shader.
属性
属性说明
Color
albedo = Color(1, 1, 1, 1)
The single-scattering Color
of the FogVolume
. Internally, albedo
is converted into single-scattering, which is additively blended with other FogVolume
s and the Environment.volumetric_fog_albedo
.
float
density = 1.0
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.
Note: Due to limited precision, density
values between -0.001
and 0.001
(exclusive) act like 0.0
. This does not apply to Environment.volumetric_fog_density
.
Texture3D
density_texture
The 3D texture that is used to scale the 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 fog shader.
float
edge_fade = 0.1
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.
Color
emission = Color(0, 0, 0, 1)
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.
float
height_falloff = 0.0
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 0.0
results in uniform-density fog. The height threshold is determined by the height of the associated FogVolume
.
本方法通常需要用户覆盖才能生效。
本方法无副作用,不会修改该实例的任何成员变量。
本方法除了能接受在此处描述的参数外,还能够继续接受任意数量的参数。
本方法用于构造某个类型。
调用本方法无需实例,可直接使用类名进行调用。
本方法描述的是使用本类型作为左操作数的有效运算符。
这个值是由下列位标志构成位掩码的整数。
无返回值。