Repository navigation
fix(render): Bruneton atmosphere stays off until measured #395
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
f51eb33
feat(render): turn Bruneton atmosphere on by default
cursoragent b7bb6c1
fix(render): keep atmosphere off until the heavy scene is measured
cursoragent bcc89ae
fix(render): clear depth for the Bruneton sky and test pixels
cursoragent 93e917e
fix(render): measure Bruneton with Aravath fog and a real far plane
cursoragent bee6f15
fix(render): composite fog and shafts over the Bruneton sky
cursoragent 91cff89
fix(render): use one screen-y mapping for fog and shafts
cursoragent c0e291f
fix(render): sample in-margin shafts and inline the screen helper
cursoragent 8d6e986
fix(render): share the flag gate and the game-camera sun
cursoragent 3eacf8a
fix(render): one budget gate and a fog-on shaft check
cursoragent File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix(render): use one screen-y mapping for fog and shafts
Fog froxels and the shaft sun follow the sky and pbr mapping: ndc.y = 1 - 2*uv.y, uv.y = 0.5 - 0.5*ndc.y. The pixel test samples an upper sky row and a lower ground row with an off-center sun, so a mirrored composite fails. The budget camera far plane is GAME_ZFAR. Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>
- Loading branch information
commit 91cff899b96a88f0ed2dd2321b758f7af05c0e3e
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| // Screen UV for this Y-up view. uv.y 0 is the top of the texture, NDC y +1. | ||
| // pbr.wgsl uses the same pair: ndc.y = 1 - 2*uv.y, uv.y = 0.5 - 0.5*ndc.y. | ||
|
|
||
| fn screen_uv_to_ndc(uv: vec2<f32>) -> vec2<f32> { | ||
| return vec2<f32>(uv.x * 2.0 - 1.0, 1.0 - uv.y * 2.0); | ||
| } | ||
|
|
||
| fn ndc_to_screen_uv(ndc: vec2<f32>) -> vec2<f32> { | ||
| return vec2<f32>(ndc.x * 0.5 + 0.5, 0.5 - ndc.y * 0.5); | ||
| } | ||
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
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
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
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
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
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
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.
Uh oh!
There was an error while loading. Please reload this page.