mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Use vertex distance instead of z, fixes #9108
This commit is contained in:
parent
134b3edf5a
commit
2ea64d2dc1
1 changed files with 1 additions and 1 deletions
|
|
@ -1929,7 +1929,7 @@ FRAGMENT_SHADER_CODE
|
|||
|
||||
if (fog_depth_enabled) {
|
||||
|
||||
float fog_z = smoothstep(fog_depth_begin,z_far,-vertex.z);
|
||||
float fog_z = smoothstep(fog_depth_begin,z_far,length(vertex));
|
||||
|
||||
fog_amount = pow(fog_z,fog_depth_curve);
|
||||
if (fog_transmit_enabled) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue