Skip to content

Fix dynamic light blockiness and strength#1108

Merged
VReaperV merged 1 commit intoDaemonEngine:masterfrom
VReaperV:fix-dynamic-lights
Apr 30, 2024
Merged

Fix dynamic light blockiness and strength#1108
VReaperV merged 1 commit intoDaemonEngine:masterfrom
VReaperV:fix-dynamic-lights

Conversation

@VReaperV
Copy link
Copy Markdown
Contributor

Sets a minimum radius for light culling to avoid blocky artifacts. Still sort of a hack, but it works better than what we had.
Also made attenuation quadratic rather than linear for dynamic lights since that is more correct without broken gamma (previous incorrect lighting was essentially doing distance ^ 4.2 due to gamma correction). In the same pr because without the correct attenuation the blockiness is still there.

Before and after for light culling:
unvanquished_2024-04-30_002814_000
unvanquished_2024-04-30_002707_000

I've chosen the 2.0 * 32.0 value for the minimum radius because it fixes the blockiness issues with the smallest scale lights that we have. Simply always increasing radius results in too many tiles getting the light source.

This also fixes the same issue with https://users.unvanquished.net/~modi/res-psaw_dev%2Bishq1.dpk, however it's more difficult to capture a screenshot of that.

Fixes #791.

Sets a minimum radius for light culling to avoid blocky artifacts. Still sort of a hack, but it works better than what we had.
Also made attenuation quadratic rather than linear for dynamic lights since that is more correct without broken gamma.
@DolceTriade
Copy link
Copy Markdown
Contributor

This fixes the issues for me too!!

@VReaperV VReaperV merged commit a979351 into DaemonEngine:master Apr 30, 2024
@VReaperV VReaperV deleted the fix-dynamic-lights branch April 30, 2024 19:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dynamic light blockiness (tile edges visible)

3 participants