@@ -272,13 +272,12 @@ public void PrepareFrame(RenderFrame frame, ElapsedTime elapsedTime)
272
272
LightConeDirection = Vector3 . Transform ( Vector3 . Lerp ( ActiveLightCone . Direction1 , ActiveLightCone . Direction2 , ActiveLightCone . Fade . Y ) , ShapeXNATranslations [ coneIndex ] ) ;
273
273
LightConeDirection -= ShapeXNATranslations [ coneIndex ] . Translation ;
274
274
LightConeDirection . Normalize ( ) ;
275
- // The original shaders followed the phylisophy of wanting 50% brightness at half the range. (LightConeDistance is only the half.) Now we need the full range.
276
- LightConeDistance = 2 * MathHelper . Lerp ( ActiveLightCone . Distance1 , ActiveLightCone . Distance2 , ActiveLightCone . Fade . Y ) ;
275
+ LightConeDistance = 4 * MathHelper . Lerp ( ActiveLightCone . Distance1 , ActiveLightCone . Distance2 , ActiveLightCone . Fade . Y ) ;
277
276
LightConeOuterAngle = MathHelper . Lerp ( ActiveLightCone . Angle1 , ActiveLightCone . Angle2 , ActiveLightCone . Fade . Y ) ;
278
277
var lightConeColor = Vector4 . Lerp ( ActiveLightCone . Color1 , ActiveLightCone . Color2 , ActiveLightCone . Fade . Y ) ;
279
- LightConeColor = new Vector3 ( lightConeColor . X , lightConeColor . Y , lightConeColor . Z ) ;
278
+ LightConeColor = new Vector3 ( lightConeColor . X , lightConeColor . Y , lightConeColor . Z ) * lightConeColor . W ;
280
279
281
- frame . AddLight ( LightMode . Spot , LightConePosition , LightConeDirection , LightConeColor , RenderFrame . HeadLightIntensity * lightConeColor . W , LightConeDistance , 0 , LightConeOuterAngle , ActiveLightCone . Fade . X , false ) ;
280
+ frame . AddLight ( LightMode . Headlight , LightConePosition , LightConeDirection , LightConeColor , RenderFrame . HeadLightIntensity , LightConeDistance , 0 , LightConeOuterAngle , ActiveLightCone . Fade . X , false ) ;
282
281
}
283
282
else
284
283
{
0 commit comments