Skip to content

Commit 2dbffbe

Browse files
committed
Fixed SSAO on intel.
In ssao.frag we are computing theta valaue and it looks that intel driver doesn't like too big values for sinus and cosinus computations. I just used modulo 360 to store lower angle values in theta variable.
1 parent e841ae4 commit 2dbffbe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

data/shaders/ssao.frag

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ void main(void)
4040
float bl = 0.0;
4141
float m = log2(r) + 6 + log2(invSamples);
4242

43-
float theta = 2. * 3.14 * tau * .5 * invSamples + phi;
43+
float theta = mod(2. * 3.14 * tau * .5 * invSamples + phi, 360.);
4444
vec2 rotations = vec2(cos(theta), sin(theta)) * screen;
4545
vec2 offset = vec2(cos(invSamples), sin(invSamples));
4646

0 commit comments

Comments
 (0)