You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2026-01-07 19:53:17 +00:00
radial fog fix
This commit is contained in:
@@ -524,7 +524,7 @@ vec4 fog_process(vec3 vertex) {
|
||||
}
|
||||
}
|
||||
|
||||
float fog_amount = 1.0 - exp(min(0.0, vertex.z * scene_data.fog_density));
|
||||
float fog_amount = 1.0 - exp(min(0.0, -length(vertex) * scene_data.fog_density));
|
||||
|
||||
if (abs(scene_data.fog_height_density) > 0.001) {
|
||||
float y = (scene_data.camera_matrix * vec4(vertex, 1.0)).y;
|
||||
|
||||
@@ -550,7 +550,7 @@ vec4 fog_process(vec3 vertex) {
|
||||
}
|
||||
}
|
||||
|
||||
float fog_amount = 1.0 - exp(min(0.0, vertex.z * scene_data.fog_density));
|
||||
float fog_amount = 1.0 - exp(min(0.0, -length(vertex) * scene_data.fog_density));
|
||||
|
||||
if (abs(scene_data.fog_height_density) > 0.001) {
|
||||
float y = (scene_data.camera_matrix * vec4(vertex, 1.0)).y;
|
||||
|
||||
Reference in New Issue
Block a user