Commit Graph

60 Commits

Author SHA1 Message Date
Luke Benstead
6ee9a823c1 Don't update lights unnecessarily 2023-03-23 20:01:41 +00:00
Luke Benstead
8beb295c6b Refactor state management 2023-03-07 10:19:09 +00:00
Luke Benstead
0b62ac8673 Clean ups and optimisations 2022-08-25 21:24:08 +01:00
OzzyOuzo
1a456cb1a7 16bit palette color format support, extended 64 shared palette slots (4bpp), GL_OES_compressed_paletted_texture support
GL_ERROR generated when texture size > 1024
2021-12-03 09:32:53 +02:00
Luke Benstead
66d09e7d77 Error cleanup and immediate mode perf improvements 2021-09-13 10:29:04 +01:00
Luke Benstead
e67f1fb8f9 Don't transform the vertex again incorrectly. Optimise 2021-04-30 07:58:57 +01:00
Luke Benstead
fe616028bb X86 2021-04-09 15:24:47 +00:00
Luke Benstead
d932811be4 Small optimisation 2020-05-22 07:32:02 +01:00
Luke Benstead
9bfb0c6eea Fix bug from last commit, don't apply lights at all if none are enabled 2020-05-22 07:20:08 +01:00
Luke Benstead
0a92240c64 More lighting optimisations 2020-05-21 20:14:43 +01:00
Luke Benstead
01cb46a99e Small tweak to lighting code 2020-05-13 21:04:24 +01:00
Luke Benstead
2b9d8520bc Lighting perf improvements 2020-05-11 20:34:09 +01:00
Luke Benstead
8e854ddef7 Fix overbright lighting 2020-05-09 06:33:28 +01:00
Luke Benstead
aa20bb20b2 Performance tweaks 2020-05-08 19:42:31 +01:00
Luke Benstead
8974051e38 Don't use memcpy when copying colours 2020-05-08 09:49:01 +01:00
Luke Benstead
cca09a298e Move enabled state onto the LightSource 2020-05-08 07:19:56 +01:00
Luke Benstead
814f228db9 Lighting optimisations 2020-05-07 20:58:24 +01:00
Hayden Kowalchuk
bf00aca843 chore: lighting.c remove unused, add moop math
- remove unused bool
- move math func to header
- reorder const
2020-03-05 14:56:16 -05:00
Luke Benstead
1520226174 Fix directional lighting 2020-02-22 20:33:23 +00:00
Luke Benstead
7fecb7a3a5 Fix directional lights 2020-02-21 14:51:05 +00:00
Luke Benstead
497ba28b4c Replace pow function 2020-02-20 09:44:45 +00:00
Luke Benstead
59118cc07d Restore support for glColormaterial 2020-02-19 10:45:31 +00:00
Luke Benstead
a502f92ded More lighting improvements 2020-02-19 09:30:26 +00:00
Luke Benstead
24fe33358c Faster floor 2020-02-17 20:49:40 +00:00
Luke Benstead
4ebd112784 Attempt to fix specular 2020-02-17 20:29:12 +00:00
Luke Benstead
28f77969ea Avoid overflows 2020-02-17 19:09:21 +00:00
Luke Benstead
29cbdc75b7 Fix a copy-paste bug (thanks @freakdave) 2020-02-17 19:05:57 +00:00
Luke Benstead
ab5dc26e33 Only calculate specular if there is an exponent 2020-02-17 19:05:18 +00:00
Luke Benstead
93be3ab757 Use super-simple floor function 2020-02-17 19:02:45 +00:00
Luke Benstead
6516f0f6f5 Prevent overflowing colours 2020-02-17 10:38:30 +00:00
Luke Benstead
ab69030b1e Fix lighting colours 2020-02-17 10:21:33 +00:00
Luke Benstead
35842ad300 Faster FPOw implementation 2020-02-17 10:12:15 +00:00
Luke Benstead
2178d2f6d7 Improve lighting performance
This is (another) first pass at improving the performance of the lighting code.
As part of this refactor *we have lost glColorMaterial*. I need to figure out a
nice way of implementing it without slowing the common code path.
2020-02-16 20:36:49 +00:00
Luke Benstead
eeb95193ac Fix overflow 2019-12-27 19:35:18 +00:00
Luke Benstead
b2a2e71795 Much faster lighting implementation 2019-12-27 10:36:30 +00:00
Luke Benstead
fd3e7cde6c Improve the light sample + tweaks 2019-11-14 21:12:27 +00:00
Luke Benstead
8654ff24a2 Add light sample and fix lighting bug 2019-11-14 10:04:15 +00:00
Luke Benstead
b82d28130d Rewrite the lighting code 2019-08-01 20:21:13 +01:00
Luke Benstead
724ff628aa Fix some signedness issues 2019-03-13 15:14:09 +00:00
Luke Benstead
926214bd82 Prefix some non-static private functions with '_gl' 2019-03-03 19:02:25 +00:00
Luke Benstead
7100ebe5a9 Prefix some non-static private methods 2018-09-15 11:45:38 +01:00
Luke Benstead
6cfccbd20d Inline + Static some lighting functions 2018-09-15 11:42:56 +01:00
Luke Benstead
e68c051991 Add missing glColorMaterial definition 2018-09-15 11:42:42 +01:00
Luke Benstead
963eeb54da Start work on spotlights 2018-08-28 15:55:50 +01:00
Luke Benstead
c191ced3f9 Fix issues with directional lights 2018-08-28 09:24:51 +01:00
Luke Benstead
8ef04be966 Try to fix directional lights 2018-08-27 20:54:20 +01:00
Luke Benstead
b29303fb6c Implement glColorMaterial 2018-08-22 09:24:49 +01:00
Luke Benstead
85d4bb5ec3 Fix directional lighting bug 2018-08-05 14:38:04 +01:00
Luke Benstead
db0d39d487 Cleanup lighting code a bit 2018-08-04 19:34:07 +01:00
Luke Benstead
59002546e6 Fix lighting 2018-08-03 14:08:01 +01:00