Skip to content

Fix lens flares not being occluded by geometry. - #172

Merged
IsaacMarovitz merged 1 commit into
sonicnext-dev:mainfrom
squidbus:lensflare
Sep 21, 2025
Merged

Fix lens flares not being occluded by geometry.#172
IsaacMarovitz merged 1 commit into
sonicnext-dev:mainfrom
squidbus:lensflare

Conversation

@squidbus

@squidbus squidbus commented Sep 21, 2025

Copy link
Copy Markdown
Collaborator

Adds logic for handling conditional survey and conditional rendering states.

When conditional survey is enabled, shaders are given a spec constant telling them to record the number of fragment invocations into a side buffer. When conditional rendering is enabled, this side buffer is used to determine whether to discard fragments.

Additionally, the texture descriptor set max is decreased to 32768, as using the full 65536 was filling the descriptor heap on D3D12 and causing asserts trying to set up the descriptor set for the buffer. I just halved it to still be a nice number since we will never reach that many textures anyway.

Fixes #122

@IsaacMarovitz IsaacMarovitz linked an issue Sep 21, 2025 that may be closed by this pull request
@IsaacMarovitz
IsaacMarovitz merged commit 3183c62 into sonicnext-dev:main Sep 21, 2025
12 checks passed
@squidbus
squidbus deleted the lensflare branch December 12, 2025 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Lens flares aren't occluded by terrain

2 participants