mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Reversed water draw order
This commit is contained in:
parent
9dc46c490e
commit
5f2d0021a3
@ -89,9 +89,9 @@ void main() {
|
||||
0.1 / slope
|
||||
);
|
||||
|
||||
nmap = mix(vec3(0, 0, 1), normalize(nmap), min(1.0 / pow(frag_dist, 0.75), 1));
|
||||
nmap = mix(f_norm, normalize(nmap), min(1.0 / pow(frag_dist, 0.75), 1));
|
||||
|
||||
vec3 norm = f_norm * nmap.z + b_norm * nmap.x + c_norm * nmap.y;
|
||||
vec3 norm = vec3(0, 0, 1) * nmap.z + b_norm * nmap.x + c_norm * nmap.y;
|
||||
|
||||
vec3 light, diffuse_light, ambient_light;
|
||||
get_sun_diffuse(norm, time_of_day.x, light, diffuse_light, ambient_light, 0.0);
|
||||
|
@ -1483,6 +1483,9 @@ impl<V: RectRasterableVol> Terrain<V> {
|
||||
.as_ref()
|
||||
.map(|model| (model, &chunk.locals))
|
||||
})
|
||||
.collect::<Vec<_>>()
|
||||
.into_iter()
|
||||
.rev() // Render back-to-front
|
||||
.for_each(|(model, locals)| {
|
||||
renderer.render_fluid_chunk(model, globals, locals, lights, shadows, &self.waves)
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user