mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Cleanup, fixed clouds, removed 45-degree terrain sprites
This commit is contained in:
parent
e35dff2f4b
commit
1983fd8ec1
@ -32,7 +32,7 @@ vec2 cloud_at(vec3 pos) {
|
||||
float density = max((value - CLOUD_THRESHOLD) - abs(pos.z - CLOUD_AVG_HEIGHT) / 200.0, 0.0) * CLOUD_DENSITY;
|
||||
|
||||
const float SHADE_GRADIENT = 1.5 / (CLOUD_AVG_HEIGHT - CLOUD_HEIGHT_MIN);
|
||||
float shade = ((pos.z - CLOUD_AVG_HEIGHT) / (CLOUD_HEIGHT_MAX - CLOUD_HEIGHT_MIN)) * 10.5 + 0.7;
|
||||
float shade = (pos.z - CLOUD_AVG_HEIGHT) / (CLOUD_HEIGHT_MAX - CLOUD_HEIGHT_MIN) * 5.0 + 0.3;
|
||||
|
||||
return vec2(shade, density / (1.0 + vsum(abs(pos - cam_pos.xyz)) / 5000));
|
||||
}
|
||||
|
@ -21,10 +21,6 @@ out vec4 tgt_color;
|
||||
#include <sky.glsl>
|
||||
#include <light.glsl>
|
||||
|
||||
float vmin(vec3 v) {
|
||||
return min(v.x, min(v.y, v.z));
|
||||
}
|
||||
|
||||
void main() {
|
||||
// First 3 normals are negative, next 3 are positive
|
||||
vec3 normals[6] = vec3[](vec3(-1,0,0), vec3(1,0,0), vec3(0,-1,0), vec3(0,1,0), vec3(0,0,-1), vec3(0,0,1));
|
||||
|
@ -276,7 +276,7 @@ fn mesh_worker<V: BaseVol<Vox = Block> + RectRasterableVol + ReadVol + Debug>(
|
||||
let seed = wpos.x as u64 * 3
|
||||
+ wpos.y as u64 * 7
|
||||
+ wpos.x as u64 * wpos.y as u64; // Awful PRNG
|
||||
let ori = block.get_ori().unwrap_or((seed % 8) as u8);
|
||||
let ori = block.get_ori().unwrap_or((seed % 4) as u8 * 2);
|
||||
|
||||
let instance = SpriteInstance::new(
|
||||
Mat4::identity()
|
||||
|
Loading…
Reference in New Issue
Block a user