Skip to content

Commit e9f32dc

Browse files
endankegithub-actions[bot]
authored andcommitted
Limit emission in shadows to geojson sources
GitOrigin-RevId: 0d1a9a64df7f27452c2dd41bdb652289260d3f71
1 parent ce25bf4 commit e9f32dc

7 files changed

Lines changed: 2 additions & 1939 deletions

File tree

src/shaders/line.fragment.glsl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ uniform highp vec2 u_trim_offset;
1010
uniform highp vec2 u_trim_fade_range;
1111
uniform highp vec2 u_trim_gradient_mix_range;
1212
uniform lowp vec4 u_trim_color;
13+
uniform bool u_emissive_in_shadows;
1314

1415
in vec4 v_width2_dilute;
1516
in vec2 v_normal;
@@ -166,7 +167,7 @@ void main() {
166167
out_color = apply_lighting_with_emission_ground(out_color, emissive_strength);
167168
#ifdef RENDER_SHADOWS
168169
float light = shadowed_light_factor(v_pos_light_view_0, v_pos_light_view_1, v_depth);
169-
light = mix(light, 1.0, emissive_strength);
170+
light = u_emissive_in_shadows ? mix(light, 1.0, emissive_strength) : light;
170171
#ifdef ELEVATED_ROADS
171172
out_color.rgb *= mix(v_road_z_offset != 0.0 ? u_ground_shadow_factor : vec3(1.0), vec3(1.0), light);
172173
#else

0 commit comments

Comments
 (0)