mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Added glow tint
This commit is contained in:
parent
d7bbceca2d
commit
b4e3dbc719
@ -181,7 +181,7 @@ void main() {
|
||||
|
||||
float ao = f_ao * sqrt(f_ao);//0.25 + f_ao * 0.75; ///*pow(f_ao, 0.5)*/f_ao * 0.85 + 0.15;
|
||||
|
||||
float glow = pow(model_light.y, 2);
|
||||
vec3 glow = pow(model_light.y, 2) * GLOW_COLOR;
|
||||
emitted_light += glow;
|
||||
|
||||
reflected_light *= ao;
|
||||
|
@ -44,6 +44,8 @@ const float UNDERWATER_MIST_DIST = 100.0;
|
||||
|
||||
const float PERSISTENT_AMBIANCE = 1.0 / 32.0;// 1.0 / 80; // 1.0 / 512; // 0.00125 // 0.1;// 0.025; // 0.1;
|
||||
|
||||
const vec3 GLOW_COLOR = vec3(1, 0.8, 0.5);
|
||||
|
||||
//vec3 get_sun_dir(float time_of_day) {
|
||||
// const float TIME_FACTOR = (PI * 2.0) / (3600.0 * 24.0);
|
||||
//
|
||||
|
@ -174,7 +174,7 @@ void main() {
|
||||
reflected_light += point_light; */
|
||||
|
||||
// float ao = /*pow(f_ao, 0.5)*/f_ao * 0.85 + 0.15;
|
||||
float glow = pow(f_inst_light.y, 2);
|
||||
vec3 glow = pow(f_inst_light.y, 2) * GLOW_COLOR;
|
||||
emitted_light += glow;
|
||||
|
||||
float ao = f_ao;
|
||||
|
@ -266,9 +266,9 @@ void main() {
|
||||
max_light *= f_light;
|
||||
|
||||
// TODO: Apply AO after this
|
||||
float l = pow(f_glow, 6) * 8 + pow(f_glow, 2) * 0.5;
|
||||
emitted_light += l;
|
||||
reflected_light += l;
|
||||
vec3 glow = GLOW_COLOR * (pow(f_glow, 6) * 8 + pow(f_glow, 2) * 0.5);
|
||||
emitted_light += glow;
|
||||
reflected_light += glow;
|
||||
|
||||
max_light += lights_at(f_pos, f_norm, view_dir, mu, cam_attenuation, fluid_alt, k_a, k_d, k_s, alpha, f_norm, 1.0, emitted_light, reflected_light);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user