mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Cloud and sprite shader fixes after rebase
This commit is contained in:
parent
13d61eaf9f
commit
3e74f87ea3
@ -146,9 +146,9 @@ vec4 cloud_at(vec3 pos, float dist, out vec3 emission) {
|
||||
#if (CLOUD_MODE >= CLOUD_MODE_MEDIUM)
|
||||
emission_alt += (noise_3d(vec3(wind_pos.xy * 0.0005 + cloud_tendency * 0.2, emission_alt * 0.0001 + time_of_day.x * 0.001)) - 0.5) * 1000;
|
||||
#endif
|
||||
float tail = (textureLod(t_noise, wind_pos.xy * 0.00005).x - 0.5, 0) * 4 + (pos.z - emission_alt) * 0.0001;
|
||||
float tail = (textureLod(sampler2D(t_noise, s_noise), wind_pos.xy * 0.00005).x - 0.5, 0) * 4 + (pos.z - emission_alt) * 0.0001;
|
||||
vec3 emission_col = vec3(0.8 + tail * 1.5, 0.5 - tail * 0.2, 0.3 + tail * 0.2);
|
||||
float emission_nz = max(pow(textureLod(t_noise, wind_pos.xy * 0.000015, 0).x, 8), 0.01) * 0.25 / (10.0 + abs(pos.z - emission_alt) / 80);
|
||||
float emission_nz = max(pow(textureLod(sampler2D(t_noise, s_noise), wind_pos.xy * 0.000015, 0).x, 8), 0.01) * 0.25 / (10.0 + abs(pos.z - emission_alt) / 80);
|
||||
emission = emission_col * emission_nz * emission_strength * max(sun_dir.z, 0) * 500000 / (1000.0 + abs(pos.z - emission_alt) * 0.1);
|
||||
}
|
||||
|
||||
|
@ -87,7 +87,7 @@ vec2 wind_offset = vec2(time_of_day.x * wind_speed);
|
||||
float cloud_scale = view_distance.z / 150.0;
|
||||
|
||||
float cloud_tendency_at(vec2 pos) {
|
||||
float nz = textureLod(sampler2D(t_noise, s_nosie), (pos + wind_offset) / 60000.0 / cloud_scale, 0).x - 0.3;
|
||||
float nz = textureLod(sampler2D(t_noise, s_noise), (pos + wind_offset) / 60000.0 / cloud_scale, 0).x - 0.3;
|
||||
nz = pow(clamp(nz, 0, 1), 3);
|
||||
return nz;
|
||||
}
|
||||
|
@ -127,7 +127,7 @@ void main() {
|
||||
vec3 inst_chunk_pos = vec3(ivec3((uvec3(inst_pos_ori) >> uvec3(0, 6, 12)) & uvec3(0x3Fu, 0x3Fu, 0xFFFFu)) - ivec3(0, 0, EXTRA_NEG_Z));
|
||||
// Select glowing
|
||||
vec3 sprite_pos = inst_chunk_pos + chunk_offs;
|
||||
f_light = (select_pos.w > 0 && select_pos.xyz == sprite_pos) ? 1.0 : 0.0;
|
||||
f_select = (select_pos.w > 0 && select_pos.xyz == sprite_pos) ? 1.0 : 0.0;
|
||||
|
||||
gl_Position =
|
||||
all_mat *
|
||||
|
Loading…
Reference in New Issue
Block a user