Commit Graph

181 Commits

Author SHA1 Message Date
Jarrod Doyle 3df1b728e6
Simplify light strength ratio calculation 2024-10-27 08:54:52 +00:00
Jarrod Doyle ef95b07926
Remove double dict access when adding object property 2024-10-27 08:39:17 +00:00
Jarrod Doyle 466b7a4c0b
Change GetProperty return to be nullable 2024-10-27 08:38:47 +00:00
Jarrod Doyle 7ff91b2fda
Remove infinite radius sphere special casing 2024-10-27 08:14:47 +00:00
Jarrod Doyle 0c26aa1f0e
Extract cell light indices setting to method 2024-10-27 08:07:15 +00:00
Jarrod Doyle cd13cee48f
Move colour conversion to separate class 2024-10-27 07:53:58 +00:00
Jarrod Doyle 940c78e1cf
Somewhat working cell light list setting 2024-10-06 10:57:18 +01:00
Jarrod Doyle 13f822673a
Make light indices a list 2024-10-06 10:56:17 +01:00
Jarrod Doyle 5fcf9db59c
Add sphere to sphere intersection test 2024-10-06 10:55:56 +01:00
Jarrod Doyle 1d32b3ef7b
Set light table index on brush lights 2024-10-05 19:19:45 +01:00
Jarrod Doyle 5d72ba546e
Extract anim mapping update to method 2024-10-05 19:09:16 +01:00
Jarrod Doyle 55c9c2cd31
Set AnimCellMaps and update AnimLight props 2024-10-05 19:06:16 +01:00
Jarrod Doyle 7c733fc9fd
Set cell light palette, lightmap bitmasks, and layers 2024-10-05 18:14:25 +01:00
Jarrod Doyle 6d665302d2
Make Lightmap a class and add AddLayer method 2024-10-05 18:13:30 +01:00
Jarrod Doyle 1f05663460
Add dummy sunlight source to light table 2024-10-05 17:36:12 +01:00
Jarrod Doyle dff2a9da2c
Add comment about sunlight 2024-10-05 16:35:11 +01:00
Jarrod Doyle 0a4dcc6de0
Clear cell anim light palette 2024-10-05 16:27:35 +01:00
Jarrod Doyle 0bcf24f640
Remove unneeded using directives 2024-10-05 15:00:47 +01:00
Jarrod Doyle 3fa86a233f
Use TryGetChunk everywhere 2024-10-05 14:57:40 +01:00
Jarrod Doyle ab738203d6
Reset lighting table and lightmaps 2024-10-05 14:52:09 +01:00
Jarrod Doyle ea72c3af4a
Make LightmapInfo a class 2024-10-05 14:51:31 +01:00
Jarrod Doyle 013a3b845a
Make Cell and LightTable classes 2024-10-05 14:35:07 +01:00
Jarrod Doyle 25e8e50f5e
Add DbFile TryGetChunk method 2024-10-05 14:33:53 +01:00
Jarrod Doyle b9eae0e437
Split lightmap pixels array into layers 2024-10-04 18:49:37 +01:00
Jarrod Doyle 9251685d26
Handle subtractive lights 2024-09-29 14:46:46 +01:00
Jarrod Doyle bc01e91dbc
Fix not applying spotlight settings 2024-09-29 11:53:14 +01:00
Jarrod Doyle 7ec7f71239
Slightly handle unfound models 2024-09-29 11:27:36 +01:00
Jarrod Doyle 47d95307b5
Use existing lighttable info to apply anim lights 2024-09-29 11:03:26 +01:00
Jarrod Doyle 69b29c15f6
Fix incorrect anim light brightness and light table mapping 2024-09-29 11:02:47 +01:00
Jarrod Doyle 93410a46d5
Gather anim lights 2024-09-29 10:39:40 +01:00
Jarrod Doyle 6efceff852
Fix incorrect AnimLight prop write 2024-09-29 10:30:23 +01:00
Jarrod Doyle 067cd2cc00
Slight light gather refactor 2024-09-29 10:22:43 +01:00
Jarrod Doyle b57d15f6f0
Remove outdated comment 2024-09-29 10:14:46 +01:00
Jarrod Doyle bd72554b9a
Add ability to not inherit properties 2024-09-29 10:09:09 +01:00
Jarrod Doyle 46fe99bbfc
Parse AnimLight property 2024-09-29 09:52:12 +01:00
Jarrod Doyle 8b7ffcd7a3
Recalculate TOC on write 2024-09-27 17:46:10 +01:00
Jarrod Doyle bcc60eff52
Add BSP tree and LightTable parsing 2024-09-27 17:42:28 +01:00
Jarrod Doyle d7fcf7a2d8
Add model vhots and model light offset/dir 2024-09-26 20:25:01 +01:00
Jarrod Doyle 2420bbef4f
Handle spotlight property 2024-09-26 17:16:11 +01:00
Jarrod Doyle 51e3a3a9e7
Add prop spotlight parsing 2024-09-26 16:45:48 +01:00
Jarrod Doyle 22600a27e5
Add inner radius support 2024-09-26 16:03:50 +01:00
Jarrod Doyle cb526c634c
Make lighting use all cores 2024-09-26 13:10:42 +01:00
Jarrod Doyle dca1b1e5ed
Extract light strength calculation to method in prep for inner radius handling 2024-09-26 12:12:14 +01:00
Jarrod Doyle dcecc33bcd
Handle HDR and light strength multiplication in AddLight 2024-09-26 12:04:58 +01:00
Jarrod Doyle 196e97a8fd
Apply light property position offset 2024-09-25 18:50:30 +01:00
Jarrod Doyle fa360b02cc
Remove ClipPoly3d 2024-09-25 18:39:51 +01:00
Jarrod Doyle b480753c13
Share 2d mapped points of poly across all light calculations 2024-09-25 18:39:40 +01:00
Jarrod Doyle ef32b47e02
Implement plane mapper struct and use it in clipping functions 2024-09-25 18:25:54 +01:00
Jarrod Doyle 422630c2d9
Neaten up ClipPointToPoly3d 2024-09-25 17:43:31 +01:00
Jarrod Doyle 2c74cc5594
Replace epsilon usages with constant 2024-09-25 17:39:44 +01:00