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

renderer: factorize and move some computation done every frame for every surface in tr_shade to be done only once in tr_shader #317

Merged
merged 4 commits into from
Apr 14, 2020

Conversation

illwieckz
Copy link
Member

@illwieckz illwieckz commented Apr 13, 2020

Do a refactorization of some renderer thing, move some computation that are done every frame for every surface in tr_shade.cpp to be done only once at map load (or when shader is created) in tr_shader.cpp.

This makes also easier to implement some features, pull request #307 (engine-agnostic normal fomat) relies heavily on this, #301 (merge lightmap/lightgrid world/entities glsl) requires it.

Also deletes 150 lines.

@illwieckz illwieckz added T-Improvement Improvement for an existing feature A-Renderer T-Cleanup labels Apr 13, 2020
@illwieckz illwieckz changed the title renderer: factorize and move some computation done every frame for every surface in tr_shade to be done only once in tr_shade renderer: factorize and move some computation done every frame for every surface in tr_shade to be done only once in tr_shader Apr 13, 2020
Compute them once per shader at map load instead of doing it per frame per surface.
Compute them once per shader at map load instead of doing it per frame per surface.
@slipher
Copy link
Member

slipher commented Apr 14, 2020

Looks OK stylistically. I didn't try to closely review for correctness.

@illwieckz
Copy link
Member Author

I have tested with many maps from many games without noticing any regression. The changes are not rocket science anyway, were just boring and annoying to do.

@illwieckz illwieckz merged commit ff3603c into DaemonEngine:master Apr 14, 2020
illwieckz added a commit that referenced this pull request Apr 16, 2020
- #317 with 8225d6 required r_deluxeMapping to be latched
- #301 will require it too to tell tr_bsp to load deluxemap
  even if lightmap is disabled
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Renderer T-Cleanup T-Improvement Improvement for an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants