Commit graph

223 commits

Author SHA1 Message Date
Rachael Alexanderson
e1b4bb11ba Merge https://github.com/coelckers/gzdoom 2017-07-09 20:09:12 -04:00
Magnus Norddahl
ddd1b629c3 - Calculate globvis/r_visibility in r_utility and use it in GL and poly renderers 2017-07-09 19:01:34 +02:00
Rachael Alexanderson
a148212215 Merge commit 'f1ad42c' 2017-06-12 00:22:59 -04:00
Magnus Norddahl
3b8570003a - Improved softpoly sprite clipping 2017-06-10 11:16:58 +02:00
Magnus Norddahl
a0cc78d6aa - Fix softpoly wall clipping bug 2017-06-10 10:16:42 +02:00
Major Cooke
b86aed5b01 Added polysoft render support for PSPF_MIRROR. 2017-06-05 10:39:18 -04:00
Rachael Alexanderson
c18134dbd3 - r_vanillatrans: Cache the cache! Transform the function into a global variable and recheck at the start of D_Display 2017-06-04 12:30:35 +02:00
Rachael Alexanderson
68b6f922f7 - Added auto-detection scheme for r_vanillatrans
It now works the following way:
(0) - Force off (ZDoom defaults)
(1) - Force on (Doom defaults)
(2) - Auto off (Prefer ZDoom defaults - if DEHACKED is detected with no ZSCRIPT it will turn on) (default)
(3) - Auto on (Prefer Doom defaults - if DECORATE is detected with no ZSCRIPT it will turn off)
2017-06-04 12:30:35 +02:00
Rachael Alexanderson
2997f31f9f - removed ZDOOMADD and updated actors in question with ZDOOMTRANS 2017-06-04 12:30:35 +02:00
Rachael Alexanderson
89b372cb01 - Changed MF7_SPRITEFLIP, MF8_ZDOOMTRANS to RenderFlags
- Added RF_ZDOOMADD
- renamed r_canontrans to r_vanillatrans
- this developer's insanity level has increased by 231%.
2017-06-04 12:30:35 +02:00
Rachael Alexanderson
01f88cfb16 - Added 'canonical transparency' cvar r_canontrans - this simply turns off transparency for Doom objects that were marked as transparent sometime in ZDoom's development cycle 2017-06-04 12:30:35 +02:00
Magnus Norddahl
31125486ad - Improve line portal rendering somewhat 2017-05-14 08:55:30 +02:00
Magnus Norddahl
0a4f4aaffd - Stop using sqrt when calculating texture coordinates 2017-05-13 15:48:55 +02:00
Magnus Norddahl
7af11b1963 - Offset sky in softpoly by 180 degrees 2017-05-12 17:59:22 +02:00
Magnus Norddahl
7a2be275af - Fix interpolator bug in softpoly 2017-05-12 17:47:11 +02:00
Magnus Norddahl
5c6cbd17a1 - Move polyobj rendering to be handled as a special case in RenderPolyScene 2017-05-12 17:26:17 +02:00
Magnus Norddahl
f7d1a2a574 - Add polyobj support to softpoly 2017-05-12 14:05:32 +02:00
Magnus Norddahl
f492e92cb5 - Handle degenerate triangles either sent as input or caused by clipping 2017-05-10 02:43:00 +02:00
Magnus Norddahl
9011f0ed5b - Fix texture coordinates for sloped walls 2017-05-06 18:44:06 +02:00
Magnus Norddahl
aca628acaf - Improve wall texture coordinates in softpoly 2017-05-06 15:48:04 +02:00
Magnus Norddahl
5c1dc900e3 - Slightly improve sky rendering in softpoly 2017-05-06 01:43:05 +02:00
Magnus Norddahl
4fcea96a1c - Improve softpoly sky rendering a little bit 2017-05-05 03:27:22 +02:00
Magnus Norddahl
17108e575a - Add support for drawing decals on 3d floors in softpoly 2017-05-02 22:24:32 +02:00
Magnus Norddahl
63e0310961 - add non-sse version of the softpoly drawers 2017-04-23 11:05:48 +02:00
Christoph Oelckers
2621c460e3 Revert "- add CPU.bSSE2 branching support to softpoly"
This reverts commit 545241aa06.

These commits are WIP stuff that should not be in the master branch. A work branch has been created to finalize this code.
2017-04-23 10:39:07 +02:00
Magnus Norddahl
fe2864d396 - add the AVX-2 softpoly drawer to the repository for completeness sake (not currently used) 2017-04-22 22:15:09 +02:00
Magnus Norddahl
9c805d1867 - added non-sse version of the true color softpoly drawers 2017-04-22 22:05:47 +02:00
alexey.lysiuk
e4c73cfc5f Fixed compilation on Linux
src/polyrenderer/drawers/poly_triangle.cpp:212:20: error: ‘CPU’ was not declared in this scope
src/polyrenderer/drawers/screen_triangle.cpp:955:6: error: ‘CPU’ was not declared in this scope
2017-04-22 22:21:34 +03:00
Magnus Norddahl
545241aa06 - add CPU.bSSE2 branching support to softpoly 2017-04-22 20:38:06 +02:00
Christoph Oelckers
1ee9256842 - did a complete workover of the weapon sprite translucency code that got inherited from QZDoom.
This was very poorly done without ever addressing the issues a composite render style can bring, it merely dealt with the known legacy render styles.
The same, identical code was also present in two different places.
The oversight that AlterWeaponSprite overrode even forced styles was also fixed.

OpenGL is not implemented yet but with the problems eliminated should be doable now.
2017-04-15 16:41:00 +02:00
Christoph Oelckers
e4d2380775 - moved all remaining fields from PClassActor to FActorInfo.
- added a few access functions for FActorInfo variables.

With PClassActor now empty the class descriptors can finally be converted back to static data outside the class hierarchy, like they were before the scripting merge, and untangle the game data from VM internals.
2017-04-12 00:07:41 +02:00
Magnus Norddahl
f049e6145b - remove all usage of std::make_unique to keep things C++11 compliant 2017-04-11 01:25:44 +02:00
Magnus Norddahl
bdf02ea67c - move masked reads 2017-04-11 01:11:30 +02:00
Magnus Norddahl
1312e9fb72 - fix linker error on platforms with no SSE support 2017-04-05 22:36:57 +02:00
Magnus Norddahl
f12c42d8d1 - add fuzz mode to softpoly 2017-04-04 01:11:55 +02:00
Magnus Norddahl
4a9dffa70d - change subsector gbuffer to use a 8x8 block memory layout to avoid having to clip memory reads and writes 2017-04-01 23:21:06 +02:00
Magnus Norddahl
4a0b3c3bab - speed up triangle setup slightly 2017-04-01 16:42:24 +02:00
Magnus Norddahl
da6bfe65ff - only calculate gradients once 2017-04-01 04:38:15 +02:00
Magnus Norddahl
6db89a2ce1 - clean up the triangle setup functions 2017-04-01 03:44:45 +02:00
Christoph Oelckers
1d4ab0cc2a - implemented proper scaling for the status bar itself.
This allows using the UI scale or its own value, like all other scaling values.
In addition there is a choice between preserving equal pixel size or aspect ratio because the squashed non-corrected versions tend to look odd, but since proper scaling requires ununiform pixel sizes it is an option.

- changed how status bar sizes are being handled.

This has to recalculate all scaling and positioning factors, which can cause problems if the drawer leaves with some temporary values that do not reflect the status bar as a whole.
Changed it so that the status bar stores the base values and restores them after drawing is complete.
2017-03-29 19:23:40 +02:00
Magnus Norddahl
e8ba1156af - add rect drawers for softpoly's player sprites 2017-03-28 16:46:22 +02:00
Magnus Norddahl
d15def7d41 - remove TriVertex::NumVaryings as this did not help on readability at all 2017-03-28 10:52:19 +02:00
Magnus Norddahl
5adf7463cd - support render styles on decals 2017-03-27 21:59:43 +02:00
Magnus Norddahl
0537e9c1ba - implement all styles for sprites in softpoly 2017-03-27 21:03:51 +02:00
Magnus Norddahl
e865ba60f5 - support particle styles in softpoly 2017-03-27 11:33:16 +02:00
Christoph Oelckers
bb04eea996 Merge branch 'master' of https://github.com/coelckers/gzdoom 2017-03-27 01:06:28 +02:00
Magnus Norddahl
84e94f2a32 - change softpoly psprite drawing to do exactly what the software renderer does 2017-03-26 18:55:23 +02:00
Christoph Oelckers
0cbbd8d4b1 Merge branch 'master' of https://github.com/coelckers/gzdoom 2017-03-26 18:41:44 +02:00
Magnus Norddahl
a12f0862c9 - remove softpoly intersection math class 2017-03-26 17:12:20 +02:00
Magnus Norddahl
ffc90f16ab - Simplify the PolyDrawArgs interface 2017-03-26 10:10:55 +02:00
Magnus Norddahl
7b58eab332 - fix softpoly light visibility bug 2017-03-26 05:28:27 +02:00
Christoph Oelckers
488fface50 - started port of Doom status bar to ZScript.
Fullscreen HUD done with the exception of key and inventory bar. I also used the opportunity to make it a bit more resistant against badly designed inventory icons.
2017-03-25 21:40:17 +01:00
Magnus Norddahl
04057b8b91 - implement the blending modes for palette mode in softpoly 2017-03-25 08:38:27 +01:00
Rachael Alexanderson
c5805ddd6e - removed another vestigial #define NO_SSE 2017-03-25 01:46:41 -04:00
Rachael Alexanderson
2c3d867946 - fixed invalid variable reference on ARM 2017-03-25 01:40:13 -04:00
Magnus Norddahl
af5355c69d - fix SSE intrinsics being used on arm 2017-03-25 06:14:19 +01:00
Magnus Norddahl
321e2da979 - initialize clipper with the view frustum for better performance
- change translucent objects to be pointers for faster sorting
2017-03-24 22:04:07 +01:00
Magnus Norddahl
ac518e23bf - improve triangle setup performance a little bit 2017-03-24 20:00:53 +01:00
Magnus Norddahl
bc8a4474d5 - optimize PolyTriangleDrawer::clipedge
- remove slow calls to roundf in the triangle setup functions
2017-03-24 13:04:02 +01:00
Magnus Norddahl
f178646e1a - improve sector portals rendering in softpoly
- fix a softpoly memory leak and change vertex list to be allocated using the frame allocator
2017-03-24 07:28:28 +01:00
Magnus Norddahl
c21037fb03 - fix sky sector portals 2017-03-24 02:11:24 +01:00
Magnus Norddahl
e12f48699e - fix the culling bugs in softpoly by switching to a pseudo-angle clipper 2017-03-23 03:41:44 +01:00
Magnus Norddahl
b2e61412da - add missing sprite blends to the soft poly drawer 2017-03-22 09:11:21 +01:00
Magnus Norddahl
25a30f8b7e - remove vectorcall from the 8 bit drawer 2017-03-21 14:28:31 +01:00
Magnus Norddahl
d437b342db - replaced the softpoly drawers with templated versions 2017-03-21 14:12:19 +01:00
Magnus Norddahl
11e5759913 - detached the poly renderer from the software renderer 2017-03-20 08:28:16 +01:00
Christoph Oelckers
fea4079b7c - moved nodes into FLevelLocals. 2017-03-17 01:42:37 +01:00
Christoph Oelckers
f201dab534 - moved the subsectors into FLevelLocals. 2017-03-17 00:22:52 +01:00
Christoph Oelckers
2b2c986bd0 - cleanup of GL renderer interface and improper header use in software renderer. 2017-03-16 21:34:03 +01:00
Christoph Oelckers
b529b1e3a7 - removed several unneeded GL headers from the software renderer's sources.
- consolidated the code to calculate a sprite's display angle for all 3 renderers.

As it turned out, they all differed in their feature support because they had always been updated independently by different people.
2017-03-16 13:49:34 +01:00
Christoph Oelckers
3aa7687d91 - made 'nocoloredspritelighting' a global option and also implemented it in the software renderer. 2017-03-16 00:56:03 +01:00
Christoph Oelckers
76d3ae5ba2 made the sector's color_* properties work in the software renderer.
With no 3D floors this appears to be ok, but there are so many places where colormaps are being set in the software renderer that I cannot guarantee that I got all of them correct. This will need some testing.
2017-03-15 23:24:53 +01:00
Christoph Oelckers
921bc763fb - separated the software-renderer-specific parts of colormap processing from the common parts.
- moved testcolor and test fades into SWRenderer files.

These CCMDs work by hacking the default colormap and were never implemented for hardware rendering because they require many checks throughout the code.
2017-03-15 22:04:59 +01:00
Christoph Oelckers
9a24771a7d - refactored FDynamicColormap out of sector_t.
This has increasingly become an obstacle with the hardware renderer, so now the values are being stored as plain data in the sector, with the software renderer getting the actual color tables when needed. While this is a bit slower than storing the pregenerated colormap, in realistic situations the added time is mostly negligible in the microseconds range.
2017-03-15 22:04:59 +01:00
Magnus Norddahl
3838ec3edc - allow drawer queues to run immediately to improve r_scene_multithreaded performance
- removed unused pass ranges in DrawerThread
2017-03-14 23:03:14 +01:00
Christoph Oelckers
d86bd470e5 - moved two MAPINFO settings that are not exclusively used by the OpenGL renderer to the common code. 2017-03-14 18:31:11 +01:00
Magnus Norddahl
00f6ed45a2 Make LightVisibility thread local 2017-03-12 20:40:00 +01:00
Magnus Norddahl
5fdbbc4f9e Remove usage of r_viewpoint and r_viewwindow globals from software renderer and poly renderer 2017-03-12 18:54:39 +01:00
Magnus Norddahl
0c9014b984 - move r_utility globals into r_viewpoint and r_viewwindow
- change r_utility functions to only work on FRenderViewpoint and FViewWindow
2017-03-11 23:28:07 +01:00
Christoph Oelckers
921abc404d - fixed GCC warnings and errors
(Is there anyway to tone down GCC's warning level? It outputs too many false positives for potentially uninitialized variables in which the genuine errors get drowned.)
2017-03-11 19:02:35 +01:00
Rachael Alexanderson
81291e6892 - fixed: Clang on Linux compile 2017-03-11 11:01:30 -05:00
Christoph Oelckers
bd7476fb8d - untangled r_defs.h from actor.h
Both files can now be included independently without causing problems.
This also required moving some inline functions into separate files and splitting off the GC definitions from dobject.h to ensure that r_defs does not need to pull in any part of the object hierarchy.
2017-03-10 02:22:42 +01:00
Christoph Oelckers
4de0f8b1fa - compile both poly and sw renderer as one unit, because due to the includes this gets really slow otherwise. Lumping these together saves 50 seconds per build on my system with a 3.4 GHz Core i7 and an SSD for storage, so on other systems it may be even more. 2017-03-10 00:43:36 +01:00
Christoph Oelckers
a4710bcdb0 - did a bit of header cleanup to reduce the dependency on dobject.h. 2017-03-09 23:30:42 +01:00
Christoph Oelckers
d2beacfc5f - except for DWORD, all homegrown integer types are gone - a handful were left where they represent genuine Windows types. 2017-03-09 19:54:41 +01:00
Magnus Norddahl
65f8d65858 Minor code clean up 2017-03-06 23:27:02 +01:00
Rachael Alexanderson
cb8b2de287 - somehow, this missed a few. 2017-03-06 16:58:48 -05:00
Rachael Alexanderson
28abc96aef - fully implemented "nolightfade" to turn off diminishing lights in the software renderer.
- unfortunately, LIGHT2SHADE had to be transformed into a namespaced function.
2017-03-06 16:14:54 -05:00
Magnus Norddahl
56045c1293 Remove r_drawers.h and move softpoly drawer related stuff out of the swrenderer 2017-02-23 09:02:13 +01:00
Magnus Norddahl
ad507ca246 Removed drawergen tool and all LLVM dependencies (don't let the door hit you on your way out, llvm!) 2017-02-23 08:28:18 +01:00
Magnus Norddahl
38453d0435 Added most of the blend modes 2017-02-22 00:27:06 +01:00
Magnus Norddahl
c918950ff6 Add php drawer for the poly renderer 2017-02-21 09:08:51 +01:00
Rachael Alexanderson
9c50600286 - fix compile errors 2017-02-05 00:53:36 -05:00
Magnus Norddahl
5bae06a3c6 Make RenderScene the work dispatching class 2017-02-04 14:00:21 +01:00
Magnus Norddahl
6f5e720576 Split drawer command queue from drawer threads 2017-02-04 12:38:05 +01:00
Magnus Norddahl
892350ac2e Add functions to CameraLight 2017-02-03 09:00:46 +01:00
Magnus Norddahl
7b4d9675c9 Fix compile errors 2017-02-02 15:24:21 +01:00
Magnus Norddahl
e90b73539e Move viewport drawing to its own folder 2017-02-02 15:10:06 +01:00
Magnus Norddahl
ca93d7456a Change redundant bRenderingToCanvas into a helper function 2017-02-01 21:59:48 +01:00
Magnus Norddahl
93166fa150 Remove r_swtruecolor variable as it is redundant 2017-02-01 21:42:08 +01:00
Magnus Norddahl
e78e76a593 Move r_viewport variables into a class 2017-02-01 16:02:21 +01:00
Rachael Alexanderson
2fb82aaa9f Revert "- Fully implemented Graf's level.PreserveSectorColor() changes into the software renderers."
This reverts commit 2f9453bc86.

# Conflicts:
#	src/swrenderer/line/r_line.cpp
#	src/swrenderer/line/r_renderdrawsegment.cpp
#	src/swrenderer/things/r_decal.cpp
#	src/swrenderer/things/r_wallsprite.cpp
2017-01-28 17:37:57 -05:00
Rachael Alexanderson
2f9453bc86 - Fully implemented Graf's level.PreserveSectorColor() changes into the software renderers. 2017-01-28 09:53:24 -05:00
Magnus Norddahl
ed05a2edd3 Create CameraLight class 2017-01-26 10:22:54 +01:00
Magnus Norddahl
4bbf1ba11c Move visibility stuff into LightVisibility 2017-01-26 09:49:07 +01:00
Rachael Alexanderson
07409f4997 - fixed compile error with status bar code in poly renderer. 2017-01-21 01:23:49 -05:00
Magnus Norddahl
2848ca53dc Merge remote-tracking branch 'gzdoom/master' into qzdoom
# Conflicts:
#	src/r_things.cpp
#	src/r_things.h
2017-01-16 23:05:34 +01:00
Magnus Norddahl
6c76c8534b Change visstyle_t back to how it was in ZDoom and stop using it internally in the swrenderer 2017-01-16 16:23:02 +01:00
Magnus Norddahl
1c3440e391 Merge remote-tracking branch 'gzdoom/master' into qzdoom
# Conflicts:
#	src/r_plane.cpp
#	src/r_plane.h
2017-01-16 06:03:21 +01:00
Magnus Norddahl
601ddb270d Create a class for the viewport 2017-01-15 04:06:52 +01:00
Magnus Norddahl
f9175561bb Change RenderTarget global to be an internal swrenderer variable 2017-01-15 03:19:03 +01:00
Magnus Norddahl
4c12ba740f Remove SetWindow from FRenderer interface 2017-01-15 02:46:43 +01:00
Magnus Norddahl
3093aaadc9 Remove SetupFrame and CopyStackedViewParameters from FRenderer interface 2017-01-15 01:54:25 +01:00
Magnus Norddahl
e1506df8a6 Change globvis to be picked up from the r_light values in softpoly 2017-01-13 15:22:22 +01:00
Magnus Norddahl
8209c4f392 Fix compile error 2017-01-13 13:27:31 +01:00
Magnus Norddahl
9e940b4287 Remove basecolormap global 2017-01-12 21:29:19 +01:00
Magnus Norddahl
80e1844d6c Split r_main into r_viewport, r_scene and r_light 2017-01-12 16:21:46 +01:00
Magnus Norddahl
dce3a1c81c Move remaining parts of r_things into r_visiblesprite 2017-01-11 15:41:42 +01:00
Rachael Alexanderson
6c04439315 - Fixed compile errors with last merge. 2017-01-09 10:16:24 -05:00
Magnus Norddahl
3b5dc96f4a Move player sprite scale to r_playersprite and make it private 2017-01-09 14:28:31 +01:00
Magnus Norddahl
bf850bb788 Merge remote-tracking branch 'gzdoom/master' into qzdoom
# Conflicts:
#	src/swrenderer/scene/r_things.cpp
2017-01-07 17:44:15 +01:00
Magnus Norddahl
d3056d2679 Split poly_triangle into multiple files 2016-12-30 02:20:24 +01:00
Magnus Norddahl
2659090e1c Move renders into folders 2016-12-27 06:31:55 +01:00