-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix dynamic lights intensity, cleanup #1425
base: for-0.56.0/sync
Are you sure you want to change the base?
Fix dynamic lights intensity, cleanup #1425
Conversation
This was a cheat cvar used for dynamic lights that have no intensity set, and set to 2.0 for absolutely no reason whatsoever.
…ET() to RE_AddDynamicLightToScene() These were largely doing the same thing, use just one function instead.
Why don't we nuke the |
This has largely the same functionality as trap_R_AddLightToScene().
b628f0a
to
0670349
Compare
Right, done now. |
This was only used to scale the light's colour, just multiply the colour with it earlier on instead.
50875cb
to
ffb8083
Compare
light->l.scale = -intensity; | ||
else | ||
light->l.scale = intensity; | ||
if ( light->l.inverseShadows ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The forward lighting shader checks the sign of u_LightScale to check for inverse lights. These are said to be already broken, but it would be nice to set the scale to 1 or -1 to at least gesture at how it was supposed to work
Cgame-side pr: Unvanquished/Unvanquished#3184
r_lightScale
cvar, which is used for dynamic lights, but it's a cheat cvar and always set to 2.0, and essentially only used for dynamic lights spawned from moversRE_AddDynamicLightToSceneQ3A()
and renamedRE_AddDynamicLightToSceneET()
toRE_AddDynamicLightToScene()
because they're essentially the sametrap_R_AddAdditiveLightToScene()
Fixes #61:
hq-beta28
:Before:
After:
tremtest
:Before:
After: