Commit Graph

168 Commits

Author SHA1 Message Date
Tim Anema
d02bc54b05 added in checking to see if the shadow bodies should be drawn, if they are within the screen and within range of the light 2014-12-03 14:08:44 -05:00
Tim Anema
64bcbd1e94 circle shadow body optimizations 2014-12-03 09:07:20 -05:00
Tim Anema
5cbca9f63c took care of default polygon normal map problems show up at edges 2014-12-03 08:31:09 -05:00
Tim Anema
3f62fde726 fixed light range for scaling 2014-12-02 21:45:19 -05:00
Tim Anema
c0a80da546 made polygons moveable 2014-12-02 21:26:46 -05:00
Tim Anema
224822de31 took out uneeded example now that normals are generated and updated my progress 2014-12-02 10:08:04 -05:00
Tim Anema
ec19b3cadd added a normal map to all bodies now so drawing shine is done with just the normal shading now 2014-12-02 10:05:52 -05:00
Tim Anema
8fee299900 just cleaning up some code 2014-12-01 20:41:09 -05:00
Tim Anema
b759a0670a just a touch up 2014-11-30 16:00:22 -05:00
Tim Anema
5351b91168 no longer need two callback for drawing just one, which is nice 2014-11-30 15:24:58 -05:00
Tim Anema
66dd1b65f8 added comments to the new shader and got rid of bad methods 2014-11-30 15:11:22 -05:00
Tim Anema
9e59f9ffee colored shadows now work as expected with attenuated brightness and constant brightness not matter how many lights are present 2014-11-30 14:35:18 -05:00
Tim Anema
9c81c71f89 just a few touchups before bed 2014-11-29 23:51:44 -05:00
Tim Anema
bbcd20a27e colored shadows almost functional again 2014-11-29 23:20:02 -05:00
Tim Anema
012a5481e9 image shadows look correct again 2014-11-29 23:08:29 -05:00
Tim Anema
0a2da63f24 added image shadows, took out useless code 2014-11-29 20:19:03 -05:00
Tim Anema
410388d423 fixed the multiple lights issue 2014-11-29 19:52:09 -05:00
Tim Anema
117d908ad7 one light now works I need to figure out a way of doing multiple lights 2014-11-29 19:10:15 -05:00
Tim Anema
f56ef4a197 got the start of a shader that will do normal shading and shine at the same time, I will throw in a shadow map there too and it will do it all in one pass 2014-11-29 14:52:05 -05:00
Tim Anema
aa3675d7ad just renaming some things 2014-11-29 08:54:43 -05:00
Tim Anema
993e029a2f made circle shadow bodies use arc instead of circle, also optimized so they were not drawn if not neccessary 2014-11-28 16:56:05 -05:00
Tim Anema
ac5b9afa16 made the normal shading reflect the shadow calculations a bit better and isolated the examples to one directory 2014-11-28 11:14:53 -05:00
Tim Anema
42c699590d took out annoyance in naming 2014-11-28 10:55:43 -05:00
Tim Anema
7db34a4a02 made better shadow body calculations so that the z coordinate of the light effects the cast light 2014-11-28 10:20:00 -05:00
Tim Anema
64d8613549 normal mesh shadows can be drawn even if the item isnt a image 2014-11-18 21:07:33 -05:00
Tim Anema
bebeba9d5e Merge pull request #13 from Guard13007/master
added move function to lights
2014-11-11 09:47:17 -05:00
Guard13007
40f18cae9b added light:move(x, y, z) 2014-11-10 13:02:02 -08:00
Paul Liverman
d81a656812 Merge pull request #1 from tanema/master
Updated stuffs
2014-11-10 13:00:47 -08:00
Tim Anema
c370e9ecc2 just some reformatting 2014-11-07 09:21:41 -05:00
Tim Anema
1c5eb2c804 fixed the additive layer on the pixel shadow for translations 2014-11-06 20:03:00 -05:00
Tim Anema
820033810b added setVisible method to light so that the light can be turned on and off 2014-11-05 23:06:54 -05:00
Tim Anema
233d40ea39 fixed inaccuracy of the inRange method in Light. also added it to the draw methods in light so that they wont draw if not needed 2014-11-05 23:05:21 -05:00
Tim Anema
3d4819cda4 added remove method to light world to facilitate removal of items 2014-11-03 17:54:15 -05:00
Tim Anema
e74c0d8961 fixed the light drawing with translation and scaling 2014-10-28 21:03:00 -04:00
Tim Anema
2d1d65df4f Merge pull request #11 from qrap/master
added move function to bodies
2014-10-28 20:50:24 -04:00
Tim Anema
05efff7192 Merge branch 'master' of github.com:tanema/light_world.lua 2014-10-28 20:47:59 -04:00
Tim Anema
b768c5479a fixed the light drawing with translation and scaling 2014-10-28 20:47:46 -04:00
Guard13007
91996c4fc5 added move function to bodies 2014-10-28 11:40:51 -07:00
Tim Anema
80b1f67f9b Merge pull request #10 from qrap/master
readme updated example
2014-10-28 08:29:01 -04:00
Paul Liverman
c85bc30da9 readme updated example 2014-10-27 22:04:25 -07:00
Tim Anema
82061d93d0 added z to getPosition on light 2014-10-27 21:46:27 -04:00
Tim Anema
3f482ef0c6 fixed newRectangle bug where width and height were not set 2014-10-27 21:41:25 -04:00
Tim Anema
a1d6d33ab5 fixed spelling mistakes 2014-10-27 21:32:51 -04:00
Tim Anema
5572d5135a Merge pull request #5 from qrap/master
Load from any directory
2014-10-27 19:03:46 -04:00
Tim Anema
3e25bb9a18 Merge pull request #4 from Guard13007/master
Fixed translate in postshaders.lua example
2014-10-27 19:03:21 -04:00
Guard13007
2063472fe2 fixed normalMap require 2014-10-27 12:24:28 -07:00
Guard13007
290d39bcd5 load from anywhere 2014-10-27 12:20:56 -07:00
Paul Liverman
fdad8ee6d6 Fixed translate in postshaders.lua example 2014-10-27 12:19:16 -07:00
Tim Anema
59f8a4a880 added a normal mapping example 2014-10-27 14:43:58 -04:00
Tim Anema
cd2c71a538 Merge pull request #3 from qrap/master
Fixed translation in examples/short.lua
2014-10-27 14:03:23 -04:00