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

Stop rendering clear lights #4225

Commits on Jul 31, 2023

  1. Configuration menu
    Copy the full SHA
    8cc7044 View commit details
    Browse the repository at this point in the history
  2. Be clear about visible area nullability

    `ZoneView.getVisibleArea(PlayerView)` is guaranteed to return a non-`null` result. This method is now marked as
    `@Nonnull` to make this clear, and we can avoid several `null` checks in `ZoneRenderer` as a result.
    kwvanderlinde committed Jul 31, 2023
    Configuration menu
    Copy the full SHA
    8e6dbc6 View commit details
    Browse the repository at this point in the history
  3. Cache total darkened areas inside Illuminations

    We already cached total lit areas, and this change also adds darkness. Just as for lit areas, the necessary computation
    is done lazily.
    
    The terminology has also been cleaned up: the lit area used to be termed "visible area", but `Illumination` doesn't
    actually know anything about visibility. So `Illumination.getVisibleArea()` has been renamed to
    `Illumination.getLitArea()`, and other uses of the term "visible" have also been removed.
    kwvanderlinde committed Jul 31, 2023
    Configuration menu
    Copy the full SHA
    68e7551 View commit details
    Browse the repository at this point in the history
  4. Separate darkness rendering from light rendering for non-GM players

    Non-GM players need to have darkness rendered as blackness rather than as lights. We used to accomplish this by
    rendering each darkness as a regular light (as the GM would see it), then would paint each darkness as black
    afterwards.
    
    Now we don't even represent the darkness as a `DrawableLight` unless the player is a GM. This way we aren't wasting time
    compositing darkness lights that won't even be visible in the end. We also don't render the darknesses individually, but
    instead render the entire darkened area as black in a single pass.
    kwvanderlinde committed Jul 31, 2023
    Configuration menu
    Copy the full SHA
    39d4a80 View commit details
    Browse the repository at this point in the history
  5. Do not render clear lights

    Clear lights no longer get mapped to `DrawableLight` instances, making it so that they no longer get rendered.
    
    With this change, `DrawableLight`s can no longer have `null` paints. This means we no longer need to support "default
    paints" in `ZoneRenderer.renderLightOverlay()`, so that parameter and related logic have been removed.
    kwvanderlinde committed Jul 31, 2023
    Configuration menu
    Copy the full SHA
    d488009 View commit details
    Browse the repository at this point in the history