Skip to content

Correct spotlight attenuation angle calculation#2250

Open
ada-tv wants to merge 1 commit into
overte-org:masterfrom
ada-tv:fix/soft-spotlight-cutoff
Open

Correct spotlight attenuation angle calculation#2250
ada-tv wants to merge 1 commit into
overte-org:masterfrom
ada-tv:fix/soft-spotlight-cutoff

Conversation

@ada-tv
Copy link
Copy Markdown
Collaborator

@ada-tv ada-tv commented May 1, 2026

The part of #1481 that doesn't need a new light property

Master

Aliased and difficult to tune since spotlights were calculated as 180° flat lights with a hard angular cutoff

45° Exp. 1 45° Exp. 2 60° Exp. 6
overte-snap-by-ada-tv-on-2026-05-02_03-56-55 overte-snap-by-ada-tv-on-2026-05-02_03-57-32 overte-snap-by-ada-tv-on-2026-05-02_03-58-05

This PR

Smooth and easier to tune, spotlight falloff angle is calculated correctly

Inner angle is currently hardcoded to 98% of the outer angle

Tried my best to match the existing exponent behavior, though the way it works is a bit weird and there are cases where the spotlight just completely disappears (high exponents with low angles)

45° Exp. 1 45° Exp. 2 60° Exp. 6
overte-snap-by--on-2026-05-02_03-56-58 overte-snap-by--on-2026-05-02_03-57-33 overte-snap-by--on-2026-05-02_03-58-08

@ada-tv ada-tv added needs CR This pull request needs to be code reviewed needs QA This pull request needs to be tested renderer Issues and feature requests related to the renderer labels May 1, 2026
Copy link
Copy Markdown

@kaejuh kaejuh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks probably simple and good

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs CR This pull request needs to be code reviewed needs QA This pull request needs to be tested renderer Issues and feature requests related to the renderer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants