Skip to content

fix(lights, render): restore authentic material dimming and smooth directional corona transition - #338

Merged
user-grinch merged 1 commit into
user-grinch:mainfrom
CanerKaraca23:fix/lights-authentic-material-dimming-and-directional-fade
Sep 18, 2026
Merged

user-grinch merged 1 commit into
user-grinch:mainfrom
CanerKaraca23:fix/lights-authentic-material-dimming-and-directional-fade

Conversation

@CanerKaraca23

Copy link
Copy Markdown
Collaborator

Summary

  • Off-State Material Surface Properties & Color Dimming: Restores authentic AVS-style material dimming during inertia fade-in and fade-out. Instead of dimming towards pitch black (0.0f ambient / (0, 0, 0) color), GetLightSurfaceProps smoothly interpolates ambient, diffuse, and specular between the model's original off-state properties (origProps) and the glowing state (ms_LightSurfaceProps).
  • Frame Step Jitter Elimination: Ensures fLightFactor in manager.cpp steps strictly once per vehicle frame using !data.bLightRenderedThisFrame[type] to prevent multiple components from advancing the factor multiple times in the same frame.
  • Directional Corona Cosine Falloff: Applies a physical cosine falloff in RegisterCoronaDirectional across the light beam cone (angleFromCenter), producing natural, smooth sweep transitions when rotating beacons/rotators turn towards and away from the camera.

@user-grinch
user-grinch merged commit 0bf7099 into user-grinch:main Sep 18, 2026
@CanerKaraca23
CanerKaraca23 deleted the fix/lights-authentic-material-dimming-and-directional-fade branch September 18, 2026 22:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants