-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Addition of FogVolumes, FogShaders, FogMaterial, and overhaul of Volu…
…metricFog Co-authored-by: Brian Semrau <brian.semrau@gmail.com>
- Loading branch information
1 parent
66ab3ce
commit e7cacfc
Showing
47 changed files
with
2,925 additions
and
770 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<class name="FogMaterial" inherits="Material" version="4.0"> | ||
<brief_description> | ||
[Material] used with a [FogVolume] to draw things with the volumetric fog effect. | ||
</brief_description> | ||
<description> | ||
A [Material] resource that can be used by [FogVolume]s to draw volumetric effects. | ||
</description> | ||
<tutorials> | ||
</tutorials> | ||
<members> | ||
<member name="albedo" type="Color" setter="set_albedo" getter="get_albedo" default="Color(1, 1, 1, 1)"> | ||
Sets 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]. | ||
</member> | ||
<member name="density" type="float" setter="set_density" getter="get_density" default="1.0"> | ||
Sets the density of the [FogVolume]. Denser objects are more opaque, but may suffer from under-sampling artifacts that look like stripes. | ||
</member> | ||
<member name="density_texture" type="Texture3D" setter="set_density_texture" getter="get_density_texture"> | ||
Sets a 3D texture that is used to scale the [member density] of the [FogVolume]. | ||
</member> | ||
<member name="edge_fade" type="float" setter="set_edge_fade" getter="get_edge_fade" default="0.1"> | ||
Sets the hardness of the edges of the [FogVolume]. A higher number will result in softer edges while a lower number will result in harder edges. | ||
</member> | ||
<member name="emission" type="Color" setter="set_emission" getter="get_emission" default="Color(0, 0, 0, 1)"> | ||
Sets 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. | ||
</member> | ||
<member name="height_falloff" type="float" setter="set_height_falloff" getter="get_height_falloff" default="0.0"> | ||
Sets the rate by which the height-based fog decreases in density as height increases. A high falloff will result in a sharp transition, while a low falloff will result in a smoother transition. A value of [code]0[/code] results in uniform-density fog. | ||
</member> | ||
<member name="height_offset" type="float" setter="set_height_offset" getter="get_height_offset" default="0.0"> | ||
Sets the threshold at which the height-based fog starts to decrease in density. Relies on [member height_falloff] to have any effect. Offset is specified in world coordinates and should be roughly equal to or slightly above your ground plane. | ||
</member> | ||
</members> | ||
</class> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<class name="FogVolume" inherits="VisualInstance3D" version="4.0"> | ||
<brief_description> | ||
A node used to add local fog with the volumetric fog effect. | ||
</brief_description> | ||
<description> | ||
[FogVolume]s are used to add localized fog into the global volumetric fog effect. | ||
Performance of [FogVolume]s is directly related to their relative size on the screen and the complexity of their attached [FogMaterial]. It is best to keep [FogVolume]s relatively small and simple where possible. | ||
</description> | ||
<tutorials> | ||
</tutorials> | ||
<members> | ||
<member name="extents" type="Vector3" setter="set_extents" getter="get_extents" default="Vector3(1, 1, 1)"> | ||
Sets the size of the [FogVolume] when [member shape] is [constant RenderingServer.FOG_VOLUME_SHAPE_ELLIPSOID] or [constant RenderingServer.FOG_VOLUME_SHAPE_BOX]. | ||
</member> | ||
<member name="material" type="Material" setter="set_material" getter="get_material"> | ||
Sets the [Material] to be used by the [FogVolume]. Can be either a [FogMaterial] or a custom [ShaderMaterial]. | ||
</member> | ||
<member name="shape" type="int" setter="set_shape" getter="get_shape" enum="RenderingServer.FogVolumeShape" default="1"> | ||
Sets the shape of the [FogVolume] to either [constant RenderingServer.FOG_VOLUME_SHAPE_ELLIPSOID], [constant RenderingServer.FOG_VOLUME_SHAPE_BOX], or [constant RenderingServer.FOG_VOLUME_SHAPE_ELLIPSOID] or [constant RenderingServer.FOG_VOLUME_SHAPE_WORLD]. | ||
</member> | ||
</members> | ||
</class> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.