Colour improvements

This commit is contained in:
Joshua Barretto 2019-07-08 22:10:48 +01:00
parent 879789ecc4
commit d79f7d9714
5 changed files with 14 additions and 12 deletions

View File

@ -1,17 +1,17 @@
const float PI = 3.141592;
const vec3 SKY_DAY_TOP = vec3(0.2, 0.3, 0.9);
const vec3 SKY_DAY_MID = vec3(0.15, 0.2, 0.8);
const vec3 SKY_DAY_TOP = vec3(0.35, 0.45, 0.9);
const vec3 SKY_DAY_MID = vec3(0.25, 0.35, 0.8);
const vec3 SKY_DAY_BOT = vec3(0.02, 0.1, 0.3);
const vec3 DAY_LIGHT = vec3(0.5, 0.5, 1.0);
const vec3 SKY_DUSK_TOP = vec3(0.1, 0.15, 0.3);
const vec3 SKY_DUSK_MID = vec3(0.75, 0.3, 0.25);
const vec3 SKY_DUSK_MID = vec3(0.95, 0.4, 0.25);
const vec3 SKY_DUSK_BOT = vec3(0.01, 0.05, 0.15);
const vec3 DUSK_LIGHT = vec3(0.9, 0.2, 0.1);
const vec3 SKY_NIGHT_TOP = vec3(0.002, 0.002, 0.005);
const vec3 SKY_NIGHT_MID = vec3(0.002, 0.01, 0.03);
const vec3 SKY_NIGHT_TOP = vec3(0.001, 0.001, 0.0025);
const vec3 SKY_NIGHT_MID = vec3(0.001, 0.005, 0.02);
const vec3 SKY_NIGHT_BOT = vec3(0.002, 0.002, 0.005);
const vec3 NIGHT_LIGHT = vec3(0.002, 0.01, 0.03);

View File

@ -167,8 +167,7 @@ void main() {
//vec4 fxaa_color = texture(src_color, uv);
vec4 hsva_color = vec4(rgb2hsv(fxaa_color.rgb), fxaa_color.a);
hsva_color.y *= 1.3;
hsva_color.x -= 0.015;
hsva_color.y *= 1.45;
hsva_color.z *= 0.85;
//hsva_color.z = 1.0 - 1.0 / (1.0 * hsva_color.z + 1.0);
vec4 final_color = vec4(hsv2rgb(hsva_color.rgb), hsva_color.a);

View File

@ -200,7 +200,7 @@ impl<'a> BlockGen<'a> {
// Sample blocks
let stone_col = Rgb::new(200, 220, 255);
let stone_col = Rgb::new(240, 230, 220);
// let dirt_col = Rgb::new(79, 67, 60);
let air = Block::empty();
@ -321,8 +321,8 @@ impl<'a> BlockGen<'a> {
StructureBlock::Acacia => Block::new(
1,
Lerp::lerp(
Rgb::new(60.0, 165.0, 20.0),
Rgb::new(150.0, 245.0, 30.0),
Rgb::new(25.0, 80.0, 20.0),
Rgb::new(100.0, 200.0, 5.0),
lerp,
)
.map(|e| e as u8),

View File

@ -47,6 +47,7 @@ impl<'a> Sampler for ColumnGen<'a> {
const RIVER_PROPORTION: f32 = 0.025;
/*
let river = dryness
.abs()
.neg()
@ -54,6 +55,8 @@ impl<'a> Sampler for ColumnGen<'a> {
.div(RIVER_PROPORTION)
.max(0.0)
.mul((1.0 - (chaos - 0.15) * 20.0).max(0.0).min(1.0));
*/
let river = 0.0;
let cliff_hill =
(sim.gen_ctx.small_nz.get((wposf.div(128.0)).into_array()) as f32).mul(16.0);

View File

@ -383,7 +383,7 @@ impl SimChunk {
.max(0.35)
.min(1.0),
)
.max(0.15);
.max(0.1);
let alt_base = (gen_ctx.alt_nz.get((wposf.div(12_000.0)).into_array()) as f32)
.mul(250.0)
@ -398,7 +398,7 @@ impl SimChunk {
+ (0.0
+ alt_main
+ (gen_ctx.small_nz.get((wposf.div(300.0)).into_array()) as f32)
.mul(alt_main.max(0.1))
.mul(alt_main.max(0.25))
.mul(1.6))
.add(1.0)
.mul(0.5)