Skip to content

Commit

Permalink
Fix heightmap crash if only shadow casting spotlights are one scene (g…
Browse files Browse the repository at this point in the history
…azebosim#451)

Fixes gazebosim#439

Signed-off-by: Matias N. Goldberg <[email protected]>

Co-authored-by: Ian Chen <[email protected]>
  • Loading branch information
2 people authored and srmainwaring committed Oct 21, 2021
1 parent ce520dc commit 7c90f64
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
outVs.terrainShadow = mix( terraShadowData.x, 1.0, clamp( terraHeightWeight, 0.0, 1.0 ) );
@end

@property( hlms_num_shadow_map_lights )
@property( hlms_lights_directional )
@piece( custom_ps_preLights )fShadow *= inPs.terrainShadow;@end
@else
@piece( custom_ps_preLights )float fShadow = inPs.terrainShadow;@end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
outVs.terrainShadow = mix( terraShadowData.x, 1.0, clamp( terraHeightWeight, 0.0, 1.0 ) );
@end

@property( hlms_num_shadow_map_lights )
@property( hlms_lights_directional )
@piece( custom_ps_preLights )fShadow *= inPs.terrainShadow;@end
@end @property( !hlms_num_shadow_map_lights )
@piece( custom_ps_preLights )float fShadow = inPs.terrainShadow;@end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
outVs.terrainShadow = lerp( terraShadowData.x, 1.0, saturate( terraHeightWeight ) );
@end

@property( hlms_num_shadow_map_lights )
@property( hlms_lights_directional )
@piece( custom_ps_preLights )fShadow *= inPs.terrainShadow;@end
@else
@piece( custom_ps_preLights )float fShadow = inPs.terrainShadow;@end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
outVs.terrainShadow = lerp( terraShadowData.x, 1.0, saturate( terraHeightWeight ) );
@end

@property( hlms_num_shadow_map_lights )
@property( hlms_lights_directional )
@piece( custom_ps_preLights )fShadow *= inPs.terrainShadow;@end
@else
@piece( custom_ps_preLights )float fShadow = inPs.terrainShadow;@end
Expand Down

0 comments on commit 7c90f64

Please sign in to comment.