Commit graph

172 commits

Author SHA1 Message Date
Emile Belanger
b83928f437 Clear Viewpointbuffer position so it does not go to infinity 2021-05-02 22:22:43 +02:00
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
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
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
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
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
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
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
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
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
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
Christoph Oelckers
16bad04da8 - premap stuff.
# Conflicts:
#	source/glbackend/glbackend.cpp
2020-06-22 00:06:51 +02:00
Christoph Oelckers
83a760874b - removed some Build related includes from core code. 2020-06-20 18:01:02 +02:00
Christoph Oelckers
95b4340eec - initial palette shader work. 2020-06-17 12:26:01 +02:00
Christoph Oelckers
d4b32bf79f - fully synchronized the backend code with GZDoom.
The camera texture code couldn't be done earlier.
2020-06-14 21:13:22 +02:00
Christoph Oelckers
5effc95ae1 - updated startup dialog and fixed multisampling not active in the 3D scene. 2020-06-14 20:59:26 +02:00
Christoph Oelckers
67b1963e7c - fixed render state management.
There are effectively two states - the one in the backend and a local one in the drawer for the render list which is supposed to eliminate some of the more costly repeated calls.
This higher level state was cached globally, which did not work anymore because the real render state could be changed elsewhere without this code realizing it.
All this means that the render list drawer must create a new state cache for each call and also must apply its current pending render state before leaving to ensure that everything is properly reset.
2020-06-12 22:32:49 +02:00
Christoph Oelckers
60b18c7ec9 - Blood: use the 2D drawer to clear the screen for 2D display. 2020-06-12 20:31:23 +02:00
Christoph Oelckers
6a9f1e9da1 - removed the old OpenGL interface. 2020-06-12 00:25:52 +02:00
Christoph Oelckers
ba397f5ca1 - always draw floors opaque 2020-06-11 23:55:23 +02:00