Repository navigation
Haze on tree, bush and facade impostors - #16
Merged
Merged
Conversation
Impostors used a plain unlit material, so distant trees and facades kept full contrast while everything around them faded into the haze. They now use an unlit surface shader (impostorSurface) with the same haze as the rest of the scenery. The cut-out is a discard below the mask threshold in an opaque material: a transparent CustomMaterial with an opacity threshold drew without depth, and farther trees covered nearer bushes. Tracks without haze keep the old UnlitMaterial. README: haze lives in the scenery shaders, not in post-processing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Impostors (trees, bushes, building facades) used a plain unlit material, so they kept full contrast while the ground, walls and buildings around them faded into the haze.
impostorSurface(Ground.metal) mixes the photo with the haze colour by distance, like the other scenery shaders.discard_fragment()below the mask threshold in an opaque material. A transparentCustomMaterialwithopacityThresholddrew without depth: farther trees covered nearer bushes (caught on a fixed-frame comparison, forest side camera).-noHaze) keep the oldUnlitMaterial.Testing (simulator, iPad M5, iOS 27)
-haze 0.99,20: trees, bushes and facades fog together with walls and road (forest, city, snow).-haze 0.001,20vs-noHaze: same tree colour close up; foliage slightly denser (hard mask edge instead of blended).tools/scenery-shots.sh, all five regions with normal haze: look correct, frame time unchanged (simulator capped at 60 fps).GameplayUITests: 7/7 passed.🤖 Generated with Claude Code