summaryrefslogtreecommitdiffstats
path: root/ssao.cginc
diff options
context:
space:
mode:
Diffstat (limited to 'ssao.cginc')
-rw-r--r--ssao.cginc5
1 files changed, 5 insertions, 0 deletions
diff --git a/ssao.cginc b/ssao.cginc
index ad20a28..f8d7e0d 100644
--- a/ssao.cginc
+++ b/ssao.cginc
@@ -23,6 +23,11 @@ float get_ssao(v2f i, float3x3 tangentToWorld, out float2 debug) {
cos(ssao_theta), -sin(ssao_theta),
sin(ssao_theta), cos(ssao_theta));
+ [branch]
+ if (round(_SSAO_Samples) < 1) {
+ return 1;
+ }
+
float ssao_occlusion = 0;
const float ssao_eps = 1E-5;
[loop]