Commit Graph

66 Commits

Author SHA1 Message Date
Vincent Lejeune
cfbbeef441 Clamp lod level in SSAO shader later. 2015-01-12 22:47:53 +01:00
Vincent Lejeune
95e2213b1e SSAO can me 0 sometimes 2015-01-12 20:13:11 +01:00
Vincent Lejeune
b8ab68b31a Fix precision issue in SSAO 2015-01-12 20:05:40 +01:00
vlj
496269e73b Make SSAO param changeable. 2014-08-09 18:51:52 +02:00
Vincent Lejeune
58c094917e Use an header included in every shaders. 2014-08-02 00:50:56 +02:00
vlj
40a7ab0780 Raise one of ssao tolerance value. 2014-07-17 00:12:54 +02:00
Vincent Lejeune
d7139920ed Fix position reconstruction formula in ssao 2014-07-12 19:54:52 +02:00
vlj
d2fc258124 Tweak ssao (again)
Random factor is less perdicable, no more spiral.
2014-06-23 01:03:55 +02:00
vlj
8f5dd6edae Some tweak to ssao. 2014-06-22 18:04:46 +02:00
vlj
e5a5c78045 Use a big triangle instead of 2 to cover full screen.
This allows to rasterize a single primitive instead of two, and avoid
trashing the cache between the 2 triangles drawing.
2014-06-03 19:56:59 +02:00
vlj
e571afc43b Speed up SSAO again
Use log2(xy) = log2(x) + log2(y), and approximate log2(alpha) =
log2(previous alpha) + .5.
Log2 is indeed a costly instruction.
2014-06-03 03:41:05 +02:00
vlj
164ffa2b4f Spped up SSAO
Avoid using cos/sin too much, use sum of cos/sin formula instead.
2014-06-03 03:14:39 +02:00
Stephen Just
f4992b80fc Fix errors when compiling shaders with UBOs disabled 2014-05-19 09:57:31 -06:00
vlj
883b39591f Width and height are passed by UBO 2014-05-17 02:39:55 +02:00
vlj
229b461a6c SSAO: Less abrupt transition 2014-05-14 03:26:43 +02:00
vlj
1d4bcd5ade SSAO: Increase beta constant to avoid error 2014-05-14 02:27:17 +02:00
vlj
86c8b9f83d Some tweaking to make ssao more apparent 2014-05-14 02:12:18 +02:00
Vincent Lejeune
59484ea09a DS buffer is not linear and cant be mipmapped
Use the method provided by SAO paper (ie convert to linear and then
mipmap)
2014-05-13 19:40:30 +02:00
vlj
26d48cdad0 SSAO: Stronger blur + tweak param
Use another algorithm to have gaussian blur that lets us customise
radius more easily.
2014-05-12 23:59:17 +02:00
vlj
8e17ae90b6 Resolution independent ssao 2014-05-12 20:13:12 +02:00
vlj
23ba597a1c SSAO: Use int rounding 2014-05-12 18:39:33 +02:00
vlj
229b72f84a Render SSAO at fullscreen resolution. 2014-05-12 01:06:33 +02:00
vlj
4fcec02123 Remove ssao depth guard. 2014-05-12 00:34:44 +02:00
vlj
7e1625da5e Tweak SSAO params. 2014-05-12 00:30:36 +02:00
vlj
f8544493b6 Improve SSAO perf 2014-05-12 00:14:50 +02:00
vlj
11b7d20ad8 Use the mipmap trick to speed up ssao. 2014-05-12 00:03:42 +02:00
Vincent Lejeune
567974aeed Use dFdX/dFdY to compute normals in SSAO. 2014-05-11 18:09:48 +02:00
Vincent Lejeune
e5410e23a2 Use Alchemy SSAO 2014-05-11 18:00:30 +02:00
vlj
2a1623d8ca Use a more efficient screen to view conversion
Also use the opportunity to use UBO where possible.
2014-05-02 18:11:34 +02:00
Vincent Lejeune
da15aebcda SSAO: Clamp to 0. 2014-04-22 18:22:39 +02:00
vlj
878a639a84 Another ssao tweak. 2014-04-20 02:56:07 +02:00
Vincent Lejeune
123a192963 Use half res FBO for SSAO
SSAO is a medium frequency effect, using half res fbo is fine and
improve performance and look by doing an additionnal bilinear filtering.
Also tune up some values.
2014-04-14 01:01:36 +02:00
Vincent Lejeune
01b88fde9d Factorize DecodeNormal from misc shaders. 2014-03-21 18:17:21 +01:00
Vincent Lejeune
da4896c3d8 SSAO: tweak fade distance. 2014-03-01 22:50:22 +01:00
Vincent Lejeune
af862cb6c5 #version autoadded to shaders and turn some v120 2014-02-28 17:29:05 +01:00
Vincent Lejeune
0243546e4d Use an openGL 3.3 compatibility context when available. 2014-02-12 22:16:10 +01:00
Vincent Lejeune
f50e6f817d Use another normal encoding method from a crytek slide. 2014-01-27 23:29:46 +01:00
Vincent Lejeune
0b531b20f7 SSAO: Use depth buffer. 2014-01-27 20:24:57 +01:00
Vincent Lejeune
ac8a729bcd SSAO: Actually simplifying code was a mistake. 2014-01-27 00:56:58 +01:00
Vincent Lejeune
684d265924 SSAO: Disable alpha test and simplify code 2014-01-27 00:53:52 +01:00
Vincent Lejeune
993d1e26dc Revert "SSAO: Remove the strenght parameter"
This reverts commit b92f0b6ecc.
2014-01-27 00:52:20 +01:00
Vincent Lejeune
63882318a7 SSAO: Fix typo and use 16 samples 2014-01-27 00:47:35 +01:00
Vincent Lejeune
b92f0b6ecc SSAO: Remove the strenght parameter 2014-01-27 00:41:41 +01:00
Vincent Lejeune
31991ecd7e SSAO: Improve randomness using NEAREST filtering 2014-01-27 00:09:36 +01:00
Marianne Gagnon
30011be115 My tweaks to SSAO, to improve randomness and final blending 2014-01-25 22:03:47 -05:00
Vincent Lejeune
ceb1fdc88a SSAO: Use a single texture fetch for random. 2014-01-20 20:43:03 +01:00
Vincent Lejeune
32836cf93d Use 8 samples instead of 16 2014-01-19 20:57:58 +01:00
Vincent Lejeune
859be83074 Explicitly define fragment exported values. 2014-01-19 19:31:00 +01:00
Vincent Lejeune
fb6649eaad texture2D is deprecated, use texture instead 2014-01-19 18:53:35 +01:00
Vincent Lejeune
d6d8301f17 SSAO: Use a noise texture rather than a function 2014-01-19 18:20:57 +01:00