Commit Graph

126 Commits

Author SHA1 Message Date
Christoph Oelckers 04e614daec - removed some fixed point functions that are no longer needed.
- fixed: Visplane checks should only compare the plane flags that are relevant for rendering and mask out the rest.
- floatified FTransform and made the visplane checks a bit less verbose by moving the comparison as an operator into FTransform.

Note that this operator needs forceinline on Visual Studio so that it won't get called as a function.
2016-04-23 12:42:07 +02:00
Christoph Oelckers 35a6994d0a - remove the 'F' prefix from the floating point access function to the sidedef texture info, now that the fixed point versions are gone. 2016-04-23 10:55:55 +02:00
Christoph Oelckers 4d4f31fd83 - floatified sidedef texture info and fixed two bugs involving this data. 2016-04-23 09:41:59 +02:00
Randy Heit f1b3f59bcc Renderer floatification: Use floating point for wall scale and yrepeat 2016-04-22 23:12:53 -05:00
Randy Heit 1f97488945 Renderer floatification: Use floating point for decals 2016-04-22 23:12:53 -05:00
Randy Heit b2b3e50c5c Renderer floatification: Use floating point for geometry Zs 2016-04-22 23:12:53 -05:00
Randy Heit 3ef5a678d5 Renderer floatification: Use floating point for texturemids and Y scales 2016-04-22 23:12:53 -05:00
Randy Heit ec8d038c99 Renderer floatification: Use floats for lighting values 2016-04-22 23:10:34 -05:00
Randy Heit 4416d88eb2 Renderer floatification: Use floating point for visibility values 2016-04-22 23:10:02 -05:00
Randy Heit ded3f92452 Commence renderer floatification 2016-04-22 23:09:13 -05:00
Edoardo Prezioso 28ac65b25b - Fixed GCC and Clang compilation errors. 2016-04-02 23:01:32 +02:00
Christoph Oelckers 9a07f81269 - renamed all ZatPoint variants that return a fixed point value to ZatPointFixed, to avoid accidental mixup with the floating point variants. 2016-04-02 20:45:32 +02:00
Christoph Oelckers 66929cbaff - floatified p_trace, p_slopes and p_udmf.cpp.
- major cleanup of unused code.
2016-03-30 16:30:22 +02:00
Christoph Oelckers 77f2530236 - floatified the sector plane movers and removed some of the ZatPoint conversion cruft. 2016-03-30 09:41:46 +02:00
Christoph Oelckers 25f5e8449a - replaced all direct access to sector plane coefficients with wrapper functions. 2016-03-29 12:40:41 +02:00
Christoph Oelckers c7ae4688a3 - replaced all direct access to vertex coordinates with wrapper functions.
So that code replacement can be done piece by piece and not all at once.
2016-03-29 10:07:06 +02:00
Christoph Oelckers 0c39bdd04c - floatified texture scale values. 2016-03-26 13:37:44 +01:00
Christoph Oelckers 301f5abadc - floatified the decal code. 2016-03-22 22:07:38 +01:00
Christoph Oelckers 4e60ea0252 - made AActor::alpha a floating point value
- replaced some uses of FRACUNIT with OPAQUE when it was about translucency.
- simplified some overly complicated translucency multiplications in the SBARINFO code.
2016-03-21 12:18:46 +01:00
Randy Heit 48b6b6e057 Clip portals to viewheight, not screen height
- Aside, but is this even neccessary? The arrays being copied from should
  already be clipped properly.
2016-03-08 19:53:37 -06:00
Randy Heit 55142078d8 Normalize line endings 2016-03-01 09:47:10 -06:00
Christoph Oelckers 7242a0ef94 - fixed: Rendering 2-sided walls with 3D floor light effects had the 'is3dfloor' flag of GetLightLevel inverted. 2016-02-29 10:26:07 +01:00
Christoph Oelckers 02d7572343 - some header dependency cleanup so that it is no longer needed to include portal.h to get the inline functions. Portal.h has been reduced of most dependencies now so that including it is cheap and can be done in other headers.
- some consolidation in p_map.cpp. PIT_CheckLine and PIT_FindFloorCeiling had quite a bit of redundancy which has been merged.
- Ĩontinued work on FMultiBlockLinesIterator. It's still not completely finished.
2016-02-19 14:08:41 +01:00
Randy Heit 3ad2e4191d Remove fudging from the end of (O)WallMost
- This might have been added in an effort to fix problems caused by mixing inclusive
  and exclusive right edges. It might not be needed anymore. Let's find out...
2016-02-05 16:08:20 -06:00
Christoph Oelckers a85a8c1465 - changed mirror handling so that it works without attaching a portal to the mirror line and removed line_t::portal_mirror member.
- did some cleanup on the portal interface on linedefs: All checks should go through isLinePortal (gameplay related) and isVisualPortal (renderer related) which then can decide on the actual data what to return.
- removed portal_passive because it won't survive the upcoming refactoring.
- removed all direct access to portal members of line_t.
- always use the precise (and fast) version of P_PointOnLineSide inside the renderer.
2016-02-05 16:14:45 +01:00
Christoph Oelckers 00895c245e - mpved all software renderer specific code for the portals into the render sources. 2016-02-05 15:39:06 +01:00
Braden Obrzut ba54d73e07 Merge branch 'portals2_visual' 2016-02-05 00:10:46 -05:00
Christoph Oelckers 0db679c90d - fixed clang compile error. 2016-02-02 10:53:56 +01:00
Randy Heit 6b6c1af0dc Add support for Y flipped non-vertically tiling masked midtextures 2016-02-01 21:07:09 -06:00
Randy Heit 03f0e1dc5c Remove something that looks like 3D floor development garbage 2016-02-01 21:07:08 -06:00
Randy Heit 1d0a3d19c8 Fix a part in maskwallscan that was missed for right-edge exclusivity 2016-01-31 20:45:37 -06:00
Randy Heit 240ca2af4c Use consistant right-edge rules in the renderer.
- The original Doom renderer was inclusive for all right edges. This was
  fine for the wonky projection it did. This was not fine for a standard
  perspective divide, so I had to change walls to be right-edge exclusive
  when I changed the projection. I only touched what was needed. Until
  now. The right edge is always exclusive now, which should prevent any
  more bugs related to mixing the two clusivities incorrectly.
2016-01-30 21:27:35 -06:00
Christoph Oelckers a41dc24086 - fixed: 3D lights should override the sidedef's regular light completely, that includes relative light added by UDMF's 'light' property.
- Renamed the 'noabsolute' parameter in side_t::GetLightLevel to 'is3dlight', what it actually is, to avoid the confusion that caused the abovementioned error.
- fixed: The Down2Up render path for sides of 3D floors had the 'is3dlight' check inverted.
2016-01-29 14:55:31 +01:00
Braden Obrzut f3f77a1ba0 Merge branch 'master' into portals2_visual 2016-01-18 09:45:42 -05:00
Eevee (Alex Munroe) 15b97c1409 Fix scaling of 3D floor wall textures.
The scale factors are now taken from the same part of the sidedef that
provides the texture.
2015-06-06 18:26:13 -07:00
ZZYZX 29880026a6 Fixed sprite clipping with drawsegs (removed unnecessary portal check) 2015-06-07 04:19:21 +03:00
ZZYZX cd39c4b8a6 Merged mirrors with portals; Render part of mirrors done, render part of portals needs further testing 2015-06-07 04:19:17 +03:00
Eevee (Alex Munroe) 8fa9aa2627 Use the correct sidedef's middle scaling when drawing 3D floors.
This wants `curline->sidedef`, which is the 3D sidedef currently being
drawn.  `sidedef` appears to be the last regular sidedef that happened
to be drawn?  The perils of globals.
2015-06-06 18:17:50 -07:00
Randy Heit bf0856aef5 Remove DepthScale and DepthOrg from FWallTmapVals 2014-08-07 22:58:11 -05:00
Randy Heit e1ee80661e Make FWallCoords' members lowercase
because they're kind of a pain to type when all uppercase.
- Also, make its sx1 and sx2 members shorts, so it takes less space, since
  it's getting crammed into a vissprite now.
2014-08-07 17:12:04 -05:00
Randy Heit d0043bed78 Q&D port of decal code to draw generic wall sprites
- This still doesn't use all the sprite properties correctly. It also
  looks like they're going to need different code to build the clipping
  arrays. But at least wall sprites are drawn at the proper angle now!
2014-08-02 22:35:57 -05:00
Randy Heit a600a816c3 Consolidate some common code for texture mapping setup
- R_AddLine() and R_RenderDecal() had nearly identical code for setting up
  texture mapping. These have now been spun off into methods of
  FWallCoords and FWallTmapVals.
2014-07-31 21:02:22 -05:00
Randy Heit b0b9c57e85 Pass x1 and x2 to Prep(L)Wall as params 2014-07-31 20:32:21 -05:00
Randy Heit fc63e9db3c Pass WallC as a parameter to (O)WallMost instead of referencing it globally 2014-07-31 20:23:04 -05:00
Randy Heit bc450808b2 Consolidate wall texturing vars into two structs
- All transformation and clipping values go into FWallCoords.
- All texture mapping values go into FWallTMapVals.
2014-07-31 20:17:23 -05:00
Christoph Oelckers c7a46492eb - fixed bad index variable in R_RenderFakeWallRange. 2013-08-11 12:41:14 +02:00
Randy Heit 63704a8b69 - Fixed: r4225 accidentally removed the sky texture check for markceiling disabling.
SVN r4247 (trunk)
2013-05-04 19:08:17 +00:00
Randy Heit 6921a3edc2 - Fixed: r4220 broke 3D floor rendering, because 3D floors have the floor and ceiling orientations
reversed compared to normal conventions.

SVN r4225 (trunk)
2013-04-23 03:51:51 +00:00
Randy Heit a50e670c0c - Use tests less prone to overflow on very steep slopes when detecting which side of a plane
the camera is on. Mostly, this means testing the distance of the camera to the plane rather
  than computing the plane's Z at the camera and comparing that with the camera's Z.

SVN r4220 (trunk)
2013-04-17 01:32:40 +00:00
Randy Heit 94be9df246 - Changed the "notrelevant" checks in R_RenderMaskedSegRange() to not include equality in their
comparison operators. Fixes one map (http://forum.zdoom.org/viewtopic.php?f=2&t=34082); might
  break others. Maybe.

SVN r4133 (trunk)
2013-02-14 03:24:47 +00:00