forked from tippesi/Atlas-Engine
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
General performance impovements (tippesi#24)
* Improved cloud performance * Fixed some issues * Improvements for the cloud temporal resolve * Better blue noise sampling * Small adjustments * Fixed volumetric clouds temporal rejection * Some smaller changes
- Loading branch information
Showing
26 changed files
with
198 additions
and
121 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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 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 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 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 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 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 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,29 @@ | ||
/* | ||
Based on: | ||
Eric Heitz, Laurent Belcour, V. Ostromoukhov, David Coeurjolly, and Jean-Claude Iehl. 2019. | ||
A low-discrepancy sampler that distributes monte carlo errors as a blue noise in screen space. | ||
In ACM SIGGRAPH 2019 Talks (SIGGRAPH '19). Association for Computing Machinery, New York, NY, USA, | ||
Article 68, 1–2. https://doi.org/10.1145/3306307.3328191 | ||
*/ | ||
|
||
float SampleBlueNoise(ivec2 pixel, int sampleIndex, int sampleDimension, | ||
sampler2D scramblingRanking, sampler2D sobolSequence) { | ||
|
||
// wrap arguments | ||
pixel = pixel % 128; | ||
sampleIndex = sampleIndex % 256; | ||
sampleDimension = sampleDimension % 4; | ||
|
||
// xor index based on optimized ranking | ||
int rankedSampleIndex = sampleIndex ^ int(clamp(texelFetch(scramblingRanking, pixel, 0).b * 256.0, 0.0, 255.0)); | ||
|
||
// fetch value in sequence | ||
int value = int(clamp(texelFetch(sobolSequence, ivec2(rankedSampleIndex, 0), 0)[sampleDimension] * 256.0, 0.0, 255.0)); | ||
|
||
// If the dimension is optimized, xor sequence value based on optimized scrambling | ||
value = value ^ int(clamp(texelFetch(scramblingRanking, pixel, 0)[sampleDimension % 2] * 256.0, 0.0, 255.0)); | ||
|
||
// convert to float and return | ||
float v = (0.5 + value) / 256.0; | ||
return v; | ||
} |
This file contains 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 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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 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 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 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 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 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
Oops, something went wrong.