[Bug 95466] SSAO doesn't work as expected in Supertuxkart
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Thu May 26 00:48:15 UTC 2016
https://bugs.freedesktop.org/show_bug.cgi?id=95466
--- Comment #4 from Deve <deveee at gmail.com> ---
I was able to make it working properly by this patch:
diff --git a/data/shaders/ssao.frag b/data/shaders/ssao.frag
index 641e3f9..91e528b 100644
--- a/data/shaders/ssao.frag
+++ b/data/shaders/ssao.frag
@@ -40,7 +40,7 @@ void main(void)
float bl = 0.0;
float m = log2(r) + 6 + log2(invSamples);
- float theta = 2. * 3.14 * tau * .5 * invSamples + phi;
+ float theta = radians(mod(degrees(2. * 3.14 * tau * .5 * invSamples +
phi), 360.));
vec2 rotations = vec2(cos(theta), sin(theta)) * screen;
vec2 offset = vec2(cos(invSamples), sin(invSamples));
It looks that intel drivers doesn't like to have very big cosinus and sinus
angles. I needed to use modulo to make it smaller. Originally the theta value
was something around 10000...
--
You are receiving this mail because:
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/intel-3d-bugs/attachments/20160526/aab63236/attachment.html>
More information about the intel-3d-bugs
mailing list