Golden Ratio Blue Noise Sampling

Improved fog sampling and stochastic transparency by generating low discrepancy temporal sequences using the golden ratio on blue noise samples
This commit is contained in:
Reinier Vens 2021-04-12 14:36:32 +01:00
commit ec1f8f56d4
8 changed files with 41 additions and 25 deletions

View file

@ -26,9 +26,10 @@ public class BlueNoiseProvider : MonoBehaviour
{
Shader.SetGlobalVector("_DitheringCoords", new Vector4(
(float)_camera.scaledPixelWidth / (float)NoiseTexture.width,
(float)_camera.scaledPixelWidth / (float)NoiseTexture.height,
(float)_camera.scaledPixelHeight / (float)NoiseTexture.height,
Random.value,
Random.value
));
Shader.SetGlobalInt("_FrameNumber", Time.frameCount);
}
}