Commit graph

250 commits

Author SHA1 Message Date
drfrag666
cdb60486c7 - Fixed compilation of previous commit. 2018-11-30 10:16:55 +01:00
Magnus Norddahl
e76a9c3085 - forgot to set the light level 2018-11-29 11:26:32 +01:00
Magnus Norddahl
20d5b904b2 - use psprite renderstyle on HUD models 2018-11-29 11:26:20 +01:00
Christoph Oelckers
8368331481 - more options for Doom 64 style gradients on walls:
* Colors can npw be defined per sidedef, not only per sector.
* Gradients can be selectively disabled or vertically flipped per wall tier.
* Gradients can be clamped to their respective tier, i.e top and bottom of the tier, not the front sector defines where it starts.

The per-wall colors are implemented for hardware and softpoly renderer only, but not for the classic software renderer, because its code is far too scattered to do this efficiently.

# Conflicts:
#	src/hwrenderer/scene/hw_renderstate.h
#	src/hwrenderer/scene/hw_walls.cpp

# Conflicts:
#	src/gl/scene/gl_walls_draw.cpp
2018-11-16 21:16:15 +01:00
drfrag666
eebd6c8319 Revert "- removed the 8x8 block drawing code from softpoly"
This reverts commit d086c3d4dc.

# Conflicts:
#	src/polyrenderer/drawers/poly_triangle.cpp
#	src/polyrenderer/drawers/poly_triangle.h

The softpoly renderer crashed at high resolutions without them.
2018-10-26 19:51:30 +02:00
drfrag666
2c8b5e700f Revert "- use the worker threads to clear the stencil buffer"
This reverts commit 0a265d028d.

# Conflicts:
#	src/polyrenderer/drawers/poly_triangle.cpp
#	src/polyrenderer/drawers/poly_triangle.h
2018-10-26 19:39:38 +02:00
Magnus Norddahl
9882cd9d6b - fix softpoly bug where sprites and translucent walls in front of models would disappear 2018-10-25 13:57:03 +02:00
Magnus Norddahl
b011900f48 - fix null pointer crash 2018-10-23 13:39:01 +02:00
Magnus Norddahl
6ca14ac8c6 - portal check is overridden by a different inverted check in the software renderer 2018-10-23 13:38:58 +02:00
Magnus Norddahl
a8112d4815 - Cull two-sided lines using the same rules as the software renderer is using (as suspicious as they may be) 2018-10-23 13:38:51 +02:00
Magnus Norddahl
908f7d639d - only render visual portals if they are front facing 2018-08-23 20:54:31 +02:00
Magnus Norddahl
d0ea9d7329 fix: softpoly TEXTURES sprites with scale of 2 are tiled 2018-07-30 23:35:58 +02:00
Magnus Norddahl
7144ac6897 - add support for specifying the exact thread count to r_multithreaded and r_scene_multithreaded 2018-07-28 12:30:10 +02:00
Magnus Norddahl
399ce3cfbf - softpoly: fix sprites still lit when dynlights off
(cherry picked from commit 2e5b7a7d8b)
2018-07-01 21:14:36 +02:00
Magnus Norddahl
f0edfcf819 - softpoly: fix normal walls not getting rendered for subsectors with poly objects in them
(cherry picked from commit 6d6ee1281e)
2018-07-01 18:47:47 +02:00
Christoph Oelckers
833006b5d9 Fixed: Software rendered models checked the wrong CVAR for enabled dynamic lights.
(cherry picked from commit e402babfc0)
2018-06-26 11:21:22 +02:00
Magnus Norddahl
96c1156cf4 - make softpoly use the r_dynlights cvar
(cherry picked from commit f8272287d2)
2018-06-26 11:21:21 +02:00
Magnus Norddahl
087f709637 - fix Software models don't display over nonexistent sprites
(cherry picked from commit bce49ad7c8)
2018-06-17 18:55:44 +02:00
Magnus Norddahl
34500a6324 - move DrawArray and DrawElements to PolyTriangleDrawer
(cherry picked from commit a91147a3a5)
2018-06-16 19:59:22 +02:00
Magnus Norddahl
db8c8c5ac3 - add support for using FModelVertex as input to the softpoly vertex shader
(cherry picked from commit 9ba26a5ece)
2018-06-16 19:59:19 +02:00
Magnus Norddahl
ddbf2f3166 - remove unused DrawerCommand::DebugInfo
(cherry picked from commit 628f6c32d9)
2018-06-16 19:20:21 +02:00
Magnus Norddahl
0a265d028d - use the worker threads to clear the stencil buffer
(cherry picked from commit de67393b4e)
2018-06-16 19:20:19 +02:00
Magnus Norddahl
fe940d09a6 - enable model rendering in the software renderer
(cherry picked from commit 85f5f897d7)

# Conflicts:
#	src/polyrenderer/scene/poly_playersprite.cpp
#	wadsrc/static/menudef.txt
2018-06-16 19:20:17 +02:00
Magnus Norddahl
01332a1bde - add dynamic lights to softpoly and software renderer models
(cherry picked from commit 5464d2a577)

# Conflicts:
#	src/gl/scene/gl_spritelight.cpp
2018-06-06 08:49:08 +02:00
Magnus Norddahl
6a1722076a - fix null pointer crash in softpoly
(cherry picked from commit 61f379c88f)
2018-06-06 01:52:07 +02:00
Magnus Norddahl
28ec13b66c - avoid using global variables in the inner fuzz drawer loop
(cherry picked from commit 674b6ee85c)
2018-06-05 20:10:11 +02:00
Magnus Norddahl
69c51ae8b7 - fix dynlight color not being applied on sprites
(cherry picked from commit 51fd715404)
2018-06-05 20:10:10 +02:00
Magnus Norddahl
2dff3af8cb - fix softpoly colored fog bug in the new drawers
(cherry picked from commit 9cd751ae7a)
2018-06-05 20:10:09 +02:00
Magnus Norddahl
3e9f8e7679 - use a light array to simplify inner light math
(cherry picked from commit e3c78ab838)
2018-06-04 09:55:35 +02:00
Magnus Norddahl
f218485a57 - use affine dynlights in softpoly
(cherry picked from commit 97f4cc1951)
2018-06-04 09:55:33 +02:00
Magnus Norddahl
a166f6a7ae - replace the old rect drawers with new ones based on render styles
(cherry picked from commit d425fb2d4a)
2018-06-03 20:13:48 +02:00
Magnus Norddahl
90e131b6fd - always store 255 in alpha channel for opaque things as the alpha channel is no longer ignored by the framebuffer backend (softpoly drawer)
(cherry picked from commit 11bb626ab6)
2018-06-03 20:11:22 +02:00
Marisa Kirisame
1afcd9b7c7 Mirroring should be flipped on HUD models since the view to world space transform already inverts one axis
(cherry picked from commit f74e74ac4b)
2018-06-03 19:51:45 +02:00
Marisa Kirisame
5a76623993 Swap front face culling for GL model drawer (CCW should be the default).
Added mirroring handling to software models.

(cherry picked from commit dea1d0259d)
2018-06-03 19:49:48 +02:00
Magnus Norddahl
d086c3d4dc - removed the 8x8 block drawing code from softpoly
(cherry picked from commit a186677092)
2018-06-03 19:46:38 +02:00
Christoph Oelckers
ff5c488a0f - pass mirroring info to model drawers.
Actual evaluation only implemented in OpenGL. Not tested yet because the bug report had no testable example.

(cherry picked from commit 94d1a73ae8)
2018-06-02 21:31:23 +02:00
Magnus Norddahl
60929f353f - replace softpoly block drawers with span drawers and make them use blending rules directly from render styles
- add dynlights to softpoly pal mode

(cherry picked from commit 4e6226fc2d)
2018-05-30 11:56:15 +02:00
Magnus Norddahl
1055e45566 - Modify TriBlendMode enum to match the render styles
(cherry picked from commit 190b673890)
2018-05-30 11:55:53 +02:00
Magnus Norddahl
9f698c4fda - add SSE2 version of softpoly span drawer
(cherry picked from commit 9fb34fd8e6)
2018-05-26 21:58:24 +02:00
Magnus Norddahl
09ef233c41 - implement render styles for the softpoly span drawers
(cherry picked from commit 7f908ce75d)
2018-05-26 21:58:24 +02:00
alexey.lysiuk
c637d32113 - fixed compilation warning with MSVC 2015
src\polyrenderer\scene/poly_portal.cpp(142): warning C4800: 'line_t *': forcing value to bool 'true' or 'false' (performance warning)

(cherry picked from commit 7576068202)
2018-05-24 11:46:43 +02:00
Magnus Norddahl
77071dedcf - add two-sided culling support in software and poly
(cherry picked from commit 8098657cf4)
2018-05-24 10:30:12 +02:00
Magnus Norddahl
8de520e9e1 - avoid reusing the same mVBuf pointer for the different renderers as that causes too many problems when switching between them
- remove gl_ prefix for model functions that are no longer GL specific

(cherry picked from commit 31abe3df7e)

# Conflicts:
#	src/gl/models/gl_models.h
#	src/gl/scene/gl_scene.cpp
#	src/hwrenderer/scene/hw_sprites.cpp
#	src/hwrenderer/scene/hw_weapon.cpp
#	src/hwrenderer/textures/hw_precache.cpp
2018-05-24 10:25:05 +02:00
Magnus Norddahl
07b067c218 - GetTimeFloat is not renderer specific
(cherry picked from commit 49c9de350f)
2018-05-10 21:53:31 +02:00
Magnus Norddahl
216ecd7e07 - fix hud model clipping
(cherry picked from commit bfe6bffd33)
2018-05-10 21:53:07 +02:00
Christoph Oelckers
7b822807de - renamed the flag bits for sector_t::MoreFlags, so that they are easier to distinguish from sector_t::Flags.
- precalculate if a sector's floor and ceiling plane overlap. This avoids rechecking this for each single call of hw_FakeFlat.
- vertices must be marked dirty every time they change after map setup. That means that ChangePlaneTexZ must do this as well, because it cannot rely on interpolation taking care of it.
- Having a 'dirty' argument for SetPlaneTexZ's ZScript version makes no sense. If the value changes from the script side the vertices must always be marked to be recalculated.

(cherry picked from commit 9bdb0f2e49)
2018-05-10 19:49:02 +02:00
Christoph Oelckers
8a3a293bf8 - use sector_t::GetHeightSec consistently and optimize it.
This was all over the place, with half of it using the function and half doing incomplete checks on the underlying variables.
Also did some optimization on the IGNOREHEIGHTSEC flag: Putting it on the destination sector instead of the model sector makes the check even simpler and allows to precalculate the effect of 3D floors on the heightsec, which previously had to be run on every call and made the function too complex for inlining.

(cherry picked from commit f49c6cbde2)

# Conflicts:
#	src/gl/renderer/gl_renderer.cpp
#	src/hwrenderer/scene/hw_sprites.cpp
2018-05-10 19:20:11 +02:00
Magnus Norddahl
5a64f6eb18 - fix softpoly line portals
(cherry picked from commit 45625399dc)
2018-05-10 11:16:26 +02:00
Magnus Norddahl
2fdcfa9f55 - slightly improve sector portal handling in softpoly
(cherry picked from commit 2aee68d215)
2018-05-10 11:01:49 +02:00
Magnus Norddahl
83c0ec8b15 - fix softpoly mirrors
(cherry picked from commit 6e77cb4906)
2018-05-10 10:50:49 +02:00