Skip to content

Commit

Permalink
[Terra] Fix crash when there are only shadow casting spotlights
Browse files Browse the repository at this point in the history
  • Loading branch information
darksylinc committed Oct 3, 2021
1 parent 5862ebb commit b18f7a3
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 b18f7a3

Please sign in to comment.