Commit graph

1427 commits

Author SHA1 Message Date
Vsevolod Kremianskii
e61250aa44 Do not use lightmaps in dynamic room lighting mode 2021-05-08 01:42:12 +07:00
Vsevolod Kremianskii
15b0424984 Refactor PBR shaders 2021-05-08 01:39:50 +07:00
Vsevolod Kremianskii
0e22dbfd47 Refactor Blinn-Phong shaders 2021-05-08 00:11:39 +07:00
Vsevolod Kremianskii
e6b70fe6e2 Use a separate (simplified) shader for diffuseless models 2021-05-07 19:39:40 +07:00
Vsevolod Kremianskii
e8ff1d9ece Revise PBR shaders
While at it, move GLSL sources into a separate folder. Also split them
into multiple files: common, Blinn-Phong and PBR.
2021-05-07 18:55:17 +07:00
Vsevolod Kremianskii
133949fe3e When prefiltering an envmap, take envmap resolution as uniform 2021-05-07 16:53:16 +07:00
Vsevolod Kremianskii
df7939de1a Fix unwanted model culling during character generation 2021-05-07 16:39:27 +07:00
Vsevolod Kremianskii
edabf403d3 Refactor the scene graph
Among other things, make it responsible for culling objects.
2021-05-06 13:22:34 +07:00
Vsevolod Kremianskii
4d8b298e3a Clear transition flag in SceneNodeAnimator
This fixes certain issues with animation blending.
2021-05-06 11:35:50 +07:00
Vsevolod Kremianskii
042d9be42f Properly blend particles with Lighten blending type
Also fix how particles interact with self-illuminated background.
2021-05-06 09:12:28 +07:00
Vsevolod Kremianskii
aab0bf33ca Refactor frustum culling
- Give more descriptive names to frustum planes
- Simplify AABB in frustum check (is also more accurate now?)
2021-05-06 08:31:52 +07:00
Vsevolod Kremianskii
a0e72164ed Convert stateutil into StateManager
Apparently, application-side caching of GL states improves performance.
2021-05-06 08:07:12 +07:00
Vsevolod Kremianskii
ae7dc8eb12 Move GLSL shaders into a separate CPP file 2021-05-06 07:42:28 +07:00
Vsevolod Kremianskii
c9a9e20a1f Make fog less prominent in HDR mode 2021-05-06 07:22:39 +07:00
Vsevolod Kremianskii
82c0398a24 Refactor heightmapped water rendering
This also fixes seams, although not completely.
2021-05-06 07:18:04 +07:00
Vsevolod Kremianskii
a89338d8cd Tweak tangent space calculations
Not to say it was incorrect before, but this version is closer to Learn
OpenGL.
2021-05-05 20:45:24 +07:00
Vsevolod Kremianskii
05ca0596e4 Implement external default party configuration
Default party configuration, used when loading a module from the
main menu, can now be configured from defaultparty.2da resource.
2021-05-05 14:52:24 +07:00
Vsevolod Kremianskii
5f99775c50 Treat lightmapped objects as not self-illuminated 2021-05-05 14:17:10 +07:00
Vsevolod Kremianskii
fc066f743d Add Python script to bootstrap modules from other modules
[ci skip]
2021-05-05 12:27:35 +07:00
Vsevolod Kremianskii
6386c5e61c Update models diagram
[ci skip]
2021-05-05 09:45:08 +07:00
Vsevolod Kremianskii
2288c5dac8 Remove .editorconfig
I'm not sure whether it's actual anymore, nor do I know if it ever worked
correctly.

[ci skip]
2021-05-05 08:10:40 +07:00
Vsevolod Kremianskii
62ed8f58e2 Move tools, launcher, external and tests under src directory 2021-05-05 08:08:12 +07:00
Vsevolod Kremianskii
4aceef329d Update modules diagram
[ci skip]
2021-05-05 00:26:09 +07:00
Vsevolod Kremianskii
67076473b2 Rename librender to libgraphics 2021-05-05 00:24:53 +07:00
Vsevolod Kremianskii
e3d49fd3b2 Implement footstep sounds 2021-05-04 23:21:18 +07:00
Vsevolod Kremianskii
7a77cabf4c Fix loading animation events 2021-05-04 21:07:20 +07:00
Vsevolod Kremianskii
7814b61ec7 Add support for RLE compression to TgaWriter 2021-05-04 18:33:57 +07:00
Vsevolod Kremianskii
ae47b3de64 Replace libtga with a custom TGAWriter 2021-05-04 16:22:22 +07:00
Vsevolod Kremianskii
af221d6d81 Enable dynamic lighting of non-lightmapped area models 2021-05-04 14:25:55 +07:00
Vsevolod Kremianskii
a5b4e81b02 Implement grass lightmapping 2021-05-04 14:04:41 +07:00
Vsevolod Kremianskii
fb8bf67aaf Move game paused check from Module into Game 2021-05-04 12:30:08 +07:00
Vsevolod Kremianskii
93996accf2 When routine is not implemented, default object id must be Invalid 2021-05-04 11:00:27 +07:00
Vsevolod Kremianskii
373cf4e14c Tweak lens flares
- Lens flare is a screen-space effect
- Billboard size equals flare size * constant
- Make billboard translucent
2021-05-04 10:55:24 +07:00
Vsevolod Kremianskii
ea4b444af8 Enable back-face culling when rendering scene
This is in line with how vanilla does it. While at it:

- Replace ambigous rotations in Control with separate meshes
- Draw blur and result in WorldRenderPipeline using NDC quads
2021-05-04 09:12:36 +07:00
Vsevolod Kremianskii
d78bd29e6d Add basic lens flare implementation 2021-05-03 22:48:46 +07:00
Vsevolod Kremianskii
c287a57472 Load light flares from MDL 2021-05-03 20:36:49 +07:00
Vsevolod Kremianskii
1751023903 Implement danglymeshes 2021-05-03 18:37:38 +07:00
Vsevolod Kremianskii
2212f0ff00 Merge ScriptObject and Object
ScriptObject is redundant, now, that variables store id, not pointers.
2021-05-03 13:52:22 +07:00
Vsevolod Kremianskii
e5fab733b5 Fix non-English language support
Non-ASCII characters have codes larger than 127. When used as indices,
these must be treated as unsigned.
2021-05-03 12:20:42 +07:00
Vsevolod Kremianskii
0a4f7f7fe5 Ensure no framebuffer is bound after pipeline initialization
This fixes the black screen bug at TSL startup.
2021-05-03 11:19:50 +07:00
Vsevolod Kremianskii
028694c440 Do not update and draw in main loop if window is out of focus 2021-05-03 10:08:51 +07:00
Vsevolod Kremianskii
6e5d5d947f launcher: Determine window size from its contents 2021-05-02 18:31:58 +07:00
Vsevolod Kremianskii
248907fba1 Add Python script to generate LIP files from text 2021-04-22 21:10:20 +07:00
Vsevolod Kremianskii
2a7c19eed9 Rename examine_lip to inspect_lip, improve output 2021-04-22 19:00:34 +07:00
Vsevolod Kremianskii
25253405ce Revert to storing object id, not object pointer in scripts
- This is how vanilla does it
- It will supposedly be easier to save delayed actions this way
2021-04-22 17:53:55 +07:00
Vsevolod Kremianskii
533f6cf949 In examine_lip.py output shape descriptions, not indices 2021-04-22 16:34:11 +07:00
Vsevolod Kremianskii
66e8a9a0bf Add Python script to examine LIP files 2021-04-22 15:02:02 +07:00
Vsevolod Kremianskii
a25a47c8a4 Cleanup Python scripts 2021-04-22 15:01:41 +07:00
Vsevolod Kremianskii
a9840701c8 Rename analyze.py to count_json_values.py 2021-04-22 14:44:50 +07:00
Vsevolod Kremianskii
0e0f018b5b Add tool to convert LIP to JSON and vice versa 2021-04-22 14:02:43 +07:00