Commit graph

129 commits

Author SHA1 Message Date
Christoph Oelckers
9d73e4c635 - fixed errors in wallsprite setup for the classic software renderer:
* it did not use the correct texture.
* it had a math error in the right edge's y-coordinate calculation.
2017-05-23 09:37:38 +02:00
Rachael Alexanderson
2acb485121 - Added +SPRITEFLIP which reverses a sprite's left-rightness. 2017-05-03 21:13:31 +02:00
Magnus Norddahl
c8070c65d4 - Add support for drawing decals on 3d floors in the software renderer 2017-05-02 22:26:13 +02:00
Christoph Oelckers
57d703236b - changed Doom source license to GPL in all subdirectories and fixed missing licenses in a few other files. 2017-04-17 12:27:19 +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
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
nashmuhandes
99d1581c27 Added "DontLightActors" flag for dynamic lights. Actors will not be illuminated by lights that are given this flag. 2017-03-28 21:33:16 +02:00
Magnus Norddahl
1f109a5deb - fix wrong particle Y offset 2017-03-16 19:15:42 +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
80f9c81e36 - move PrepareTexture out of the inner drawer loops 2017-03-15 02:59:33 +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
Magnus Norddahl
77a388e908 Fix default palette for voxel BGRA slab data and support translated 8-bit slab data in true color mode 2017-03-11 18:31:53 +01:00
Rachael Alexanderson
bb1d29d491 - Fixing r_voxel's license. 2017-03-10 12:04:43 +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
Christoph Oelckers
c008ddaf66 - replaced homegrown SWORD, SBYTE and uint32_t types. 2017-03-09 19:31:45 +01:00
Magnus Norddahl
65f8d65858 Minor code clean up 2017-03-06 23:27:02 +01: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
0702e4523d Fix that sprite light wasn't calculated using the center of the sprite 2017-02-23 09:27:00 +01:00
Magnus Norddahl
92e6f070b4 Fix sprite dynlight distance check 2017-02-23 07:05:21 +01:00
Magnus Norddahl
ef41e8e54e Add dynamic light to sprites 2017-02-23 06:01:01 +01:00
Magnus Norddahl
dfcfd0462f Hook up sprite php drawers (but disable them for now as they don't fully work yet) 2017-02-19 01:23:16 +01:00
Magnus Norddahl
eac98ac226 Calculate sprite dynamic light contribution and pass it along to the sprite drawer 2017-02-14 06:37:06 +01:00
Magnus Norddahl
5a85fabfa6 Add true color support to voxel renderer 2017-02-12 01:27:26 +01:00
Magnus Norddahl
0cea344dce Fix voxel clipping bug 2017-02-11 23:23:34 +01:00
Magnus Norddahl
8c5360e547 Enable Ken Silverman's voxel drawing code now that he has given us permission to license it as GPL 2017-02-11 22:10:52 +01:00
Magnus Norddahl
3c0d769499 Fix portals draw segment indexing bug 2017-02-09 22:58:28 +01:00
Magnus Norddahl
b36444ca1c Fix camera shader colormap (invulnerability effect) not getting applied to hardware accelerated player sprites 2017-02-07 20:43:41 +01:00
Magnus Norddahl
58495ea714 Renamed Clip3DFloors to Clip3D to fix gcc compile error 2017-02-06 16:04:27 +01:00
Rachael Alexanderson
9c50600286 - fix compile errors 2017-02-05 00:53:36 -05:00
Magnus Norddahl
4172d70d95 Make Frozen Time rendering 4 times faster by grouping draw segments in batches of 100 (old algorithm processed 32000 draw segs per sprite!) 2017-02-05 00:42:42 +01:00
Magnus Norddahl
beae9a3dc7 Stop using validcount for sprites 2017-02-04 20:32:06 +01:00
Magnus Norddahl
cfe4c55973 Remove software renderer internals from F3DFloor 2017-02-04 19:13:56 +01:00
Magnus Norddahl
d9e545a519 Hook up thread slices and eliminate some statics hiding in misc functions 2017-02-04 15:51:54 +01:00
Magnus Norddahl
6f5e720576 Split drawer command queue from drawer threads 2017-02-04 12:38:05 +01:00
Magnus Norddahl
45f623faf4 Move frame memory allocator into RenderThread 2017-02-04 02:50:52 +01:00
Magnus Norddahl
627a388d57 Move renderer singletons into a RenderThread class 2017-02-04 00:25:37 +01:00
Magnus Norddahl
da346427d3 Change draw segment list to use TArray 2017-02-03 21:11:55 +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
d8c6f9acfd Limit access to sprite drawer variables 2017-02-02 13:51:41 +01:00
Magnus Norddahl
f3d968cf41 Move wall drawer args into functions 2017-02-02 11:16:18 +01:00
Magnus Norddahl
69b7312099 Add some transform helpers on RenderViewport 2017-02-01 23:23:10 +01:00