mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
fix cloud tearing
This commit is contained in:
parent
1442dd29f1
commit
1494d93fc8
@ -58,12 +58,7 @@ vec3 wpos_at(vec2 uv) {
|
||||
vec4 clip_space = vec4((uv * 2.0 - 1.0) * vec2(1, -1), buf_depth, 1.0);
|
||||
vec4 view_space = all_mat_inv * clip_space;
|
||||
view_space /= view_space.w;
|
||||
if (buf_depth == 0.0) {
|
||||
vec3 direction = normalize(view_space.xyz);
|
||||
return direction.xyz * 524288.0625;
|
||||
} else {
|
||||
return view_space.xyz;
|
||||
}
|
||||
return view_space.xyz;
|
||||
}
|
||||
|
||||
float depth_at(vec2 uv) {
|
||||
|
Loading…
Reference in New Issue
Block a user