Commit Graph

10214 Commits

Author SHA1 Message Date
vincentlj
224b246f17 Irrlicht: make setRenderStates3DMode public
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@14810 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2013-12-27 16:37:15 +00:00
samuncle
8695d355eb New color correction
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@14809 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2013-12-27 04:08:34 +00:00
samuncle
7b90be2e29 Add a massive vegetation under water to test
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@14808 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2013-12-27 03:52:08 +00:00
auria
f1aac9e317 Adjust logging to make STK less annoying to debug under visual studio : output the logging directly to VS's output pane, instead of having to reply on the small cmd.exe popup that closes as soon as the application exits
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@14807 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2013-12-27 03:02:33 +00:00
vincentlj
053170fc27 Rain: Use transform feedback to decouple simulation from rendering
It's the base for a future gpu based particle system

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@14806 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2013-12-27 02:50:25 +00:00
samuncle
cb21815054 Improved the specularity by adding a little offset to the energy
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@14805 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2013-12-27 02:41:58 +00:00
deveee
27e397d2c7 Fixed #1086 - Popup message was displayed constantly when you were in garage in overworld.
TODO: Compare distance between garage and kart with for example length
of the kart or distance of object defined in scene.xml.
Currently (m_garage_pos-m_kart_pos).length2_2d() gives much higher values than
getKart(0)->getKartModel()->getLength() and I must look at this closer.

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@14804 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2013-12-27 02:12:16 +00:00
samuncle
32a61d770e Allow kart to use specular map
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@14803 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2013-12-27 02:06:08 +00:00
vincentlj
0506b98540 Lights: Add a metric to measure light count pressure in a scene.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@14802 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2013-12-27 01:00:20 +00:00
vincentlj
30a030bd4c Light: Pseudo sort lights distance using bucket to evict them fast.
Lower max light level to 16 as it proves sufficient.

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@14801 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2013-12-27 00:34:41 +00:00
vincentlj
4d0b9236b2 Lights: improve bandwidth usage
It should improve performance a lot, but it handles at most 32 simultaneous lights on screen.

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@14800 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2013-12-26 22:55:15 +00:00
vincentlj
508d866a2b Lights: Improve culling system
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@14799 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2013-12-26 20:14:49 +00:00
samuncle
46cce1e347 I updated the requirements to something a but more realistic
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@14798 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2013-12-26 19:42:11 +00:00
vincentlj
4f36e43b14 Fix unexported FragData
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@14797 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2013-12-26 18:28:35 +00:00
vincentlj
5512a72d62 Lights: Remove hard edge and attenuate specular
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@14796 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2013-12-26 18:00:54 +00:00
samuncle
067564c7cf A little change to make the SSAO better (IMHO) other opinions are welcome)
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@14795 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2013-12-26 02:55:10 +00:00
samuncle
5c03faab06 Better glow
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@14794 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2013-12-26 01:21:03 +00:00
samuncle
122567f0d3 Increase the max distance of the displacement effect
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@14793 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2013-12-26 01:01:12 +00:00
samuncle
9be8adaa15 Reduce the color correction
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@14792 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2013-12-26 00:02:55 +00:00
samuncle
22440ddc60 Minor correction
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@14791 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2013-12-25 23:39:06 +00:00
samuncle
55f7817286 Some tweak to test the new light system
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@14790 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2013-12-25 23:29:32 +00:00
vincentlj
c2b18a0a1c Light: Export the correct value for specmap in grass/splatting shaders
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@14789 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2013-12-25 20:48:27 +00:00
vincentlj
3a6e75b656 Light: Fix skybox bug with specmap and update grass/splatting shader
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@14788 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2013-12-25 20:40:14 +00:00
samuncle
702b9cca97 Add an alpha channel to test the specular map
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@14787 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2013-12-25 20:23:51 +00:00
vincentlj
ec3fd4fa13 Light: Support for specularmap
The specular map is embedded in the alpha component of texture.
Alpha value of 1. means no specular, alpha of 0. means 100% specular.

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@14786 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2013-12-25 20:19:18 +00:00
samuncle
4435ffbaa0 Better lights (with color correction, and glow :)
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@14785 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2013-12-25 19:36:07 +00:00
samuncle
6b4f44acbc We don't need lightmap
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@14783 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2013-12-25 05:54:21 +00:00
samuncle
42829e3c8d I have add some dynamic lights in the old mine just to test the new pipeline
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@14782 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2013-12-25 05:52:08 +00:00
samuncle
292fbadc33 Correction of a bug caused by the skybox
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@14780 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2013-12-25 02:58:30 +00:00
vincentlj
c9b8734717 Plug-in energy parameter into pointlight shader
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@14779 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2013-12-24 23:07:42 +00:00
vincentlj
8c44b06e9f Revert "Test commit, to be reverted"
This reverts commit 6cbdcff4da246b940cad4affc2beff101dd3fcc0.

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@14778 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2013-12-24 22:35:19 +00:00
vincentlj
65b32757f3 Separate Diffuse and Specular components
This allows to bypass alpha test, and have colored specular lights.

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@14777 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2013-12-24 20:51:53 +00:00
vincentlj
5f23483bd9 Fix some shaders not building with mesa
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@14775 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2013-12-24 02:47:33 +00:00
vincentlj
7f51c9737b Test commit, to be reverted
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@14770 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2013-12-24 01:59:35 +00:00
vincentlj
88ac0ba6cf Attempt to mimic blender light behavior.
The attenuation assumes a power distributed on the whole sphere surface.

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@14769 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2013-12-24 01:44:40 +00:00
vincentlj
dec4cd1453 Change light visualization.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@14768 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2013-12-24 01:33:42 +00:00
vincentlj
bd52770ceb SSAO: Avoid sampling outside of RTT_NORMAL_AND_DEPTH textures.
It should remove artifact at the edge of the screen.

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@14767 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2013-12-24 00:37:58 +00:00
samuncle
ea7ac5391a Better normal (I think everything is corrected now. Vlj if you find more normal to be corrected please ask me
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@14766 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2013-12-24 00:36:52 +00:00
vincentlj
49131c68af Rain: Fade instead of intersecting geometry
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@14765 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2013-12-24 00:33:57 +00:00
samuncle
7633db8c03 A majority of normal have been corrected to be SSAO friendly
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@14764 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2013-12-23 23:48:25 +00:00
vincentlj
f17f8b62cb SSAO: Use the correct distance for range checking
It should remove halo around kart heads.

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@14763 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2013-12-23 23:25:14 +00:00
samuncle
d6a532151d Color correction is removed due to vlj's demand. Now we can test safely HDR
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@14762 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2013-12-23 22:45:15 +00:00
vincentlj
3fc63a9f27 SSAO:Ensure sampled point are inside the unit sphere.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@14760 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2013-12-23 20:25:58 +00:00
vincentlj
a3cc62a985 SSAO: Use a costheta factor to ease transition
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@14759 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2013-12-23 20:02:11 +00:00
vincentlj
a9db4c7c3f Generate random value for SSAO sampling
It should improve SSAO at least with grass.
However this make the algorithm even more sensitive to bad normals.

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@14758 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2013-12-23 18:14:02 +00:00
vincentlj
352009b2ce RTT_COLOR uses float format.
This allows for hdr, however there is no tone mapping at the moment.
color_level.frag can be currently used for such purpose, it gives a nice look
in harvest, although it is way too bright.

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@14757 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2013-12-23 17:00:42 +00:00
vincentlj
34d83859cd Add support for specular light
Note that specular light is applied unconditionnaly, thus every object will shine.
TODO : Specular map should be defined using texture or a material flag.

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@14756 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2013-12-23 17:00:34 +00:00
vincentlj
5db6705889 Move SSAO code into renderLight in order to use a lighter rtt (8 bits instead of 32)
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@14755 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2013-12-23 17:00:27 +00:00
vincentlj
45db87de8a Merge normals and depth RTT into a single one
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@14754 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2013-12-23 16:59:55 +00:00
deveee
8b76971a54 Minor changes in soccer setup gui
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@14752 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2013-12-22 17:44:09 +00:00