Add exponential fog controllable with keyboard and MARSH parameter
This commit is contained in:
parent
aaef0b0475
commit
c1c3be7e85
8 changed files with 78 additions and 7 deletions
8
project/fog_controller.gd
Normal file
8
project/fog_controller.gd
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
extends WorldEnvironment
|
||||
|
||||
func _on_fog_density_changed(new_density: float) -> void:
|
||||
if new_density == 0.0 or not is_finite(new_density):
|
||||
environment.fog_enabled = false
|
||||
else:
|
||||
environment.fog_enabled = true
|
||||
environment.fog_density = 10 ** new_density
|
||||
Loading…
Add table
Add a link
Reference in a new issue