Commit graph

560 commits

Author SHA1 Message Date
Christoph Oelckers
9e109995cd - moved model renderer to hwrenderer after removing the remaining traces of OpenGL. 2018-10-28 00:40:41 +02:00
Christoph Oelckers
51acf3053c - fixed model vertex buffer setup.
Setting the buffer and its attribute bindings must be one step, not twp. With Vulkan this is a single API call.
This removes the now obsolete SetVertexBuffer method from the model renderer's interface.
2018-10-27 23:33:22 +02:00
Magnus Norddahl
48c83d36b5 - add post processing support to the software renderer and softpoly 2018-08-04 14:58:55 +02:00
Magnus Norddahl
990f02d7c5 - add support for specifying the exact thread count to r_multithreaded and r_scene_multithreaded 2018-07-28 04:57:23 +02:00
Christoph Oelckers
4a7b1aada7 Merge remote-tracking branch 'remotes/origin/modern'
# Conflicts:
#	wadsrc/static/shaders/glsl/main.fp
2018-07-20 10:19:07 +02:00
Magnus Norddahl
a841602d70 - change the software renderer to render to a DSimpleCanvas like the old D3D9 target did. Then use the drawer threads to memcpy the result to the PBO 2018-07-20 05:48:15 +02:00
Magnus Norddahl
a0a7fd53e8 - change software renderer back to writing directly into the pixel buffer object, but change the creation and mapping so that hopefully all vendors put it in system memory 2018-07-18 17:47:09 +02:00
Magnus Norddahl
e93d1e3ebc - change software renderer upload code to use GL_STREAM_DRAW and a memcpy from system memory 2018-07-18 06:46:30 +02:00
Christoph Oelckers
8ac864b007 Merge branch 'master' into modern 2018-06-26 09:28:23 +02:00
Christoph Oelckers
e402babfc0 Fixed: Software rendered models checked the wrong CVAR for enabled dynamic lights. 2018-06-26 08:23:07 +02:00
Christoph Oelckers
1967165633 - move view and projection matrices to DrawInfo. 2018-06-21 21:02:14 +02:00
Christoph Oelckers
753cd0aede - made R_SetViewAngle a member of r_viewpoint 2018-06-19 17:44:11 +02:00
Christoph Oelckers
46d73e7b4b Pass ticFrac to the model renderer as a parameter
This also removes the rather pointless gl_RenderModel functions because with their two lines of content they can just be placed inline.
2018-06-19 09:18:27 +02:00
Magnus Norddahl
01bda6348e - change swrender mapping to use two buffers/textures and glTexSubImage2D for uploads 2018-06-19 00:09:39 +02:00
Magnus Norddahl
bce49ad7c8 - fix Software models don't display over nonexistent sprites 2018-06-17 14:56:34 +02:00
Christoph Oelckers
5a20de829b fixed compiler warning 2018-06-12 10:59:17 +02:00
Magnus Norddahl
a91147a3a5 - move DrawArray and DrawElements to PolyTriangleDrawer 2018-06-10 15:58:01 +02:00
Magnus Norddahl
9ba26a5ece - add support for using FModelVertex as input to the softpoly vertex shader 2018-06-10 15:29:31 +02:00
Magnus Norddahl
c9fd52340e - add GroupMemoryBarrierCommand 2018-06-10 13:35:15 +02:00
Magnus Norddahl
efa434d47b - remove unused VectoredTryCatch 2018-06-10 13:15:31 +02:00
Magnus Norddahl
628f6c32d9 - remove unused DrawerCommand::DebugInfo 2018-06-10 12:54:37 +02:00
Magnus Norddahl
de67393b4e - use the worker threads to clear the stencil buffer 2018-06-10 12:42:19 +02:00
Magnus Norddahl
85f5f897d7 - enable model rendering in the software renderer 2018-06-09 12:29:33 +02:00
Magnus Norddahl
5464d2a577 - add dynamic lights to softpoly and software renderer models 2018-06-05 22:43:11 +02:00
Magnus Norddahl
f5386a706f - fix software renderer dynamic lights not working properly in mirrors 2018-06-05 20:09:02 +02:00
Magnus Norddahl
b74a9965b8 - draw models in mirrors and portals at the right location in the software renderer 2018-06-05 19:36:57 +02:00
Marisa Kirisame
f74e74ac4b Mirroring should be flipped on HUD models since the view to world space transform already inverts one axis 2018-06-03 14:20:42 +02:00
Marisa Kirisame
dea1d0259d Swap front face culling for GL model drawer (CCW should be the default).
Added mirroring handling to software models.
2018-06-03 07:26:55 +02:00
Magnus Norddahl
a186677092 - removed the 8x8 block drawing code from softpoly 2018-06-03 01:44:56 +02:00
Christoph Oelckers
94d1a73ae8 - pass mirroring info to model drawers.
Actual evaluation only implemented in OpenGL. Not tested yet because the bug report had no testable example.
2018-06-02 13:07:47 +02:00
Magnus Norddahl
4e6226fc2d - replace softpoly block drawers with span drawers and make them use blending rules directly from render styles
- add dynlights to softpoly pal mode
2018-05-29 23:32:57 +02:00
Magnus Norddahl
190b673890 - Modify TriBlendMode enum to match the render styles 2018-05-26 23:06:23 +02:00
Magnus Norddahl
8098657cf4 - add two-sided culling support in software and poly 2018-05-24 01:39:36 +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
643828f5fa - move 3d floor code into functions 2018-05-11 17:00:12 +02:00
Magnus Norddahl
e4d740e586 - more pointless complexity removal 2018-05-11 14:27:09 +02:00
Magnus Norddahl
acf9f55849 - remove pointless code 2018-05-11 13:29:24 +02:00
Magnus Norddahl
b0cc472e85 - fixed sloped drawer crash 2018-05-11 12:28:10 +02:00
Magnus Norddahl
459f748c4e - added r_debug_draw that shows how the software renderer composes its scene 2018-05-08 22:22:15 +02:00
Magnus Norddahl
b27655db70 - 3d floor clipping support for models 2018-05-08 01:36:18 +02:00
Magnus Norddahl
49c9de350f - GetTimeFloat is not renderer specific 2018-05-07 00:40:12 +02:00
Magnus Norddahl
bfe6bffd33 - fix hud model clipping 2018-05-07 00:33:16 +02:00
Magnus Norddahl
4642861501 - fixed missing depth for models 2018-05-06 03:23:07 +02:00
Magnus Norddahl
1d929dd79b - fix translucent walls when r_models is enabled 2018-05-06 02:54:03 +02:00
Christoph Oelckers
74b624002c - moved the software renderer's drawer to the swrenderer directory. 2018-05-05 11:44:42 +02:00
Christoph Oelckers
9bdb0f2e49 - 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.
2018-05-01 11:29:29 +02:00
Christoph Oelckers
f49c6cbde2 - 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.
2018-05-01 09:47:09 +02:00
Magnus Norddahl
d10aa10889 - fix missing psprite when camera textures are in view 2018-04-15 17:16:13 +02:00
Magnus Norddahl
25784c2e57 - always store 255 in alpha channel for opaque things as the alpha channel is no longer ignored by the framebuffer backend (software drawer) 2018-04-15 14:58:19 +02:00
Magnus Norddahl
48b0fbcf4b - Remove r_swcanvas.cpp again. It got accidentally re-added somehow by the swmodels branch 2018-04-14 22:30:02 +02:00