Commit Graph

81 Commits

Author SHA1 Message Date
Christoph Oelckers dc60c7f72e - fixed use of brightmaps.
Due to the blending they are essentially inactive on translucent content and Duke Nukem heavily abuses this.
2019-11-15 20:51:02 +01:00
Christoph Oelckers 022c074ece - fixed brightmaps again - hopefully for real this time.
The lighting model being used here is not really good for implementing render effect.
2019-11-11 23:54:09 +01:00
Christoph Oelckers 3be9deb070 - removed the different shadeDiv for Ion Fury.
This isn't necessary and was apparently caused by a bug that got fixed in the mean time.
2019-11-11 23:24:31 +01:00
Christoph Oelckers 79561ace09 - use the precalculated or script-specified fade colors, if present. 2019-11-10 21:11:17 +01:00
Christoph Oelckers 5fc81d1bd4 - made brightmaps operational.
The logic is not yet optimal but at least it works.
2019-11-10 19:42:26 +01:00
Christoph Oelckers 21ac5e87b5 - added blend table translucency estimation instead of using a lame default.
- draw fullscreen blends below the console.
- moved all mouse event processing out of the SDL backend to D_PostEvent.
- removed all remaining code for dealing with mouse buttons directly.
2019-11-10 15:15:14 +01:00
Christoph Oelckers 87acd7fef6 - fixed blend mode for the 2D drawer. 2019-11-10 12:12:15 +01:00
Christoph Oelckers 55018aae7e - fixed mouse scaling 2019-11-10 11:59:22 +01:00
Christoph Oelckers cae710bd59 - fixed alpha threshold.
Not only is this a deprecated feature - it also does not work right when complex lighting is at play, it must be done in the shader to get proper results.
2019-11-10 10:01:31 +01:00
Christoph Oelckers 7e70c217fe - fixed console event processing and added a texture memory calculator. 2019-11-09 23:58:26 +01:00
Christoph Oelckers 0f74a5c3a4 - make the ImGui popup close on request. 2019-11-09 14:05:52 +01:00
Christoph Oelckers 2d46827ecc font
- Dear ImGUI test.
2019-11-07 20:32:49 +01:00
Christoph Oelckers d2cbd71dbf - adjustments 2019-11-07 20:30:56 +01:00
Christoph Oelckers b6a3a60251 - console output is functional. 2019-11-06 23:40:10 +01:00
Christoph Oelckers de829128ea - hooked up the 2D drawer
compiles but not tested yet.
2019-11-05 23:35:38 +01:00
Christoph Oelckers 1ee4efebb0 - fixed compilation. 2019-11-04 17:58:18 +01:00
Christoph Oelckers 1e0d49f947 - game starts again. 2019-10-26 13:16:32 +02:00
Christoph Oelckers 5cf5c74695 - let kopenFileReader have a look into demolition.pk3 if nothing else is found.
This should help as long as the old resource management is still in place.
2019-10-25 02:01:52 +02:00
Christoph Oelckers 20df360778 - converted the Polymost CVARs. 2019-10-23 21:11:37 +02:00
Christoph Oelckers 53248945e8 - added license headers. 2019-10-20 08:07:12 +02:00
Christoph Oelckers e5ddb28a2b - renamed texcache.cpp and moved it to its proper place.
The old content no longer exists, this is entirely backend code now.
2019-10-20 08:04:54 +02:00
Christoph Oelckers 85d377647a - tweaked the fade ramp a bit.
For Duke Nukem and its direct offspring (Nam, WW2GI and Redneck Rampage) the ramp is not a linear fade from 0 to 1, it needs to be a little darker than that.
Unfortunately the proper factor needed here must be set manually, this cannot really be calculated from the lookup tables.
2019-10-20 01:14:48 +02:00
Christoph Oelckers 9437387b4a - fixed handling of FogDisabled flag 2019-10-20 00:45:47 +02:00
Christoph Oelckers bb4a19cf3a - added a few more texture formats to FHardwareTexture.
For brightmaps we do not need full RGBA8 data with mipmaps - RGBA2 without mipmaps is fully sufficient here and will save a lot of video memory.
2019-10-19 23:14:36 +02:00
Christoph Oelckers 7d2f61db2e - converted all boolean parameters of the shader into a single flag word.
- discarded the idea of transient palettes because the maintenance here stood in no relation to the savingd.
2019-10-19 22:46:37 +02:00
Christoph Oelckers 39e32d560c - fixed progdir setup. 2019-10-19 19:22:23 +02:00
Christoph Oelckers d4fc13fba5 - cleaned up the sampler manager's content names and added the missing types to allow easier switching between indexed (no filtering) and non-indexed (filter as per user option). 2019-10-19 19:10:09 +02:00
Christoph Oelckers 2152780806 - added some hackery to render voxels properly again.
Something about their data preparation is not right, their depth looks totally off and causes fog to become to dense.
One more reason to reconstruct the renderer in a sane fashion.
2019-10-19 18:14:13 +02:00
Christoph Oelckers e2f9e12efb - implemented shade level based depth fading for the true color renderer. 2019-10-19 16:35:06 +02:00
Christoph Oelckers cd7bbe35a8 - removed all legacy fog code. 2019-10-19 15:52:46 +02:00
Christoph Oelckers 4a9f0248d7 - removed the texture ID cache.
Although this initially helped, it was only because it partially covered up the issues from the real problem which was using the sampler properties of the texture offsets.
With that one fixed this cache became pointless.
2019-10-19 10:40:47 +02:00
Christoph Oelckers bc986b8054 - make the engine consistently use BGRA data - the internal palettes were still RGBA, which caused problems down the line.
- increased cache size to 200 MB (Note: The cache really needs to be replaced with something better that can adapt better to a system's RAM size.)
2019-10-19 10:22:02 +02:00
Christoph Oelckers 00d59459a1 - fixed creation of true color textures and disabled fog in palette mode.
The fog should go away entirely but in palette mode it made everything too dark.
2019-10-18 22:09:19 +02:00
Christoph Oelckers dab7c43f7c - fixed all compiler errors.
It mostly works again, but still has a few glitches.
2019-10-18 19:06:57 +02:00
Christoph Oelckers 23265ad213 - rework of texture management for models
Voxels yet to do.
This also removes the redundant texture matrix for the glow texture.
2019-10-18 14:04:32 +02:00
Christoph Oelckers 542994cc20 - added lookup for brightmap palettes. 2019-10-18 12:11:53 +02:00
Christoph Oelckers 530a9944f7 - texture loader redone but not tested yet
Models are currently non-functional and need to reroute their texture handling to the global texture manager instead of handling everything themselves.

Voxels also need a bit of work to make their texture management more automated.
2019-10-18 11:37:07 +02:00
Christoph Oelckers c6514949e3 - texture creation WIP. 2019-10-18 00:20:27 +02:00
Christoph Oelckers 3da49ad20a - safety commit: all relevant code for the texturing system has been moved to texcache.cpp. 2019-10-17 21:44:34 +02:00
Christoph Oelckers bef8c9ae76 - hictinting cleanup.
This needs to be moved into the backend, and partially into the shader. So far this only removes the code from the main rendering logic, the final implementation is not done yet.
It had to go because it required the main rendering code to look deep into the texture data which would be a major blocker for refactoring.
2019-10-17 20:29:58 +02:00
Christoph Oelckers 304a906aa7 copy code 2019-10-17 14:21:51 +02:00
Christoph Oelckers 4f8e0dd936 - cleaned up a few copyright notices and unified licenses 2019-10-17 09:42:11 +02:00
Christoph Oelckers 0aa5db7969 - project rework to shorten compile times.
* subprojects fpr game frontends added and unsigned char option put into global flags.
2019-10-16 23:09:02 +02:00
Christoph Oelckers c588cd499a - let GLInstance::Draw set the palette indexing mode.
This can be trivially decided based on the texture type, so there's really no need to let the higher level code deal with this.
2019-10-10 23:14:57 +02:00
Christoph Oelckers fbc7e626e9 - removed the fullbright render pass, because this is better set up as a shader option.
- also removed the legacy fog modes because their implementation did not mix well with the texture system - they are also not really useful to begin with.

The last fog mode will most likely also be removed once true color shading is working but that one is less of an issue.
2019-10-10 21:05:10 +02:00
Christoph Oelckers 179076c4b1 - set up the texture matrix. 2019-10-10 19:46:46 +02:00
Christoph Oelckers 1407c18f8b - cleaned out some remains of the non-indexed render path.
All of this will be redone in the backend.
2019-10-10 19:40:33 +02:00
Christoph Oelckers c428e367a0 - hotfix for texture filter settings.
This needs to be done differently later to choose the proper clamp setting.
2019-10-10 19:16:27 +02:00
Christoph Oelckers 1fee7a5f01 - cleanup of texture creation code.
There were several mostly pointless options complicating all of this.
2019-10-10 00:07:45 +02:00
Christoph Oelckers 13115ad217 - another crash in Blood 2019-10-08 01:37:43 +02:00