summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorHugo Locurcio <hugo.locurcio@hugo.pro>2019-05-26 11:50:25 +0200
committerHugo Locurcio <hugo.locurcio@hugo.pro>2019-05-26 12:01:01 +0200
commiteb0cced3c0267372381b4bb441475a18d59973ff (patch)
treeceee728f0b165dee640a5ae224183915201c8f9b /drivers
parent0d8f1ba6a9182d1f1af39097e2165fc9807377f5 (diff)
Improve SSAO performance and quality
This decreases the number of samples significantly, leading to a notable performance increase with only a very slight loss in visual quality. This also tweaks the default SSAO settings to use 3×3 blurring, which makes noise patterns much less visible.
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gles3/shaders/ssao.glsl6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gles3/shaders/ssao.glsl b/drivers/gles3/shaders/ssao.glsl
index be44365169..d9cdc3fc1f 100644
--- a/drivers/gles3/shaders/ssao.glsl
+++ b/drivers/gles3/shaders/ssao.glsl
@@ -16,15 +16,15 @@ void main() {
#define TWO_PI 6.283185307179586476925286766559
#ifdef SSAO_QUALITY_HIGH
-#define NUM_SAMPLES (80)
+#define NUM_SAMPLES (16)
#endif
#ifdef SSAO_QUALITY_LOW
-#define NUM_SAMPLES (15)
+#define NUM_SAMPLES (8)
#endif
#if !defined(SSAO_QUALITY_LOW) && !defined(SSAO_QUALITY_HIGH)
-#define NUM_SAMPLES (40)
+#define NUM_SAMPLES (12)
#endif
// If using depth mip levels, the log of the maximum pixel offset before we need to switch to a lower