mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Fixed glow AO
This commit is contained in:
parent
b4e3dbc719
commit
bb9e593a44
@ -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;
|
||||
|
||||
vec3 glow = pow(model_light.y, 2) * GLOW_COLOR;
|
||||
vec3 glow = pow(model_light.y, 3) * 4 * GLOW_COLOR;
|
||||
emitted_light += glow;
|
||||
|
||||
reflected_light *= ao;
|
||||
|
@ -90,6 +90,7 @@ vec4 cloud_at(vec3 pos, float dist, out vec3 emission) {
|
||||
|
||||
// Prevent clouds and mist appearing underground (but fade them out gently)
|
||||
float not_underground = clamp(1.0 - (alt_at(pos.xy - focus_off.xy) - (pos.z - focus_off.z)) / 80.0, 0, 1);
|
||||
air *= not_underground;
|
||||
float vapor_density = (mist + cloud) * not_underground;
|
||||
|
||||
if (emission_strength <= 0.0) {
|
||||
|
@ -44,7 +44,7 @@ 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);
|
||||
const vec3 GLOW_COLOR = vec3(1, 0.35, 0.05);
|
||||
|
||||
//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;
|
||||
vec3 glow = pow(f_inst_light.y, 2) * GLOW_COLOR;
|
||||
vec3 glow = pow(f_inst_light.y, 3) * 4 * GLOW_COLOR;
|
||||
emitted_light += glow;
|
||||
|
||||
float ao = f_ao;
|
||||
|
@ -586,9 +586,19 @@ fn draw_col_lights<D>(
|
||||
0.0
|
||||
}
|
||||
) / 4.0;
|
||||
let glowiness = (
|
||||
get_glow(data, light_pos)
|
||||
+ get_glow(data, light_pos - uv.x)
|
||||
+ get_glow(data, light_pos - uv.y)
|
||||
+ if direct_u_opacity || direct_v_opacity {
|
||||
get_glow(data, light_pos - uv.x - uv.y)
|
||||
} else {
|
||||
0.0
|
||||
}
|
||||
) / 4.0;
|
||||
let col = get_color(data, pos);
|
||||
let light = (darkness * 31.5) as u8;
|
||||
let glow = (get_glow(data, light_pos) * 31.5) as u8;
|
||||
let glow = (glowiness * 31.5) as u8;
|
||||
*col_light = make_col_light(light, glow, col);
|
||||
});
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user