Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/shaders/glsl/terrain.fragment.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ vec4 linearToGamma(vec4 color) {
void main() {
vec4 surface_color = texture(u_texture, vec2(v_texture_pos.x, 1.0 - v_texture_pos.y));

// Skip fog blending in globe mode
if (!u_is_globe_mode && v_fog_depth > u_fog_ground_blend) {
// Skip fog blending in globe mode or when fog opacity is zero
if (!u_is_globe_mode && u_fog_ground_blend_opacity > 0.0 && v_fog_depth > u_fog_ground_blend) {
vec4 surface_color_linear = gammaToLinear(surface_color);
float blend_color = smoothstep(0.0, 1.0, max((v_fog_depth - u_horizon_fog_blend) / (1.0 - u_horizon_fog_blend), 0.0));
vec4 fog_horizon_color_linear = mix(gammaToLinear(u_fog_color), gammaToLinear(u_horizon_color), blend_color);
Expand Down
2 changes: 1 addition & 1 deletion test/build/bundle_size.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1053826
1054876
Loading