Commit Graph

14623 Commits

Author SHA1 Message Date
Magnus Norddahl 190b673890 - Modify TriBlendMode enum to match the render styles 2018-05-26 23:06:23 +02:00
Magnus Norddahl 9fb34fd8e6 - add SSE2 version of softpoly span drawer 2018-05-26 16:15:14 +02:00
Magnus Norddahl 7f908ce75d - implement render styles for the softpoly span drawers 2018-05-26 14:27:54 +02:00
alexey.lysiuk 91f440378e - fixed minor issues with new line specials 2018-05-26 10:37:01 +03:00
Cacodemon345 b02736c705 Add missing line specials. 2018-05-26 10:36:16 +03:00
Magnus Norddahl 31f29bbe8a - force model light to be attenuated 2018-05-25 19:23:47 +02:00
alexey.lysiuk 1634b78280 - fixed typo in error message 2018-05-25 11:05:30 +03:00
alexey.lysiuk a936592cfd - fixed compilation warning reported by MSVC
src\r_videoscale.cpp(105): warning C4244: 'initializing': conversion from 'float' to 'int', possible loss of data
2018-05-25 10:59:48 +03:00
Raccoon 475d3f0829 Adds line specials 2018-05-24 21:46:32 +02:00
Magnus Norddahl cadc4f2a30 - add #include support to TEXTURES lump 2018-05-24 21:18:20 +02:00
Christoph Oelckers cce6c9a085 - fixed precision issue with dot product.
Apparently the shader math is not precise enough to ensure that two supposedly orthogonal vectors are truly orthogonal, resulting in a non-zero dot product
2018-05-24 20:31:44 +02:00
alexey.lysiuk 7576068202 - 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)
2018-05-24 11:58:51 +03:00
Magnus Norddahl 8098657cf4 - add two-sided culling support in software and poly 2018-05-24 01:39:36 +02:00
Magnus Norddahl 771931db9f - forgot to remove the remarked comment 2018-05-24 01:00:31 +02:00
Magnus Norddahl fb9cf33af6 - enable #include support in modeldef files 2018-05-24 00:59:45 +02:00
Christoph Oelckers 496e6e2e8f - fixed: The vertex height updater was using the index buffer offsets to access the vertex buffer.
I missed this part when repurposing the vboindex members to store the index buffer offsets.
However, since both indices are needed, they need another set of variables.
2018-05-24 00:01:56 +02:00
Christoph Oelckers 23909d109f fixed: Generating light data for single subsectors should not use the light list of the entire sector but only the one for the current subsector 2018-05-23 08:46:26 +02:00
Christoph Oelckers 044c8a2034 - removed gl_render_subsectors test CVAR and disabled vertex buffer generation for legacy mode
To reduce the performance impact, legacy mode will now always create flat vertex data on the fly instead of relying on the vertex buffer. This makes the CVAR mostly redundant as on anything more modern rendering per subsector will always be slower.
2018-05-23 08:43:52 +02:00
Christoph Oelckers b612e182b4 Merge branch 'indexbuffer'
# Conflicts:
#	src/gl/data/gl_vertexbuffer.h
#	src/gl/scene/gl_flats.cpp
#	src/hwrenderer/data/flatvertices.h
2018-05-22 22:10:21 +02:00
Christoph Oelckers df6a50872d Merge branch 'master' of https://github.com/coelckers/gzdoom 2018-05-22 21:36:52 +02:00
Christoph Oelckers 3f6789ecac - moved gl_bsp.cpp to its proper place. 2018-05-22 21:36:42 +02:00
Christoph Oelckers 8987aba4a4 - restored accidentally deleted line of code. 2018-05-22 21:08:00 +02:00
alexey.lysiuk 26ebb938c1 - fixed compilation with GCC/Clang
https://forum.zdoom.org/viewtopic.php?f=2&t=60657
2018-05-22 21:48:31 +03:00
Christoph Oelckers 2514753afb - make the vertex buffer accessible from the hwrenderer code. 2018-05-22 18:48:10 +02:00
Magnus Norddahl 91aec1689e - move modeldef parsing to its own function (ParseModelDefLump)
- rename gl_InitModels to InitModels
- add commented out support for #include in modeldefs (blocked by gene tech having broken #include statements in its modeldef files)
2018-05-22 01:28:57 +02:00
Christoph Oelckers 226e8f84da - most of gl_bsp.cpp moved to HWDrawInfo.
Only the vertex buffer update check needs to be done yet.
2018-05-22 00:27:39 +02:00
Christoph Oelckers df0b1e8dae - moved the clipper out of GLSceneDrawer and let it be handled by HWDrawInfo.
The precise way the clipper needs to be maintained may differ between APIs, so it is no longer owned by any render structure but instead HWDrawInfo only contains a reference.
For OpenGL there is still only one static clipper because without multithreaded BSP traversal there is no need for more.
2018-05-21 22:54:04 +02:00
Christoph Oelckers 5f87e81b6a - moved CurrentMapSections and in_area from GLSceneDrawer to HWDrawInfo.
Not only are they better placed in the common code, but they are also both per-viewpoint and not per-scene, so this is a far more suitable place and avoids saving and restoring them in the portal code.
2018-05-21 22:04:29 +02:00
Christoph Oelckers e6a447eb6f - removed more occurences of gl_drawinfo. 2018-05-21 20:28:12 +02:00
Magnus Norddahl 31abe3df7e - 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
2018-05-21 17:52:03 +02:00
Magnus Norddahl cc4a09a3d2 - fix model interpolation bug 2018-05-21 14:23:30 +02:00
Christoph Oelckers 31263eeac2 - removed gl_drawinfo-> from FDrawInfo member functions and pass it to some other functions as a parameter.
This really shouldn't be handled as a global variable. The mere fact that several member functions used it incorrectly is ample proof of that.
2018-05-21 11:36:07 +02:00
alexey.lysiuk 2cdc9f9dda - fixed applying of alpha to weapon sprites
https://forum.zdoom.org/viewtopic.php?t=60638
https://forum.zdoom.org/viewtopic.php?t=60642
2018-05-21 10:53:02 +03:00
alexey.lysiuk ad31da20e5 - added new linedef properties to UDMF spec
https://forum.zdoom.org/viewtopic.php?t=59808
2018-05-20 14:48:44 +03:00
alexey.lysiuk 526711f5d8 - replaced tabs with spaces in UDMF spec 2018-05-20 13:08:29 +03:00
Christoph Oelckers 2d4b8549c6 - per-sector plane rendering needs to be disabled when processing a line portal with hardware that has no working clip plane support.
In this case there are no means to discard the parts of the rendered sectors that lie behind the portal so it should only render the parts that are flagged as visible.
2018-05-20 08:56:29 +02:00
Christoph Oelckers 3069b53804 - disable shader storage blocks if none get reported for vertex shaders. 2018-05-20 00:16:06 +02:00
Christoph Oelckers 1266339c0f - fixed shader compilation. 2018-05-19 21:17:58 +02:00
Christoph Oelckers 3dc6ddbcc3 - check light direction in the shader.
There are situations where lights on the wrong side of a linedef may be passed and those need to be skipped in the shader code.
2018-05-19 19:20:45 +02:00
Christoph Oelckers 5cffa8873a - added a CVAR to disable per-plane rendering.
This will require some comparisons on older hardware. On my Geforce 1060 rendering the full plane with one draw call is clearly faster in all cases I tested.
2018-05-19 19:19:48 +02:00
Christoph Oelckers cc65490062 - added CVAR to disable WGL_EXT_swap_control_tear.
At least on faster NVidia hardware, setting this to false and gl_finishbeforeswap to true gives a better experience because it reduces screen tearing - but the same setting will reduce frame rate quite dramatically on Intel and can cause bad stalls on some older GPUs when rendering camera textures.
2018-05-19 19:18:38 +02:00
alexey.lysiuk c6f7d92c76 - added forced automap style to linedef, UDMF only
https://forum.zdoom.org/viewtopic.php?t=59808
2018-05-19 17:09:26 +02:00
RockstarRaccoon 90cb0b3215 - added 'revealed on automap' linedef flag, UDMF only
https://forum.zdoom.org/viewtopic.php?t=59808
2018-05-19 17:09:26 +02:00
Marisa Kirisame 0c4a08460f Cleaned UE1 math by using FVector classes.
Reversed winding order on vertex buffer creation as UE1 uses CCW.
2018-05-19 17:09:06 +02:00
Christoph Oelckers f54cf561ab - missed this. 2018-05-19 15:40:33 +02:00
Christoph Oelckers 3e204080ae - render sector planes in one draw call.
On a fast and modern graphics card this is a lot faster than doing it per subsector but it may not be without drawbacks on older hardware so it will require some testing on older hardware.
For me Frozen Time's view over the bridge went from 46 fps to 51 fps with this change, the time saved was roughly 2 ms.
2018-05-19 15:20:46 +02:00
Christoph Oelckers 352279a52f - removed the non-indexed flat setup.
This won't be needed any longer.
2018-05-19 14:44:16 +02:00
Christoph Oelckers 2125f8b9d1 - use triangles instead of triangle fans to render flats. 2018-05-19 14:42:25 +02:00
Christoph Oelckers fd3681dae2 - use an indexed vertex buffer to render the flats.
Right now this has no advantage but it allows optimizing the data, e.g. rendering an entire sector in one go instead of per subsector.
2018-05-19 13:33:28 +02:00
alexey.lysiuk 9257c9cc0c - fixed compilation warnings reported by GCC/Clang
src/r_data/models/models.cpp:418:33: warning: comparison of integers of different signs: 'long' and 'unsigned long' [-Wsign-compare]
src/r_data/models/models.cpp:427:38: warning: comparison of integers of different signs: 'long' and 'unsigned long' [-Wsign-compare]
src/r_data/models/models_ue1.cpp:49:37: warning: comparison of integers of different signs: 'long' and 'unsigned long' [-Wsign-compare]
2018-05-19 13:28:53 +03:00