mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Made sprite/block selection effect more subtle
This commit is contained in:
parent
483276b082
commit
11ba02130c
@ -181,12 +181,11 @@ void main() {
|
||||
emitted_light *= ao;
|
||||
reflected_light *= ao;
|
||||
|
||||
f_col += f_select * 0.05;
|
||||
reflected_light += f_select * 0.03 * max_light / PERSISTENT_AMBIANCE;
|
||||
|
||||
surf_color = illuminate(max_light, view_dir, surf_color * emitted_light, surf_color * reflected_light);
|
||||
// vec3 surf_color = illuminate(f_col, light, diffuse_light, ambient_light);
|
||||
|
||||
surf_color += f_select * (surf_color + 0.1) * vec3(0.15, 0.15, 0.15);
|
||||
|
||||
// tgt_color = vec4(color, 1.0);
|
||||
tgt_color = vec4(surf_color, 1.0 - clamp((distance(focus_pos.xy, f_pos.xy) - (sprite_render_distance - FADE_DIST)) / FADE_DIST, 0, 1));
|
||||
}
|
||||
|
@ -268,10 +268,6 @@ void main() {
|
||||
vec3 glow = glow_light(f_pos) * (pow(f_glow, 6) * 5 + pow(f_glow, 1.5) * 2);
|
||||
reflected_light += glow;
|
||||
|
||||
float f_select = (select_pos.w > 0 && select_pos.xyz == floor(f_pos - f_norm * 0.5)) ? 1.0 : 0.0;
|
||||
f_col += f_select * 0.05;
|
||||
reflected_light += f_select * 0.03 * max_light / PERSISTENT_AMBIANCE;
|
||||
|
||||
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);
|
||||
|
||||
// float f_ao = 1.0;
|
||||
@ -372,5 +368,8 @@ void main() {
|
||||
// vec3 col = /*srgb_to_linear*/(f_col + hash(vec4(floor(f_pos * 3.0 - f_norm * 0.5), 0)) * 0.01); // Small-scale noise
|
||||
vec3 surf_color = illuminate(max_light, view_dir, col * emitted_light, col * reflected_light);
|
||||
|
||||
float f_select = (select_pos.w > 0 && select_pos.xyz == floor(f_pos - f_norm * 0.5)) ? 1.0 : 0.0;
|
||||
surf_color += f_select * (surf_color + 0.1) * vec3(0.5, 0.5, 0.5);
|
||||
|
||||
tgt_color = vec4(surf_color, 1.0);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user