Commit Graph

275 Commits

Author SHA1 Message Date
Christoph Oelckers 9fd3ab6b5e - fixed texture precaching.
After the migration to GZDoom's full backend this never created any textureds when precaching things.
2021-04-11 09:59:55 +02:00
Christoph Oelckers b3bcedda6c - moved backend independent HUD code out of glbackend.cpp. 2021-04-11 08:40:18 +02:00
Mitchell Richters 029f8807df - Make `360. / 2048.` a constant expression and replace all uses throughout code. 2021-04-01 10:42:22 +11:00
Christoph Oelckers bbd5c0ac8b - transitioned voxel rendering to use the backend's implementation. 2021-03-02 17:10:34 +01:00
Christoph Oelckers d28d5a5e1f - use real fog, even in palette emulation mode.
Using the palette to apply fog is just far too broken and cannot be kept in check with all the hacks the Build engine allows.
This only works if all elements on screen use the identity translation lookup which is basically never the case.
Real fog, on the other hand, can easily be applied to everything.
2021-02-27 13:30:52 +01:00
Christoph Oelckers 3163e4a799 - check for invalid tiles being passed to the 2D renderer.
Since mods can actually replace valid tiles with invalid ones, the low level render code needs to check this case.
2021-01-27 23:52:40 +01:00
Christoph Oelckers 25ef58f897 - re-enabled all model specific code in Duke's animatesprites function and removed some remaining software renderer-only code in the engine. 2020-12-01 23:57:39 +01:00
Christoph Oelckers ed599d0f05 - moved the hires texture replacement logic into a backend callback.
This way it can be handled transparently to the calling code.
Fonts do not work yet, though.
2020-11-10 16:22:02 +01:00
Christoph Oelckers 8c241afc40 - undid texture substitution in 2D code. 2020-11-10 10:08:17 +01:00
Christoph Oelckers 40358febc1 - changed render interface to resolve textures to materials in the backend.
This is needed to have a unified spot where to resolve textures for both 2D and 3D.
2020-11-10 09:08:48 +01:00
Christoph Oelckers e95fea1056 - fixed: Toggling palette emulation should reset the texture filter in the samplers. 2020-10-10 18:57:16 +02:00
Christoph Oelckers 58dcf0586b - scale weapons down to the original tile's size.
Needed because hires replacements contain no scaling info.
2020-10-04 15:33:12 +02:00
Christoph Oelckers 3210dd5782 - fixed the noisiest value truncation warnings after shortly re-enabling them in the compiler, plus a few places where the warning pointed to incorrect code. 2020-09-26 11:59:24 +02:00
Christoph Oelckers f106f35598 - fixed interpolation of palette emulation. 2020-09-23 18:18:23 +02:00
Christoph Oelckers 28c5c72605 - fixed: black fog does not mean FogColor == 0 because its alpha component is non-0 2020-09-22 22:38:08 +02:00
Christoph Oelckers 78be8f866b - always use the containing sector's fog when rendering sprites.
This is for consistency, otherwise sprites with a palette translation would stand out. Also use shade dependent fog density instead of a single global value.
Currently this only has an effect in true color rendering mode.
2020-09-20 20:39:11 +02:00
Christoph Oelckers bac357a6be - disable the weapon in SW's savepics.
The way the weapon drawer is implemented does not work well with save pictures.
2020-09-19 21:31:35 +02:00
Christoph Oelckers 2bf5933923 - fixed weapon sprite translation index when in paletted mode. 2020-09-19 00:06:07 +02:00
Christoph Oelckers 29a10cabcb - fixed most issues with palette emulation.
Brightness is now correct - I have no idea why this factor of 1/0.85 is needed - something must reduce the brightness of the entire scene but I have no idea what.
2020-09-18 22:29:13 +02:00
Christoph Oelckers cf6b497d02 - fixed animation of weapon sprites
This also disables palette emulation for weapons because it's too buggy right now. Will be re-enabled once fixed.
2020-09-14 22:16:33 +02:00
Christoph Oelckers 4485587088 - removed the palette remapping in the lookup texture generators because it is no longer needed.
Fixes #396
2020-09-14 21:54:29 +02:00
Christoph Oelckers c61a2c3486 - enable palette emulation for HUD weapon drawing.
Not correct yet but the basics are in.
2020-09-13 23:14:44 +02:00
Christoph Oelckers fe329b0870 - fixed voxel rendering in palette emulation mode. 2020-09-13 21:08:10 +02:00
Christoph Oelckers 9e81fa89a8 - fixed some of the issues with palette emulation
* the palette shader was not bound.
* the palette textures were not bound.
* palette mode still used regular lighting on top of the palette emulation

This works a lot better than before but is still not complete.
2020-09-12 21:23:14 +02:00
Christoph Oelckers 222f82304d - fixed savegame image generation.
There were two errors:
1. The postprocessor was not run on the generated scene so that the target framebuffer never got set.
2. The generated PNG was not finalized and failed the integrity check of the savegame menu.

Fixes #48
2020-09-12 01:11:32 +02:00
Christoph Oelckers f4bd30b972 - Duke: Fixed noclip cheat message. 2020-09-10 21:50:22 +02:00
Christoph Oelckers 59eb923c11 - fixed replacement of hires textures.
Fixes #107
2020-09-10 20:52:40 +02:00
Christoph Oelckers dc0968bf61 - fixed fog on RRRA E2L1
Fixes #183
2020-09-05 23:20:48 +02:00
Christoph Oelckers 763be58134 - tinkering with the savepic code.
This was definitely missing but it's not the cause of the empty savepic.
2020-09-01 19:21:00 +02:00
Christoph Oelckers 765f211e05 - things are mostly working again.
Rendering produces an image again, input gets properly processed, but unsynchronised mouse input isn't properly applied yet.
2020-08-30 19:59:46 +02:00
Christoph Oelckers 0c455acaa2 - more work to switch over to the new loop.
Mainly separation of ticker and render calls
2020-08-30 10:42:44 +02:00
Christoph Oelckers 367b4ce051 - this should be all we need from GZDoom to hook up the main loop. 2020-08-30 09:32:34 +02:00
Christoph Oelckers 847fa48724 - cleaned out the remaining parts of baselayer.h
In particular this means to remove the option to disable widescreen aspect ratios. The way this was handled makes no sense with the current render backend.

The aspect ratio code will have to be redone entirely to properly obey the backend's settings.
2020-08-28 09:06:49 +02:00
Christoph Oelckers 3455610031 - base palette cleanup.
Avoid passing this anywhere in the client code. It should only be set right before rendering the 3D view and the only code using the base palette should be the 3D renderer and hud_drawsprite.
Also make the palette override CVARs 3D view only in debug mode.
2020-08-14 21:18:14 +02:00
Christoph Oelckers 66cb7f61a4 - fixed rendering on narrow screens with an aspect ratio less than 4:3 and removed some parts that are no longer needed. 2020-08-14 21:01:27 +02:00
Mitchell Richters 80291f9cb7 - For RR, pass vehicle TiltStatus through to backend as the double that it is. 2020-08-03 11:06:23 +10:00
Christoph Oelckers b120bade95 - fixed scuba gear display.
Fixes #37.
2020-07-26 18:35:47 +02:00
Christoph Oelckers f67d3270d8 - fixed a few cheat issues.
Fixes #29.
2020-07-26 17:04:02 +02:00
Christoph Oelckers efb73d04a0 - re-fixed the fix: Turned out that flipped offsetting is a bit more tricky.
Due to how this works it cannot be done automatically, it must be passed as a parameter because at the point where the offset gets applied, all information about how it was specified is lost.
This must be enabled as a specific parameter to DrawTexture.
2020-07-26 08:31:54 +02:00
Christoph Oelckers bcb6c36ef2 - fixed bad parameter for EnableFog 2020-07-24 23:46:52 +02:00
Christoph Oelckers 3d36e4839f - implemented rotation for HUD sprites. 2020-07-24 23:23:19 +02:00
Christoph Oelckers 55feadd11c - render the weapons with the DrawTexture interface and properly handle rotatesprite's alignment modes 2020-07-16 13:23:26 +02:00
Christoph Oelckers 8a1206edbc Merge remote-tracking branch 'remotes/origin/master' into back_to_basics2 2020-07-05 11:55:41 +02:00
Mitchell Richters dae1506182 - change `std::max()` to `std::min()` in glbackend.h. Fixes issue in coelckers/Raze#83. 2020-07-05 09:05:19 +02:00
Mitchell Richters 30300bf3b2 - allow shade in glbackend.h to accept negative values, but still at a max of numshades-1.
* This fixes some issues with distance lighting issues in Duke3D as reported at https://forum.zdoom.org/viewtopic.php?f=341&t=68838&start=75#p1158417.
2020-07-05 08:57:21 +02:00
Mitchell Richters bb57590d34 - add `gl_texture` CVAR to glbackend à la GZDoom.
* Will be useful for further debugging of the lighting to determine whether Build actually did/does do different visibility for floor/walls/ceilings, etc.
* Idea inspired by Gez: https://forum.zdoom.org/viewtopic.php?f=341&t=68838&start=75#p1158294
2020-07-04 18:26:11 +02:00
Christoph Oelckers d6e021a63d - statistics output 2020-07-03 21:44:57 +02:00
Christoph Oelckers 34c3838e62 - logo. 2020-06-26 22:49:56 +02:00
Christoph Oelckers 1993642ce8 - fixed precacher. 2020-06-22 01:07:19 +02:00
Christoph Oelckers 4c00e4cf7c - got rid of the old precaching code.
# Conflicts:
#	source/games/duke/src/zz_premap.cpp
2020-06-22 00:07:25 +02:00