Magnus Norddahl
2e5b7a7d8b
- softpoly: fix sprites still lit when dynlights off
2018-07-01 20:53:50 +02:00
Magnus Norddahl
6d6ee1281e
- softpoly: fix normal walls not getting rendered for subsectors with poly objects in them
2018-07-01 14:41:35 +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
Magnus Norddahl
f8272287d2
- make softpoly use the r_dynlights cvar
2018-06-26 02:19:47 +02:00
Christoph Oelckers
d2309af3d5
Merge remote-tracking branch 'remotes/origin/master' into modern
...
# Conflicts:
# src/d_main.cpp
# src/hwrenderer/scene/hw_weapon.cpp
2018-06-19 19:40:52 +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
Christoph Oelckers
34ee04f2ce
- moved the matrix math for the sky dome into backend independent code.
2018-06-18 18:18:28 +02:00
Magnus Norddahl
bce49ad7c8
- fix Software models don't display over nonexistent sprites
2018-06-17 14:56:34 +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
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
61f379c88f
- fix null pointer crash in softpoly
2018-06-05 22:42:21 +02:00
Magnus Norddahl
674b6ee85c
- avoid using global variables in the inner fuzz drawer loop
2018-06-05 15:43:03 +02:00
Magnus Norddahl
51fd715404
- fix dynlight color not being applied on sprites
2018-06-05 15:32:27 +02:00
Magnus Norddahl
9cd751ae7a
- fix softpoly colored fog bug in the new drawers
2018-06-05 15:16:04 +02:00
Magnus Norddahl
e3c78ab838
- use a light array to simplify inner light math
2018-06-04 00:36:14 +02:00
Magnus Norddahl
97f4cc1951
- use affine dynlights in softpoly
2018-06-03 22:24:44 +02:00
Magnus Norddahl
d425fb2d4a
- replace the old rect drawers with new ones based on render styles
2018-06-03 18:36:37 +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
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
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
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
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
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
Christoph Oelckers
c5641a0e72
- GLFlat split into API-dependent and -independent data.
...
No resorting of the files yet.
2018-04-28 12:34:09 +02:00
Magnus Norddahl
45625399dc
- fix softpoly line portals
2018-04-23 23:09:11 +02:00
Magnus Norddahl
2aee68d215
- slightly improve sector portal handling in softpoly
2018-04-23 01:03:37 +02:00
Magnus Norddahl
6e77cb4906
- fix softpoly mirrors
2018-04-22 23:29:39 +02:00
Magnus Norddahl
16a8d71caf
- Simplify the portal code in softpoly somewhat
2018-04-21 15:19:28 +02:00
Magnus Norddahl
4a3f7e8dd5
- fix missing fuzz initialization in softpoly
2018-04-16 01:15:55 +02:00
Magnus Norddahl
f5c2ffabc9
- fix softpoly portal crash and blinking translucent objects
2018-04-16 01:08:29 +02:00
Magnus Norddahl
21c2d38342
- fix softpoly canvas drawing not restoring all globals properly
...
- add null pointer check on camera
2018-04-15 16:05:29 +02:00
Magnus Norddahl
11bb626ab6
- always store 255 in alpha channel for opaque things as the alpha channel is no longer ignored by the framebuffer backend (softpoly drawer)
2018-04-15 14:47:53 +02:00
Magnus Norddahl
61032cb6ae
- fix softpoly portal crash
2018-04-15 14:40:52 +02:00
Magnus Norddahl
ee443b6fb6
- disable software models
2018-04-14 22:22:40 +02:00
Magnus Norddahl
915f8862a7
- Remove code that seemingly doesn't do anything and really shouldn't be needed
2018-04-13 21:56:34 +02:00
Magnus Norddahl
7e544c66fe
Merge remote-tracking branch 'gzdoom/master' into swmodels
2018-04-13 21:35:21 +02:00
Christoph Oelckers
3dc670a0cc
- missed this.
2018-04-08 21:02:15 +02:00
Christoph Oelckers
e6ce429ca5
- fixed alpha for hardware rendered weapon sprites in the software renderer.
2018-04-08 20:40:29 +02:00
Magnus Norddahl
c4768441b4
- Fix playersprite offset being wrong in softpoly
...
- Remove DFrameBuffer::GetCanvas as it always returned null
2018-04-08 15:49:06 +02:00
Magnus Norddahl
4a730f6dd5
- Fix softpoly ignores status bar displacement
2018-04-08 14:28:48 +02:00
Christoph Oelckers
df4f435952
- merged vid_renderer, swtruecolor and r_polyrender into one CVAR to reduce menu clutter.
...
- with renderers freely switchable, some shortcuts in the 3D floor code had to be removed, because now the hardware renderer can get FF_THISINSIDE-flagged 3D floors.
- changed handling of attenuated lights in the legacy renderer to be adjusted when being rendered instead of when being spawned. For the software renderer the light needs to retain its original values.
2018-04-07 23:30:28 +02:00
Magnus Norddahl
c15328de2f
- Remove include that shouldn't be there (also caused macOS builds to fail)
2018-04-07 19:35:32 +02:00
Magnus Norddahl
2d51fa5b43
- Clean up PolyTriangleDrawer API so that it can better support both softpoly and the swrenderer
...
- Slightly improve how softpoly processes portals
- Pass the vertex transform matrix via a command rather than being part of the drawer args
- Improve zbuffer drawers in the software renderer
- Misc model rendering fixes
2018-04-07 15:48:48 +02:00
Christoph Oelckers
b34d7f9e08
- added a software scene drawer to the GL renderer.
...
It still looks like shit and only works on the modern render path but at least the basics are working.
2018-04-07 10:20:59 +02:00
Christoph Oelckers
65e7b6dfaa
- moved the code in gl_data.cpp to better fitting places
...
* the MAPINFO options now get handled in g_mapinfo.cpp and g_level.cpp, just like the rest of them as members of level_info_t and FLevelLocals.
* RecalcVertexHeights has been made a member of vertex_t and been moved to p_sectors.cpp.
* the dumpgeometry CCMD has been moved to p_setup.cpp
2018-04-01 18:45:27 +02:00
Christoph Oelckers
6d6196388e
- made SPROFS a more usable feature.
...
This was originally invented to fix the sprite offsets for the hardware renderer.
Changed it so that it doesn't override the original offsets but acts as a second set.
A new CVAR has been added to allow controlling the behavior per renderer.
2018-03-31 10:37:46 +02:00
Christoph Oelckers
1e5fbc1423
Merge remote-tracking branch 'remotes/origin/master' into 2D_Refactor
...
# Conflicts:
# src/posix/cocoa/i_video.mm
2018-03-30 22:06:17 +02:00
alexey.lysiuk
709bbe3db0
Fixed crash on accessing player sprite's state in software renderer
...
https://forum.zdoom.org/viewtopic.php?t=60034
2018-03-30 16:40:31 +03:00
Christoph Oelckers
a40e085a46
- 2D drawer implementation complete for hardware renderer.
...
This also replaces DTA_ColormapStyle with proper implementations of its components. As implemented it was a very awkward mixture of various effects that already existed in a separate form. As a result of its implementation it required additional but completely redundant shader support which could be removed now. As a side effect of this change a new DTA_Desaturate option was added.
2018-03-29 16:21:21 +02:00
Christoph Oelckers
2ed744963c
- Changed frame buffer locking mechanism so that the only place where a lock is needed is when the software renderer wants to access the render buffer, which is precisely for the duration of the RenderView function.
...
No more locking insanity! :)
There are no locking counters or other saveguards here that would complicate the implementation because there's precisely two places where this buffer must be locked - the RenderView functions of the regular and poly SW renderer which cannot be called recursively.
2018-03-27 20:02:44 +02:00
Christoph Oelckers
0c3635e22c
- removed vid_hw2d CVar.
2018-03-27 17:58:25 +02:00
Christoph Oelckers
62f073ef60
- removed Accel2D variable and a little bit of locking cruft.
2018-03-27 17:13:10 +02:00
Christoph Oelckers
c06ad5c59c
- separated DFrameBuffer from DCanvas.
...
This was a bad idea from the start and really only made sense with DirectDraw.
These days a FrameBuffer represents an abstract hardware canvas that shares nothing with a software canvas so having these classes linked together makes things needlessly complicated.
The software render buffer is now a canvas object owned by the FrameBuffer.
Note that this commit deactivates a few things in the software renderer, but from the looks of it none of those will be needed anymore if we set OpenGL 2 as minimum target.
2018-03-27 14:14:46 +02:00
Christoph Oelckers
bb9283a9af
- work on separating DFrameBuffer from DCanvas.
...
2D works in D3D backend, but 3D crashes because not all pointers have been rerouted yet.
2018-03-27 13:50:31 +02:00
Christoph Oelckers
ba799aebbd
- moved locking logic from DCanvas to DFrameBuffer.
...
The software canvases used for rendering camera textures and save pictures in the software renderer do not need this.
2018-03-27 11:12:13 +02:00
Christoph Oelckers
e89a598b31
- renamed FTexture's UseType flags and gave them a dedicated type.
...
This was done mainly to reduce the amount of occurences of the word FTexture but it immediately helped detect two small and mostly harmless bugs that were found due to the stricter type checks.
2018-03-25 20:26:16 +02:00
Christoph Oelckers
f4d9ad1123
- extended FTexture::GetPixels and FTexture::GetColumn by a RenderStyle parameter.
...
Now it is no longer necessary to provide specially set up textures for rendering shaded decals, they can use any PNG texture now that contains a proper red channel.
Handling of the alPh chunk has been removed as a result as it in no longer needed.
2018-03-18 21:33:44 +01:00
Magnus Norddahl
a2b9a70835
- Fix crash when reloading a map
2018-03-17 00:09:43 +01:00
Rachael Alexanderson
07f168a58b
- additional check for tween-tic particle rendering, prevents jitter with timefreeze powerup
2018-02-24 16:04:20 -05:00
Magnus Norddahl
b8415199c9
Fix culling bug
2017-12-28 11:43:52 -05:00
Rachael Alexanderson
a441cea350
- interpolate particles
2017-12-28 11:36:36 -05:00
Magnus Norddahl
52be9895b7
- Disable softpoly models
2017-12-03 00:23:28 +01:00
Magnus Norddahl
f9fb4a0a17
- Cull back facing triangles for the span drawers
2017-11-29 00:12:15 +01:00
Magnus Norddahl
fae514923a
- Move depth testing out of span drawers
2017-11-28 23:08:28 +01:00
Magnus Norddahl
01fd404133
- Fix palette drawer crash
2017-11-28 22:03:51 +01:00
Magnus Norddahl
e0defb060d
- Add a slightly faster truecolor model drawer
2017-11-28 21:38:02 +01:00
Magnus Norddahl
d43ac8b9ae
- Add model rendering to the software renderer
2017-11-27 23:47:26 +01:00
Christoph Oelckers
836970f012
- moved the matrix code out of 'gl' because the model code also needs it.
2017-11-25 13:51:09 +01:00
Magnus Norddahl
679f42db78
- Remove model GL dependencies except for the matrix classes
2017-11-25 13:00:44 +01:00
Magnus Norddahl
a120a4657e
- Apply viewpoint roll
2017-11-24 22:03:46 +01:00
Rachael Alexanderson
1f00810f40
- re-doubled the model rotation code
2017-11-23 21:27:16 -05:00
Magnus Norddahl
00d7dd0c64
- Implement model rendering in softpoly
2017-11-24 00:39:10 +01:00
Magnus Norddahl
e7e9d1a942
- Fixed bug introduced by removing a little bit too much from the rect drawers
2017-11-22 19:02:25 +01:00
Magnus Norddahl
9052ee6bc8
- Added scaled fuzz to softpoly pal drawer
2017-11-22 18:54:49 +01:00
Magnus Norddahl
f04fca75f7
- Add scaled fuzz to softpoly sse2 drawer
2017-11-22 18:46:45 +01:00
Magnus Norddahl
4e4f94db2f
- Implement newer scaled fuzz in softpoly's truecolor non-sse drawer
2017-11-22 06:32:55 +01:00
Magnus Norddahl
5532266b14
- Fix softpoly sprite positioning bug
2017-11-20 22:43:44 +01:00
Magnus Norddahl
e71e4b6dc8
- Improved transfer heights support in softpoly
2017-09-30 23:58:11 +02:00
Magnus Norddahl
0ee021a972
- Improve transfer heights support in softpoly
2017-09-29 05:23:17 +02:00
Magnus Norddahl
d7164ba4e1
- Don't apply dynamic light to fullbright sprites
2017-09-23 16:22:22 +02:00
Magnus Norddahl
5ffd26abeb
- Add dynamic lights to the non-sse true color drawer
2017-09-23 15:51:40 +02:00
Magnus Norddahl
f3ba92f03c
- Add dynamic light to sprites
2017-09-23 14:14:59 +02:00
Magnus Norddahl
789214200c
- Attenuated lights support
2017-09-23 02:27:39 +02:00
Magnus Norddahl
ca2ef805b8
- Implement the affine part of the dynamic lights in the softpoly TC SSE2 drawer
2017-09-22 00:57:51 +02:00
Magnus Norddahl
94a33229cc
- Remove unused function argument
2017-09-22 00:56:14 +02:00