Commit Graph

865 Commits

Author SHA1 Message Date
Vincent Lejeune
c2859d24ce Improved shadow stability 2014-11-15 21:27:15 +01:00
Vincent Lejeune
448f254a2b Fixes 2014-11-15 21:02:24 +01:00
Vincent Lejeune
a7b8ba13cd Add shader content 2014-11-15 20:43:44 +01:00
Vincent Lejeune
7e3c2c4897 Add a shader to blur shadow 2014-11-15 20:37:47 +01:00
Vincent Lejeune
687bb6e065 Spare a few lds inst 2014-11-15 19:18:07 +01:00
Vincent Lejeune
6cc721eaf9 Use CS for gaussian6 2014-11-15 01:11:26 +01:00
samuncle
ffb76788a9 Minor tweak with transluscent material 2014-11-13 18:02:25 +01:00
samuncle
1bd3ee24c6 Add a description to the shader 2014-11-12 01:22:33 +01:00
samuncle
f39ae90b6e merge with trunk + try to adapt to the new blur system 2014-11-12 00:08:21 +01:00
Vincent Lejeune
192ed8a486 Fix classic fog 2014-11-11 22:43:25 +01:00
Vincent Lejeune
09fa1ee3cb Implement scattering for point light 2014-11-11 22:36:27 +01:00
Vincent Lejeune
bd4fe57524 Use fog start value to determine density 2014-11-11 21:52:54 +01:00
Vincent Lejeune
84affec451 Change fog equation 2014-11-10 22:08:12 +01:00
Vincent Lejeune
85bbc0f8b8 Use variable sigma for blur filter 2014-11-10 21:32:04 +01:00
samuncle
e20d8bdcdf Merge branch 'master' of https://github.com/supertuxkart/stk-code into lensflare
Keep lens flare updated with trunk
2014-11-08 01:51:40 +01:00
Vincent Lejeune
04d313671c Fix sqrt(int) in diffuseenvmap 2014-11-08 01:02:46 +01:00
Vincent Lejeune
5eefe0c0ad Make envmap reflexion less blurry 2014-11-08 00:57:49 +01:00
samuncle
2a440bb2cb minor modification to the blueish mood of lens flare 2014-11-07 16:20:39 +01:00
samuncle
1e547652f7 Merge branch 'master' of https://github.com/supertuxkart/stk-code into lensflare
Keep lens flare updated with master
2014-11-07 16:14:11 +01:00
Vincent Lejeune
909948c9a4 Implement depth histogram to position cascade split 2014-11-07 13:42:13 +01:00
Vincent Lejeune
cacb008ae6 Prepare compute shader to stretch lightcoord 2014-11-07 13:42:13 +01:00
samuncle
52bc4cebd4 Add the lensflare shader 2014-11-04 21:15:18 +01:00
Vincent Lejeune
92ecd01e61 Make cascade split modifiable 2014-11-04 20:53:32 +01:00
samuncle
d7caebe847 enable vignette during races 2014-11-03 21:53:44 +01:00
Vincent Lejeune
ddecd23472 Tweak values 2014-11-02 19:07:02 +01:00
Vincent Lejeune
ebe11370a2 Reenable bluring 2014-11-02 16:30:44 +01:00
Vincent Lejeune
c5186e3ab3 Use depth in exp space 2014-11-02 16:26:46 +01:00
Vincent Lejeune
b975b63eea Use proper depth linear value 2014-11-02 16:00:41 +01:00
Vincent Lejeune
f5a44c0a19 Take more sample 2014-11-02 02:42:44 +01:00
Vincent Lejeune
9113aa7a39 Implement Exponential Shadow map 2014-11-02 02:36:10 +01:00
Vincent Lejeune
7679213e26 Use exp algorithm for the gaussian blur 2014-11-02 02:35:02 +01:00
Vincent Lejeune
6aed902ae0 Store depth in color buffer instead of depth
This allows for instance to blur it using already existing shaders
2014-11-01 22:38:38 +01:00
Vincent Lejeune
ee687440c7 Increase shadow filtering 2014-10-29 18:57:39 +01:00
Vincent Lejeune
794ab54b7a Clamp lodval 2014-10-24 00:41:34 +02:00
Vincent Lejeune
9ca4d7e3e6 Improve ibl specular reflexion using mipmap chain 2014-10-22 14:49:06 +02:00
Vincent Lejeune
2f45266c6f Fix position of speedmeter
Only need to get the texture
2014-10-17 18:51:41 +02:00
Vincent Lejeune
ce7f017adf Some fixes 2014-10-17 18:43:39 +02:00
Vincent Lejeune
ea3cc141ff Fix grass in azdo mode 2014-10-08 01:01:28 +02:00
Vincent Lejeune
9de7d11ee4 Fix bloom effect on mesa 2014-10-07 00:00:16 +02:00
Vincent Lejeune
20ea7ca271 GI use sun color value 2014-10-06 22:51:41 +02:00
vlj
b10f1a3ef2 Tweak envmap 2014-10-06 02:29:18 +02:00
vlj
c7b98c4e6c Emulate envmap specular reflexion 2014-10-06 02:19:21 +02:00
Vincent Lejeune
44792a1490 Fix splatting 2014-10-05 22:46:02 +02:00
Vincent Lejeune
0db951f374 Try to emulate enery conservation 2014-10-05 21:53:06 +02:00
Vincent Lejeune
300a09746f Additionnal fixes 2014-10-05 21:45:56 +02:00
Vincent Lejeune
a8161288a9 Convert remaining shaders 2014-10-05 20:47:13 +02:00
Vincent Lejeune
9f2b66d195 Use specmap on others mats 2014-10-05 20:37:49 +02:00
Vincent Lejeune
0121ae8db6 Use specmap value 2014-10-05 02:30:01 +02:00
Vincent Lejeune
88954a5d88 Prepare shader for specmap value 2014-10-05 02:12:04 +02:00
vlj
30dda3e343 Fix sky warp 2014-10-02 02:53:31 +02:00
vlj
2236e8dd1c Fix extra respawning particles 2014-10-01 01:19:49 +02:00
vlj
58e1b73752 Fix bloom computation 2014-09-24 01:19:37 +02:00
Vincent Lejeune
5643e38886 Some factorisation for non instanced path 2014-09-20 19:28:06 +02:00
Vincent Lejeune
b3e124b93e Some fixes 2014-09-20 18:48:22 +02:00
Vincent Lejeune
b034049a28 Support for 3 tex mats 2014-09-19 23:09:22 +02:00
Vincent Lejeune
24cd727899 Add glossytex to textures 2014-09-19 19:54:00 +02:00
Vincent Lejeune
1d2c77d86a Use ProjectionViewMatrix in glow_object.vert 2014-09-17 02:12:28 +02:00
Vincent Lejeune
b769e46a00 Use texture instead of image in SSAO. 2014-09-16 15:18:29 +02:00
Vincent Lejeune
4c6df4821d Revert "Do not allow specvalue to be below 0."
This reverts commit 6b4430caaa.
2014-09-16 00:37:49 +02:00
Vincent Lejeune
fbb71bca7e Revert "Fix negative value inside tonemap"
This reverts commit 16dc973faa.
2014-09-16 00:37:37 +02:00
Vincent Lejeune
b5598fda57 Revert "Force non negative value in bloom"
This reverts commit cb922ed4db.
2014-09-16 00:37:23 +02:00
vlj
cb922ed4db Force non negative value in bloom 2014-09-15 22:11:53 +02:00
Vincent Lejeune
16dc973faa Fix negative value inside tonemap
It should be checked before but since it's not always reproducible.
2014-09-15 01:10:12 +02:00
Vincent Lejeune
6b4430caaa Do not allow specvalue to be below 0.
Just in case it shouldnt be possible anyway.
2014-09-15 01:06:15 +02:00
Vincent Lejeune
7c54ac4d81 Fix second texcoord in instanced_object_pass.vert 2014-09-14 23:07:10 +02:00
Vincent Lejeune
dea23d7a69 Properly reapply HD3000 particle fix 2014-09-10 18:57:40 +02:00
Vincent Lejeune
e77b5dddeb Revert "Forgot to fix a particle shader for hd3000"
This reverts commit 48fcea8ee8.
2014-09-10 18:57:03 +02:00
Vincent Lejeune
48fcea8ee8 Forgot to fix a particle shader for hd3000 2014-09-10 18:09:38 +02:00
Vincent Lejeune
8fd97615f3 Fix particle for hd3000 2014-09-10 01:42:51 +02:00
Vincent Lejeune
94cd8d5c51 Avoid some useless computation in some vert shaders 2014-09-05 23:41:12 +02:00
Vincent Lejeune
1e172dbf33 Fix glowobject frag shader 2014-09-05 22:17:57 +02:00
vlj
3083df450f Gather object in instanced calls 2014-09-02 23:23:23 +02:00
Vincent Lejeune
99b110cc99 Use uvec2 instead of sampler2D 2014-08-29 01:30:19 +02:00
vlj
5878cb35ec Implement runtime detection of srgb bindless fix 2014-08-28 22:02:12 +02:00
vlj
53c52470ee Use one call for each shadow cascade instead of a big one. 2014-08-26 21:56:16 +02:00
Vincent Lejeune
bf5410b793 Add unlit instanced shader 2014-08-26 20:34:59 +02:00
Vincent Lejeune
cad1efbff1 Add instanced detail shader 2014-08-26 20:34:37 +02:00
Vincent Lejeune
0960f090dc Add instanced spheremap shader 2014-08-26 20:34:26 +02:00
Vincent Lejeune
7bff68870c Read sampler from attributes. 2014-08-24 21:50:59 +02:00
Vincent Lejeune
6ac3d69471 Play with bindless textures 2014-08-22 23:48:28 +02:00
Vincent Lejeune
547018f0ab Port PointLight shader 2014-08-22 00:30:14 +02:00
vlj
f77695c098 Add Tangent/Bitangent in instanced object shader. 2014-08-15 17:15:19 +02:00
Vlj
7fbe529e6f Forget to add Tangent/BiTangent with pre 330 2014-08-15 02:14:30 +02:00
Vlj
d3ec1a27ce Completly unroll the loop 2014-08-15 00:02:43 +02:00
Vlj
4829b8ddd8 Manually unroll rh shader 2014-08-14 23:58:11 +02:00
Vincent Lejeune
f9c692052e Try a fix for nvidia and GI 2014-08-14 21:26:16 +02:00
Vincent Lejeune
8117260bf6 Factorise attribute location of simulation program. 2014-08-13 22:26:52 +02:00
Vincent Lejeune
dc02eec7b6 Port particle rendering shaders too. 2014-08-13 21:04:03 +02:00
Vincent Lejeune
22137eee88 Port UI shaders. 2014-08-13 20:25:56 +02:00
Vincent Lejeune
70b0fce50c Add support for instanced normal map mesh. 2014-08-13 19:20:40 +02:00
Vincent Lejeune
292aa0cbc4 Factorize FullScreen shaders invocations. 2014-08-13 02:01:29 +02:00
Vincent Lejeune
020e939e2b Normalize normals in normal view. 2014-08-09 21:24:50 +02:00
Vincent Lejeune
c546b25ae9 Fix perspective in normal view. 2014-08-09 21:19:26 +02:00
Vincent Lejeune
c07aed260a Visualize vertex normals in normal view. 2014-08-09 21:09:31 +02:00
Vincent Lejeune
bcc2196ccf Fix SSAO on splatting material. 2014-08-09 20:05:49 +02:00
vlj
496269e73b Make SSAO param changeable. 2014-08-09 18:51:52 +02:00
Vincent Lejeune
8db09a55cd Add Splatting RSM shader type. 2014-08-08 01:07:55 +02:00
vlj
60f76ee612 Fix RSM 2014-08-07 22:45:25 +02:00
vlj
6c3aeceb51 Fix GI
It was using wrong swizzle for depth texture.
2014-08-07 22:32:42 +02:00
Vincent Lejeune
95fb3ea580 Add support moving texture in rsm. 2014-08-07 20:44:33 +02:00
Vincent Lejeune
e932638aef Port sunlight* shaders to singleton. 2014-08-07 20:07:03 +02:00
Vincent Lejeune
87bf242164 Fix shadows for unlit with alpha ref. 2014-08-07 02:12:13 +02:00
Vincent Lejeune
858b789419 Support vertex color for alpha ref material. 2014-08-07 02:11:55 +02:00
Vincent Lejeune
c0d57100a7 Enable ref + vertex color for unlit mat. 2014-08-07 01:50:53 +02:00
Vincent Lejeune
79fba1779e Port stkbillboard to singleton shader 2014-08-07 00:52:44 +02:00
Vincent Lejeune
ca30bf7d5a Add screen fallback in case no ubo are here. 2014-08-02 01:02:06 +02:00
Vincent Lejeune
09d0c2eef5 Forget a shader + remove shader output 2014-08-02 00:56:36 +02:00
Vincent Lejeune
58c094917e Use an header included in every shaders. 2014-08-02 00:50:56 +02:00
Vincent Lejeune
f9c7c3db5e Try a fix for intel and kart selection screen. 2014-07-30 01:25:27 +02:00
Vincent Lejeune
a35c33e4f6 Remove ambient
It's already added in the diffuse env pass
2014-07-29 23:56:48 +02:00
hiker
c322c507da Fix shader error (vlj, please check). 2014-07-22 13:28:12 +10:00
vlj
4e079b0e14 Fixes shader errors reported by Auria 2014-07-17 02:17:49 +02:00
vlj
23bc1f9344 Remove use of texture2d in rh.frag 2014-07-17 02:11:04 +02:00
vlj
40a7ab0780 Raise one of ssao tolerance value. 2014-07-17 00:12:54 +02:00
vlj
9230cab9dd Add shadow for instanced grass. 2014-07-15 00:02:17 +02:00
vlj
ffe77e4aa4 Port instanced pass2 shaders to singleton 2014-07-14 23:41:47 +02:00
Vincent Lejeune
62bf54b8f3 Simplify displace handling
Should be faster now
2014-07-14 18:54:40 +02:00
Vincent Lejeune
f2acac7230 Inadverly inverted shadow and shadow_grass.vert 2014-07-13 21:37:12 +02:00
Vincent Lejeune
54b1ce39e4 Add Grass shadows.
For non instancing object.
2014-07-13 21:33:44 +02:00
Vincent Lejeune
7b9fc60f9c Factorise grass material 2014-07-13 18:56:17 +02:00
Vincent Lejeune
55a5185796 Avoid drawing negative color with splatting material. 2014-07-12 21:25:11 +02:00
Vincent Lejeune
d7139920ed Fix position reconstruction formula in ssao 2014-07-12 19:54:52 +02:00
vlj
822c8725dd Remove rimlight material 2014-07-10 01:02:52 +02:00
vlj
481a5bd0d0 Fix bubble shader with glsl < 330. 2014-07-09 17:49:47 +02:00
vlj
4c3db6ca59 Mix texture for displace. 2014-07-09 03:41:08 +02:00
Vincent Lejeune
ac55a70c83 Mimic previous motion blur behavior
Depending on zypper + mask on center.
2014-07-09 02:29:49 +02:00
Vincent Lejeune
aec31b28dd Merge remote-tracking branch 'origin/VAOGatherer' 2014-07-09 02:17:25 +02:00
samuncle
1ecaea18b2 Add a fade out to avoid bokeh on distant objects (stars, moon, planet, background mountain) 2014-07-09 01:21:31 +02:00
vlj
6276cafba2 Use global VAO for rendering 2014-07-08 18:31:46 +02:00
Vincent Lejeune
d961a9a8bc Fix vertex color for object_pass2 2014-07-08 01:35:04 +02:00
Vincent Lejeune
746e910e46 Remove some Motion Blur unused vars 2014-07-07 19:25:41 +02:00
Vincent Lejeune
f23f7b05e5 Turn motion blur into camera space motion blur 2014-07-07 18:44:25 +02:00
vlj
fd5061057d Fix for instanced object with default material. 2014-07-02 22:37:51 +02:00
vlj
d5c91dcfe4 Remove Untextured material. 2014-07-02 22:37:51 +02:00
vlj
475d738d4b Merge remote-tracking branch 'origin/NewRTTMinimap' 2014-07-02 00:24:03 +02:00
vlj
b861c3fb73 Use fixed attribute location for instanced objects. 2014-06-29 22:19:10 +02:00
vlj
bc7e2cd517 Some cleanups 2014-06-29 16:26:12 +02:00
Vincent Lejeune
8f59d8cac0 Add a weight for vignette. 2014-06-28 00:20:44 +02:00
vlj
bde17a28d5 Fix for GL 3.1 context 2014-06-27 20:58:52 +02:00
Marianne Gagnon
394fb9be9b Merge branch 'master' into NewRTTMinimap 2014-06-26 20:23:02 -04:00
vlj
79838bffe3 Add 50% transparency to minimap. 2014-06-26 00:46:55 +02:00
vlj
a93b96d0b1 Use UBO matrixes in displace. 2014-06-25 01:22:03 +02:00
vlj
8e6fba3185 Some fixes 2014-06-24 23:57:29 +02:00
vlj
948c5e8aa2 Use explicit attribute location.
Should help implementing basevertex later, and simplify vao creation a
lot.
2014-06-24 23:17:41 +02:00
vlj
edc38c9933 Use object_pass.vert for transparent objects. 2014-06-24 22:20:01 +02:00
vlj
d2fc258124 Tweak ssao (again)
Random factor is less perdicable, no more spiral.
2014-06-23 01:03:55 +02:00
vlj
f76cd6e7a9 Implement bilateral with fragment codepath. 2014-06-22 18:04:46 +02:00
vlj
8f5dd6edae Some tweak to ssao. 2014-06-22 18:04:46 +02:00
Vincent Lejeune
3219e564d0 Implemented bilateral for compute path. 2014-06-22 18:04:45 +02:00
vlj
7e8486d670 Merge remote-tracking branch 'origin/shadowdebug' 2014-06-22 02:21:15 +02:00
Vincent Lejeune
71969acd22 Use a precomputed invmatrix in gi.frag
(General) matrix inversion is costly, it's better if it's done a single
time on cpu. Improve performance.
2014-06-20 23:10:31 +02:00
Vincent Lejeune
32e6942b55 Merge branch 'master' into shadowdebug 2014-06-18 01:02:51 +02:00
Vincent Lejeune
e2ef26e667 Add wireframe frustrum view. 2014-06-18 00:27:03 +02:00
hiker
f1c8fcc6d4 Fix 1366. 2014-06-15 22:14:50 +10:00
samuncle
08369d1fcb Added a new particle system for the torches and bring back the vignette 2014-06-14 00:42:57 +02:00
hiker
89d8a19dab Fixed shader compilation errors. 2014-06-11 09:11:07 +10:00
vlj
8cbeca44fd Add a way to display shadow map. 2014-06-08 22:18:32 +02:00
vlj
e959d6c857 MLAA: Use srgb for auxiliary buffer. 2014-06-08 03:28:24 +02:00
vlj
9bc89e0f40 Lower MLAA threshold. 2014-06-08 03:06:20 +02:00
vlj
588ec08bc1 Merge branch 'CS' 2014-06-05 03:33:02 +02:00
vlj
eb45954684 Implement Gaussian blur using Compute Shader
The filters are ~3.5 time faster with CS.
2014-06-05 03:19:18 +02:00
Vincent Lejeune
cead5081be Fix MLAA 2014-06-05 02:56:25 +02:00
Vincent Lejeune
5f1413e140 Merge branch 'master' into NewRTTWidget 2014-06-05 01:30:45 +02:00
vlj
f0b3cbfcd0 Gather bloom effect to avoid extra texture read.
I have a .5ms win here...
2014-06-03 20:46:01 +02:00
vlj
55ddffaf54 Another round of big triangle port. 2014-06-03 20:28:42 +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
d4fe539385 Do not write specular value in gi/diffuseenvmap 2014-06-03 17:40:21 +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
Vincent Lejeune
44f70454ad Fix dof overwriting alpha value. 2014-05-30 02:32:01 +02:00
Marianne Gagnon
7e9252e5b3 Merge branch 'master' into NewRTTWidget 2014-05-29 20:00:58 -04:00
vlj
40df4afc74 Support some debug option for GI 2014-05-28 07:47:06 +02:00
vlj
af16682a9e Add GI support 2014-05-28 07:47:06 +02:00
Vincent Lejeune
5caf028a71 Add RH support 2014-05-28 07:47:06 +02:00
Vincent Lejeune
180bd939e0 Add RSM support 2014-05-28 07:47:06 +02:00
vlj
2cf9bb6d2c Use UBO in MLAA 2014-05-25 03:21:08 +02:00
vlj
670c25dd26 Return alpha value in tonemap. 2014-05-25 03:13:19 +02:00
samuncle
bffc615a49 Tweak the scattering value to reduce the effect 2014-05-21 02:36:48 +02:00
Stephen Just
f4992b80fc Fix errors when compiling shaders with UBOs disabled 2014-05-19 09:57:31 -06:00
Vincent Lejeune
0ccac4c552 Forget to remove some unused shaders. 2014-05-18 19:59:03 +02:00
Vincent Lejeune
eca3999d52 Do some cleaning 2014-05-18 19:56:25 +02:00
Vincent Lejeune
838b44fc00 Remove Cautics effect
It's not used anywhere and I have no way to test it so it's useless.
2014-05-18 19:28:53 +02:00
vlj
32b2359f21 Spheremap: Flip y and add light. 2014-05-18 03:39:53 +02:00
vlj
a2e1724389 Use correct mapping for spheremap 2014-05-18 03:19:18 +02:00
vlj
dc7e6cb99f Revert to spheremapped reflection 2014-05-18 03:01:24 +02:00
vlj
9c98012e09 Fix dof and transparent fog. 2014-05-17 03:09:21 +02: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
vlj
0ccac5d316 Replace texture2D by texture in dof.frag 2014-05-14 00:59:51 +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
bba9e3ca2c Add a 17 tap blur filter
and use it for SSAO
2014-05-12 20:49:47 +02:00
vlj
8e17ae90b6 Resolution independent ssao 2014-05-12 20:13:12 +02:00
Vincent Lejeune
96babc81ad Reenable custom light radius 2014-05-12 19:37:00 +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
Vincent Lejeune
648d076e00 Premultiply alpha for particles too. 2014-05-10 20:58:43 +02:00
Vincent Lejeune
6936f30b36 Premultiply alpha for billboards. 2014-05-10 20:49:30 +02:00
Vincent Lejeune
a73f03a2c4 Make use of gl_amd_vertex_shader_layer when available 2014-05-08 01:16:02 +02:00
vlj
fd7399d983 Use instancing to expand shadows instead of GS 2014-05-07 23:57:07 +02:00
Stephen Just
efb85943d1 Fix for #1297. DoF shader compiles in mesa now. The other problem noted
in the issue was just texture compression + intel.
2014-05-05 07:59:20 -06:00
Vincent Lejeune
d316263660 Tweak light extent again to improve perf 2014-05-05 01:46:57 +02:00
Vincent Lejeune
d6d7c6179c Simplify pointlight.vert 2014-05-04 19:46:21 +02:00
Vincent Lejeune
94ae8fb21e Use a more tighly fitting quad for pointlights. 2014-05-04 19:21:09 +02:00
vlj
35df307c3f Tweak light extend. 2014-05-03 23:44:27 +02:00
vlj
5e62347d11 Fix attempt for #1308 2014-05-03 17:36:27 +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
vlj
2f1578ba32 Potential fix for #1305 2014-05-02 13:54:23 +02:00
Vincent Lejeune
18aa119890 Tweak light attenuation.
Doesnt really change the look of the light but reduce their extent.
2014-04-27 18:31:00 +02:00
Vincent Lejeune
9ac57c3919 Tigher fit of light extent 2014-04-27 18:04:39 +02:00
Marianne Gagnon
924e09b3e9 Very slight tweak 2014-04-25 20:02:16 -04:00
vlj
2ca11c3166 Auria provided tonemap coefficients 2014-04-26 02:00:50 +02:00
vlj
3e4254b3a7 Tonemap: Use J. Hable filmic operator
It gives better result on stk enterprise, slightly saturating blacks.
2014-04-25 17:57:10 +02:00
Vincent Lejeune
84ddd7119e Use glPolygonOffset to remove shadow acne
It's a 2002 trick from M. Kilgard
2014-04-24 21:02:24 +02:00
vlj
85e720a58f Shadow: tweak bias to remove acnee 2014-04-24 18:33:05 +02:00
vlj
ef07b25202 Make possible to tweak exposure/lwhite in adm 2014-04-24 17:47:17 +02:00
samuncle
ba3cce6046 Limit the DoF influence 2014-04-24 02:44:34 +02:00
vlj
b939d06be5 Properly add Depth of Field 2014-04-23 22:08:37 +02:00
vlj
fb56a4086f Fix normalmap roughness 2014-04-23 18:09:48 +02:00
Vincent Lejeune
eb0c948e41 Tweak exposure/whiepoint/saturation 2014-04-23 18:09:47 +02:00
Vincent Lejeune
da15aebcda SSAO: Clamp to 0. 2014-04-22 18:22:39 +02:00
Vincent Lejeune
6f16831d00 Revert "Some color are negative, clamp them in loglum"
This reverts commit 43df357cfb.
2014-04-22 18:18:18 +02:00
Vincent Lejeune
17ba0f515c Revert "Use some realist order of magnitude of light"
This reverts commit 2aa6676050.
2014-04-22 02:32:42 +02:00
Vincent Lejeune
b0e56ca2b0 Use some diffent value/equation for tonemap 2014-04-22 02:29:22 +02:00
vlj
2aa6676050 Use some realist order of magnitude of light 2014-04-21 19:40:10 +02:00
vlj
d7e3976ef5 Use a less intrusive delta value 2014-04-21 19:39:39 +02:00
vlj
43df357cfb Some color are negative, clamp them in loglum
I have yet to investigate how the pipeline can produce negative values
somewhere.
2014-04-21 19:29:13 +02:00
vlj
a0e63dea46 Enable tonemap. 2014-04-21 02:33:12 +02:00
vlj
2e1b0ac9f4 Avoid negative value when Yxy->RGB 2014-04-21 02:19:09 +02:00
vlj
8947242de4 Add proper tonemap, although disabled.
It currently generates way too much HDR.
2014-04-21 01:52:44 +02:00
vlj
878a639a84 Another ssao tweak. 2014-04-20 02:56:07 +02:00
vlj
e8b36f2490 Fix for shadow acne in chocolate. 2014-04-20 02:20:09 +02:00
vlj
87248b46f3 Tweak shadows CSM split. 2014-04-20 02:01:29 +02:00
vlj
1291d0cc93 Increase shadow fidelity. 2014-04-20 00:21:30 +02:00
vlj
a457b9f423 Shadows: Clean shaders. 2014-04-20 00:04:49 +02:00
vlj
dd3e15b298 Debug: display cascade in shadow debug mode 2014-04-19 23:57:27 +02:00
Vincent Lejeune
d7eaaf4885 Add a m_ubo_disabled switch in user config file.
This should be used to workaround a bug in intel windows drivers.
2014-04-19 18:38:57 +02:00
vlj
c695875654 PointLight: Use a 1/(1 + d + k d^2) attenuation
This is not physically accurate, but a 1/d^2 attenuation makes light
extend too broad, and went too high if close from the source.
2014-04-19 02:04:39 +02:00
Marianne Gagnon
e4afea5cca Reduce rimlight effect to a more reasonable strenght 2014-04-14 19:56:26 -04:00
Vincent Lejeune
5b47891514 Apply MLAA after color_in. 2014-04-14 03:30:42 +02:00
Vincent Lejeune
ba27eb42ef Bloom: Weight the different sized contribution. 2014-04-14 02:45:15 +02:00
Vincent Lejeune
59df5a90bc Bloom: Tweak the threshold. 2014-04-14 02:15:28 +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
f98ff2a5fc Fix skid mark color
We convert the vertex color value to srgb, optimally the vertex color
should already be corrected on cpu side but it would break fallback
colors...
2014-04-13 18:00:15 +02:00
Vincent Lejeune
3cd85a829e Compress/convert to srgb per material basis.
This allows to remove manual conversion in normalmap shader.
2014-04-13 17:53:52 +02:00
Vincent Lejeune
59c50ebbdd Use ITexture instead of GLuint in GLMesh 2014-04-12 22:33:27 +02:00
vlj
42482e0c41 Some more conversion 2014-04-10 23:03:57 +02:00
vlj
3a55bbe796 Generalize use of UBO. 2014-04-10 21:16:44 +02:00
Vincent Lejeune
9ba636f661 Gather View Projection and shadows matrix generation. 2014-04-10 21:16:42 +02:00
Vincent Lejeune
55489bc188 Use UBO instead of copying Shadow VP matrixes. 2014-04-08 21:45:04 +02:00
Vincent Lejeune
eb0dfb4530 Bigger light extend wrt energy. 2014-04-07 22:20:43 +02:00
vlj
e00ce85d7c Support FresnelSchlick factor. 2014-04-07 21:35:10 +02:00
vlj
858c8c7605 Fix normalmap too 2014-04-07 21:35:10 +02:00
vlj
79c6424703 Use specularmap as glossiness map. 2014-04-07 21:35:09 +02:00
vlj
cafc07680a Use Blinn Phong model. 2014-04-07 21:35:09 +02:00
Vincent Lejeune
0b318b9c7e Improve quad's fit of pointlight extend 2014-04-07 21:04:03 +02:00
vlj
ca2b5a7237 Fix normal map and srgb 2014-04-07 01:03:14 +02:00
Vincent Lejeune
ca214230e3 MLAA: Load the right shader for step 2
No wonder why it didnt work as expected before...
2014-04-04 19:42:05 +02:00
vlj
6a3556b4ba Shaders'outputs use premultiplied alphas 2014-04-03 14:46:35 +02:00
vlj
8552ddae1c MLAA: Fix gamma in the shaders.
MLAA looks correct now.
2014-04-03 14:15:51 +02:00
Vincent Lejeune
964d9a25f1 Some port fixes for MLAA 2014-04-03 00:27:46 +02:00
Vincent Lejeune
33b44c8c97 Port MLAA to new pipeline. 2014-04-03 00:14:58 +02:00
Vincent Lejeune
26c797e79e Fix kart shadows. 2014-04-02 00:09:49 +02:00
Vincent Lejeune
5573ee4e34 Follow more closely Crysis subsurface scatt. 2014-04-01 23:35:32 +02:00
Vincent Lejeune
f41b737913 Merge grass_pass*.vert 2014-04-01 23:16:30 +02:00
Vincent Lejeune
23e5ec709d Add a fake subsurface scattering for grass. 2014-04-01 23:13:16 +02:00
vlj
0fb6515bca Instancing: Support for alpha ref shadow. 2014-03-31 22:06:37 +02:00
vlj
52018bbdea Instancing: Support shadow. 2014-03-31 21:52:42 +02:00
Vincent Lejeune
7ebeaa45e8 Some cleaning. 2014-03-31 20:04:34 +02:00
Vincent Lejeune
bb311618e3 Instancing: Add support for scale transformation. 2014-03-31 18:10:45 +02:00
Vincent Lejeune
33f31dbf30 Disable auto exposure for now. 2014-03-31 17:25:04 +02:00
vlj
251e7f669e Using formula from an article suggested by samuncle 2014-03-31 17:25:04 +02:00
vlj
af93a04987 Improve bright attenuation although not perfect 2014-03-31 17:25:03 +02:00
vlj
58615c0207 Plug in brightness adaptation 2014-03-31 17:25:03 +02:00
vlj
6e8b45a6d8 Add some code to average log luminance. 2014-03-31 17:25:02 +02:00
vlj
a2ab6fc80c Write a shader to convert CIE to RGB. 2014-03-31 17:25:01 +02:00
Vincent Lejeune
881d0b9954 Factorize luminance computation. 2014-03-31 17:24:53 +02:00
vlj
8fc383206f Improve ao and bloom. 2014-03-30 23:47:19 +02:00
vlj
0dae1cf911 Fix negative value that introduces a bug on nvidia 2014-03-30 21:57:01 +02:00
vlj
91c4e9de94 Fix orientations. 2014-03-29 02:19:08 +01:00
vlj
1bac60c48a Attempt to fix orientations. 2014-03-29 02:04:20 +01:00
vlj
f4eeb68fd4 Merge branch 'Instancing' 2014-03-29 01:22:57 +01:00
vlj
ca1a1e37d9 Fix normals for normal object. 2014-03-29 01:22:08 +01:00
vlj
81b1e9fb94 Move the wind portion into the world matrix
It should make the normal correct although I didnt notice any visual difference.
2014-03-28 02:39:20 +01:00
vlj
c70b9ba0f8 Explicitly build the inverse matrix
Some drivers does not support inverse function although they advertise
glsl 140 support, and it's faster  to do it manually as we know the
structure of the matrix.
2014-03-27 19:12:55 +01:00
vlj
3538fd46d2 Look like instance orientation was wrong. 2014-03-27 01:33:02 +01:00
Vincent Lejeune
1740407e1e Use GS instancing to speed up shadow gen a little. 2014-03-26 22:27:11 +01:00
Vincent Lejeune
f49dfbc51f Fix flip particle shader. 2014-03-26 20:58:13 +01:00
Vincent Lejeune
9f0620c122 Add a #define to switch between dof and non dof 2014-03-26 19:42:25 +01:00
vlj
8b652ababb Merge object_pass*.vert 2014-03-26 19:04:46 +01:00
vlj
ae5c7b8c3d Implement UI single color overload 2014-03-26 19:04:45 +01:00
vlj
71881ac64d Add orientation to grass material 2014-03-25 16:49:03 +01:00
vlj
a866b3f416 Add Grass material support for instancing. 2014-03-24 16:40:40 +01:00
Vincent Lejeune
5c8ef365a5 Merge instanced_object_pass vertex shaders. 2014-03-23 19:28:07 +01:00
Vincent Lejeune
5dd2d28134 Merge branch 'master' into Instancing 2014-03-23 19:20:23 +01:00
vlj
73755a3431 clamp overload was ambiguous. 2014-03-23 01:09:14 +01:00
samuncle
f7f3cb1cbe Add depth of field to the color_level shader. As vincent requested. Something cleaner need to be done 2014-03-23 00:59:06 +01:00
vlj
6538d16eb3 Fix a shader compile failure on nvidia. 2014-03-22 22:32:52 +01:00
Vincent Lejeune
29749d5dbd Merge commit 'f3e2da881a4d394c4ca902548e788f5b4c0bdd81'
* commit 'f3e2da881a4d394c4ca902548e788f5b4c0bdd81':
  Do not build shadow shader without gs support.
  Add a function to query supported glsl ver
  Some drivers dont support const array
2014-03-22 18:54:51 +01:00
Vincent Lejeune
ae3cf30070 Add a function to query supported glsl ver 2014-03-22 18:36:20 +01:00
Vincent Lejeune
aa39246404 Some drivers dont support const array 2014-03-22 18:36:19 +01:00
Vincent Lejeune
340eaa9352 Factorize getLightFactor 2014-03-21 18:36:47 +01:00
Vincent Lejeune
01b88fde9d Factorize DecodeNormal from misc shaders. 2014-03-21 18:17:21 +01:00
Vincent Lejeune
77e5f413c7 Factorize EncodeNormal from Pass1 shaders. 2014-03-21 18:10:54 +01:00
vlj
f06ad3c785 Reenable transparent + fog material. 2014-03-20 18:25:44 +01:00
Vincent Lejeune
9a6d15a865 Attempt to fix skidding mark's color 2014-03-19 01:25:54 +01:00
Vincent Lejeune
dd5997d277 Start working on instancing library node 2014-03-18 23:47:53 +01:00
Marianne Gagnon
0425cf2ef4 Implement color variation in particle system 2014-03-15 13:35:51 -04:00
Vincent Lejeune
0c5d5ce96e IBL: Fix sampling ignoring cubemap rotation 2014-03-14 16:51:07 +01:00
Vincent Lejeune
740c251808 Use Instancing for lights. 2014-03-14 16:51:06 +01:00
Vincent Lejeune
e9e60339bf Fix non compiling shader on mesa 2014-03-09 21:06:02 +01:00
Vincent Lejeune
8600d3bc61 IBL: Spheremap now reflects skybox 2014-03-04 23:37:45 +01:00
Vincent Lejeune
391053e368 IBL: Implement IBL 2014-03-04 23:28:24 +01:00
Vincent Lejeune
718c1cacb0 Improved caustics effect. 2014-03-04 22:30:33 +01:00
Vincent Lejeune
c93c921028 STKMesh: Support caustic material. 2014-03-04 18:42:33 +01:00
Vincent Lejeune
e1d879a1f2 STKMesh: Improve displace effect. 2014-03-03 23:59:12 +01:00
samuncle
7393fa0603 Add an attenuation based on depth 2014-03-03 16:38:26 +01:00
samuncle
ee76d9b579 Reduce the brightness of the vignette 2014-03-03 15:19:22 +01:00
samuncle
4b92ee1716 Add a vignette to simulate a real camera 2014-03-03 14:12:56 +01:00
Vincent Lejeune
9f83b1ab76 Remove unneeded varying in sky.frag. 2014-03-02 17:50:42 +01:00
Vincent Lejeune
da4896c3d8 SSAO: tweak fade distance. 2014-03-01 22:50:22 +01:00
Vincent Lejeune
baba5f79d1 Remove some unused shaders. 2014-02-28 17:30:25 +01:00
Vincent Lejeune
af862cb6c5 #version autoadded to shaders and turn some v120 2014-02-28 17:29:05 +01:00
Vincent Lejeune
108e82afc2 Fix Sara's moving textures. 2014-02-27 01:49:03 +01:00
Vincent Lejeune
9941b18d7f Rework moving textures support. 2014-02-27 01:22:34 +01:00
Vincent Lejeune
7532ea1768 Skybox: Do some cleaning. 2014-02-26 22:28:06 +01:00
Vincent Lejeune
9ffa4681d3 Better when actually include the shaders. 2014-02-26 21:53:29 +01:00
Vincent Lejeune
2d1acf5353 Godray: improve the effect and its stability. 2014-02-23 20:16:03 +01:00
Vincent Lejeune
04fc4c3be7 Reenable Godray (on all track atm) 2014-02-23 20:02:15 +01:00
Vincent Lejeune
778cdcf3ce Godray/Godfade now declared in new pipeline. 2014-02-23 18:59:24 +01:00
Vincent Lejeune
a00abffb01 MotionBlur: Use direct GL calls. 2014-02-23 00:13:22 +01:00
Vincent Lejeune
8ba0fcb8e0 STKMesh: Transparent texture can move now. 2014-02-20 18:31:00 +01:00
Vincent Lejeune
40c4155bd2 STKMesh: Support for (non ref) moving texture 2014-02-20 00:01:02 +01:00
samuncle
073a049389 Correction of a syntax error 2014-02-17 22:36:00 +01:00
Vincent Lejeune
e5a174d85b Add compatibility keyword on and remove some unused shaders 2014-02-17 15:34:57 +01:00
Vincent Lejeune
d5d57bbae0 Shadows: Softer edge and smoother cascade transitions 2014-02-15 20:45:47 +01:00
Vincent Lejeune
57079cbff5 Shaders: Declare penumbraH/V and shadowgen 2014-02-12 23:32:18 +01:00
Vincent Lejeune
0243546e4d Use an openGL 3.3 compatibility context when available. 2014-02-12 22:16:10 +01:00
Vincent Lejeune
70f89a8bce Shadow: Use 4 cascades.
Now that we use GS and textures array it's easier to add a cascade.
4 is still not optimal but I'd like to avoid cascade count inflation as
much as possible ; 4 x 1024x1024 has the bandwidth requirement of the
single 2048x2048 shadowmaps we previously had.
2014-02-11 21:49:46 +01:00
Vincent Lejeune
934d1f10b8 Shadow: Use Geometry Shader for better perfs.
The 3 cascades are now rendered in a single pass, using 2D array texture and
a GS to do the dispatch ("layered rendering").
It's possible to use instancing instead but it requires the AMD_vertex_shader_layer
extension which is oddly part of opengl 4.2.
2014-02-11 21:07:44 +01:00
Vincent Lejeune
c8844486fa Shadow: Tweak bias 2014-02-10 15:58:09 +01:00
Vincent Lejeune
515bcbc750 Shadow: very crude csm support 2014-02-10 15:42:17 +01:00