From 70f52d876ada456d6bf22a1a4a593c68a9c91fe0 Mon Sep 17 00:00:00 2001 From: Joshua Barretto Date: Thu, 3 Sep 2020 17:52:21 +0100 Subject: [PATCH] Improved lighting --- assets/common/items/lantern/black_0.ron | 4 ++-- assets/common/items/lantern/blue_0.ron | 2 +- assets/common/items/lantern/green_0.ron | 4 ++-- assets/common/items/lantern/red_0.ron | 4 ++-- assets/voxygen/shaders/include/light.glsl | 2 +- voxygen/src/scene/particle.rs | 1 - 6 files changed, 8 insertions(+), 9 deletions(-) diff --git a/assets/common/items/lantern/black_0.ron b/assets/common/items/lantern/black_0.ron index 9eb9156099..38f282072e 100644 --- a/assets/common/items/lantern/black_0.ron +++ b/assets/common/items/lantern/black_0.ron @@ -5,8 +5,8 @@ Item( ( kind: "Black0", color: (r: 255, g: 128, b: 26), - strength_thousandths: 3000, - flicker_thousandths: 300, + strength_thousandths: 5000, + flicker_thousandths: 150, ), ), ) diff --git a/assets/common/items/lantern/blue_0.ron b/assets/common/items/lantern/blue_0.ron index a9e88083ed..c342ff14a7 100644 --- a/assets/common/items/lantern/blue_0.ron +++ b/assets/common/items/lantern/blue_0.ron @@ -5,7 +5,7 @@ Item( ( kind: "Blue0", color: (r: 255, g: 128, b: 26), - strength_thousandths: 4000, + strength_thousandths: 6000, flicker_thousandths: 250, ), ), diff --git a/assets/common/items/lantern/green_0.ron b/assets/common/items/lantern/green_0.ron index 8ccb9a38df..0409aba6a5 100644 --- a/assets/common/items/lantern/green_0.ron +++ b/assets/common/items/lantern/green_0.ron @@ -5,8 +5,8 @@ Item( ( kind: "Green0", color: (r: 255, g: 128, b: 26), - strength_thousandths: 4000, - flicker_thousandths: 500, + strength_thousandths: 6000, + flicker_thousandths: 250, ), ), ) diff --git a/assets/common/items/lantern/red_0.ron b/assets/common/items/lantern/red_0.ron index f320f8afbc..bac1264ba0 100644 --- a/assets/common/items/lantern/red_0.ron +++ b/assets/common/items/lantern/red_0.ron @@ -5,8 +5,8 @@ Item( ( kind: "Red0", color: (r: 255, g: 128, b: 26), - strength_thousandths: 3500, - flicker_thousandths: 1000, + strength_thousandths: 5000, + flicker_thousandths: 250, ), ), ) diff --git a/assets/voxygen/shaders/include/light.glsl b/assets/voxygen/shaders/include/light.glsl index 30e7ceb616..2b9d2fc118 100644 --- a/assets/voxygen/shaders/include/light.glsl +++ b/assets/voxygen/shaders/include/light.glsl @@ -142,7 +142,7 @@ float lights_at(vec3 wpos, vec3 wnorm, vec3 /*cam_to_frag*/view_dir, vec3 mu, ve // float strength = attenuation_strength(difference);// pow(attenuation_strength(difference), 0.6); // // NOTE: This normalizes strength to 1.0 at the center of the point source. // float strength = 1.0 / (1.0 + distance_2); - float strength = 1.0 / (1 + distance_2); + float strength = 1.0 / (4 + distance_2); // Multiply the vec3 only once const float PI = 3.1415926535897932384626433832795; diff --git a/voxygen/src/scene/particle.rs b/voxygen/src/scene/particle.rs index babb99bcb1..3319a073db 100644 --- a/voxygen/src/scene/particle.rs +++ b/voxygen/src/scene/particle.rs @@ -14,7 +14,6 @@ use common::{ spiral::Spiral2d, state::DeltaTime, terrain::TerrainChunk, - time::DayPeriod, vol::{RectRasterableVol, SizedVol}, }; use dot_vox::DotVoxData;