Skip to content
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

Add RSF_FORCE_LIGHTMAP #1523

Open
wants to merge 1 commit into
base: for-0.56.0/sync
Choose a base branch
from

Conversation

VReaperV
Copy link
Contributor

@VReaperV VReaperV commented Jan 26, 2025

Cgame-side pr: Unvanquished/Unvanquished#3306

Replaces RSF_NOLIGHTSCALE.

If this flag is used when registering a shader, all ST_COLORMAP stages will be changed to ST_DIFFUSEMAP. This is intended for use with particles and trails, to make them use the lightGrid in the GLSL code.

Improves performance with particle systems and trails, e. g. with firebombs, and a massive performance improvement on map https://users.unvanquished.net/~sweet/pkg/map-jota_3.0.dpk in the outside area.

There's for the most part no difference in how the particles/trails look, the only differences are due to the GLSL lightGrid being more precise.

@slipher
Copy link
Member

slipher commented Jan 26, 2025

FWIW the realLight on Jota doesn't even do anything currently. The shader must have an rgbgen vertex or entity for the entity color to have any effect. There are only 4 maps where realLight is actually used with a compatible shader:

  • gantry (blood drops from fan)
  • sectorb17 (smokestack)
  • nova (purports to be smoke; haven't tested)
  • map-edge1_v3_ye_m.pk3 (purports to be smoke; haven't tested)

Haven't read the code yet but the approach sounds fine.

Replaces RSF_NOLIGHTSCALE.

If this flag is used when registering a shader, all `ST_COLORMAP` stages will be changed to `ST_DIFFUSEMAP`. This is intended for use with particles and trails, to make them use the lightGrid in the GLSL code.
@VReaperV VReaperV force-pushed the reaper/lightgrid-particles/sync branch from 2adfd06 to 552cc35 Compare January 31, 2025 17:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants