Magnus Norddahl
660a45a0e0
Add normals to decals
2016-10-13 18:04:00 +02:00
Major Cooke
41bf9def80
GZDoom compatibility for PSPF_FLIP.
2016-10-11 20:18:06 -05:00
alexey.lysiuk
7510ad1635
Fixed missing fake floors in deferred buffer mode
...
wow.wad is now genuine and authentic...
2016-10-11 14:56:22 +03:00
Magnus Norddahl
00e72028ef
Add another gbuffer with normal data and make ssao pass use it
2016-10-05 07:57:27 +02:00
Major Cooke
0e9f808c8a
Fixed: FLATSPRITES were drawn backwards.
2016-10-04 10:05:57 -05:00
Magnus Norddahl
ecb57d6cd9
Merge remote-tracking branch 'gzdoom/master' into ssao
...
# Conflicts:
# src/gl/renderer/gl_renderer.cpp
# src/gl/scene/gl_scene.cpp
# src/gl/shaders/gl_shader.cpp
# wadsrc/static/language.enu
# wadsrc/static/menudef.zz
2016-10-04 00:01:03 +02:00
Christoph Oelckers
4eb5f10b02
- use normals to have proper light attenuation. So far only implemented for walls and flats. Models are planned but need some thinking about how to efficiently collect all required lights for an object.
2016-10-03 16:09:32 +02:00
alexey.lysiuk
c68aa2b241
Added FXAA post-processing
...
Implementation of Fast Approximate Anti-Aliasing is based on nVidia sample:
https://github.com/NVIDIAGameWorks/GraphicsSamples/tree/master/samples/es3-kepler/FXAA
2016-10-03 00:15:45 +02:00
Christoph Oelckers
750c194959
- changed order of SwapBuffers and glFinish call. The new order with glFinish coming last is recommended by OpenGL and it fixes a stalling problem with portals and camera textures visible at the same time.
...
- check and use WGL_EXT_swap_control_tear extension. The above change makes the system always wait for a full vsync with a wglSwapInterval of 1, so it now uses the official extension that enables adaptive vsync. Hopefully this also works on the cards where the old setup did not.
2016-09-26 01:38:25 +02:00
Magnus Norddahl
979e70ca8f
Add gl_ssao_portals for controlling how many portals gets SSAO
2016-09-25 00:22:38 +02:00
Magnus Norddahl
3f11c0562c
Add ssao quality setting
2016-09-25 00:22:38 +02:00
Magnus Norddahl
0397fe185f
Don't do ambient occlusion when rendering to texture
2016-09-25 00:22:32 +02:00
Magnus Norddahl
d774136282
Added SceneData texture as the second colorbuffer when rendering a scene and placed fog data into it
2016-09-25 00:22:32 +02:00
Magnus Norddahl
e025f6e54b
Mark portals in scene alpha channel for the SSAO pass
2016-09-25 00:22:31 +02:00
Magnus Norddahl
c7c0ffadb5
Move SSAO pass to be before translucent rendering
...
Fix depth sampling location when not using fullscreen scene
2016-09-25 00:19:16 +02:00
Magnus Norddahl
9076d46261
Added SSAO pass
2016-09-25 00:19:15 +02:00
Christoph Oelckers
8907a8bfe8
- fixed incorrect function name in sprites drawer.
...
- fixed duplicate property key in ADynamicLight serializer. Radius was already claimed by AActor so this needs a different name.
2016-09-24 12:09:53 +02:00
Major Cooke
561edd31ec
Added check for angle visibility for GZDoom.
2016-09-24 09:29:00 +02:00
Christoph Oelckers
ee2766d00b
- made adjustments for new savegame code.
2016-09-24 01:47:44 +02:00
Christoph Oelckers
18ee6353fa
- let's be safe and set the proper texture mode for the fullscreen blend rect. I've got spurious reports that on some occasions it was rendered opaque.
2016-09-22 10:54:16 +02:00
Christoph Oelckers
52d4c3970e
- use glPOlygonOffset on non-translucent flat and wall sprites to avoid z-fighting.
2016-09-22 10:00:40 +02:00
Christopher Bruns
a1cbd39f3f
Move call to Stereo3DMode.AdjustPlayerSprites into FGLRenderer.DrawPlayerSprites()
...
(cherry picked from commit 5b5598d7d85c6bb8930e874d5d94cca835061bf0)
2016-09-22 09:25:48 +02:00
Christopher Bruns
a5c27af59b
Show weapon at full width in SideBySideFull 3D mode.
...
(cherry picked from commit c42e98c0042937adc05c1f1569d909d58a5b8ffb)
2016-09-22 09:25:48 +02:00
Christopher Bruns
1f79e23d5b
Implement wide side-by-side mode, using adjusted aspect ratio in projection matrix.
...
Use optimal framebuffer size for side-by-side modes.
2016-09-22 09:25:46 +02:00
Magnus Norddahl
f7b6b1433c
Added exposure pass calculating the bloom/tonemap exposure based on what the eye is seeing
2016-09-22 09:13:32 +02:00
Christoph Oelckers
146b5d2d06
- use 'override' qualifier on renderer interface.
...
Bad things can happen if these get changed in ZDoom without adapting to the change so better let the compiler handle this automatically.
2016-09-22 09:06:21 +02:00
Christoph Oelckers
ceaa040750
- added a workaround to avoid sprite splitting when it may cause glitches for sprites that get rotated in the draw pass.
2016-09-18 17:45:02 +02:00
Major Cooke
80c1baa596
Fixed: Pitch was rotating around the wrong axis.
2016-09-17 12:10:22 -05:00
Christoph Oelckers
bec17bd222
- FLATSPRITE fixes.
2016-09-17 08:26:30 +02:00
Major Cooke
d01b0e061e
Moved flatsprite code into CalculateVertices.
2016-09-16 12:07:28 -05:00
Major Cooke
66d20726c2
Reintroduced flat sprites once more.
...
- Take note, current flat sprites will change. With no pitch involved, sprites are now flat across the ground.
2016-09-16 11:47:20 -05:00
Christoph Oelckers
8b6e09ca09
- changed the license of the OpenGL renderer to LGPL v3.
...
This was done to clean up the license and to ensure that any commercial fork of the engine has to obey the far stricter requirements concerning source distribution. The old license was compatible with GPLv2 whereas combining GPLv2 and LGPLv3 force a license upgrade to GPLv3. The license of code that originates from ZDoomGL has not been changed.
2016-09-14 20:01:13 +02:00
Christoph Oelckers
a98f364cc3
- added another missing nullptr check.
2016-09-13 23:37:19 +02:00
Christoph Oelckers
c593dda8f3
- added missing nullptr check.
2016-09-12 23:03:27 +02:00
Magnus Norddahl
7bdbaaff22
GL aspect ratio adjustments
2016-09-12 20:29:26 +02:00
Christoph Oelckers
71f4bacbd7
- missed something for last commit.
2016-09-10 12:36:44 +02:00
Christoph Oelckers
d3246be488
- draw wall sprites without translucent pixels as opaque. This looses the border smoothing with texture filtering but avoids sorting problems.
2016-09-10 12:24:13 +02:00
Christoph Oelckers
30cb651d92
- completely removed the flat sprite code.
...
This was conceptionally so wrong that there is no chance to salvage any of it.
2016-09-10 10:58:53 +02:00
Magnus Norddahl
d83a72f361
Add missing IsEnabled check
2016-09-09 00:36:12 +02:00
Magnus Norddahl
aaa3581ee6
Hook up eye textures in renderer
2016-09-09 00:36:10 +02:00
Christoph Oelckers
b9ca3c85f8
- fixed: translucency detection in multipatch textures did not work.
...
- fixed: The flat drawer never checked if a texture had translucent parts.
2016-09-08 12:18:09 +02:00
Christoph Oelckers
181e5dc4db
- fixed floor clipping of sprites.
2016-09-06 22:18:47 +02:00
Christoph Oelckers
bfe34f4dc7
- cleanup.
2016-09-06 21:39:13 +02:00
Christoph Oelckers
a36d89405a
- separated the coordinate calculation from GLSprite::Draw.
2016-09-06 12:22:00 +02:00
Christoph Oelckers
a5c0f9a548
- use the predefined fullscreen vertices for clearing a portal instead of using the quad drawer.
2016-09-06 11:58:22 +02:00
Christoph Oelckers
74ede7bb4e
- fixed: The DrawBlend call in the postprocessing case was using the global 'viewsector' variable directly.
...
As with the Stereo3D stuff, this cannot be done because recursive processing of portals will change it. Instead the local copy has to be used here, just like the EndDrawScene call already did.
2016-09-05 09:10:29 +02:00
Christoph Oelckers
d2ead39bcc
- force framebuffers for camera textures on GL 3+ hardware. With all the postprocessing stuff added I don't think it's ok to use the screenbuffer for this anymore.
...
- disable framebuffers for camera textures in legacy mode entirely. This depends on a GL_DEPTH24_STENCIL8 surface which most of these old chipsets do not support, and I really see no point to invest any work here. The worst that can happen is that oversized camera textures won't be processed, which, due to general performance issues, might even be a good thing.
2016-09-04 14:16:05 +02:00
Christoph Oelckers
8b01a88b76
- removed gl_lights_size and gl_lights_intensity.
...
Both of these were inherited from ZDoomGL and in terms of light design in maps it makes absolutely no sense to have them user configurable. They should have been removed 11 years ago.
2016-09-04 12:45:09 +02:00
Christoph Oelckers
e7856ce1e3
- removed unused forceadditive parameter from gl_GetLight.
...
- restricted gl_lights_additive to legacy code and removed menu entry for this.
For modern hardware this setting is completely pointless, it offers no advantage and degrades visual quality. Its only reason for existence was that drawing additive lights with textures is a lot faster, and that's all it's being used for now.
2016-09-04 12:35:26 +02:00
Magnus Norddahl
527703ae8c
Fix missing flash if multisampling was on and no post processing effects active
2016-09-04 03:21:47 +02:00
Christoph Oelckers
217601f338
- fixed: FPortal::ClearScreen may not use the 2D drawing code anymore.
...
2D calls are accumulated and then executed all at once at the end of the frame, but this one needs to be interleaved with the 3D rendering. It now uses the quad drawer to fill the portal with blackness.
2016-09-04 01:46:29 +02:00
Christoph Oelckers
4a80f8e4ed
- fixed: Camera textures and savegame pictures should not be drawn with a Stereo3D mode.
2016-09-03 16:54:17 +02:00
Christoph Oelckers
aece9aaa58
- added xBRZ texture scaler after clearing the licensing conditions. A screenshot of the confirmation that this is ok has been added to the 'licenses' folder.
2016-09-03 14:01:51 +02:00
Christoph Oelckers
8b7a87f256
- fix conditions for DrawBlend calls.
2016-09-03 00:43:18 +02:00
Christoph Oelckers
4e8027612f
- restored 2 lines of code that somehow got lost before the last commit.
2016-09-01 17:38:17 +02:00
Christoph Oelckers
589936f570
- draw the colormap blend after postprocessing, not before it.
...
- added colormap shader to postprocessing.
This replaces the in-place application of fullscreen colormaps if renderbuffers are active. This way the fully composed scene gets inverted, not each element on its own which is highly problematic for additively blended things.
2016-09-01 17:14:51 +02:00
Christoph Oelckers
3389a5a74e
- removed most of the specific options for legacy hardware and consolidated them in one variable (does not work yet.)
2016-09-01 11:52:52 +02:00
Christoph Oelckers
4a0e082836
- fixed: The wall splitter in the translucent sorting code needs to set fracleft and fracright so that vertex generation is done correctly for the split segments.
2016-08-31 23:26:49 +02:00
Christoph Oelckers
45ff15559d
- removed gl_draw_synv because with the postprocessing this is no longer useful.
2016-08-30 00:33:02 +02:00
Christoph Oelckers
0f0dc2c852
- implemented buffers for GL 3.x. These only get mapped during the data collection pass so the order of some things is different here.
2016-08-29 10:43:03 +02:00
Magnus Norddahl
bb066f6f07
Fall back to gl_renderbuffers 0 if buffer creation fails
2016-08-28 18:07:44 +02:00
Christoph Oelckers
c9578ae72d
- create vertex buffer data for horizon portals in the constructor instead of in the draw function.
...
This was the last remaining place where the vertex buffer was accessed in the render pass.
2016-08-26 18:18:50 +02:00
Christoph Oelckers
abba548e40
- render sector hacks through the quad renderer if the vertex buffer is not accessible.
2016-08-26 02:03:24 +02:00
Christoph Oelckers
f6544f3c44
- removed unused GLFLat::sub and all codes depending on it a valid pointer.
2016-08-26 00:04:29 +02:00
Christoph Oelckers
6755cb2a25
- use the quad drawer for skybox-flagged sectors.
2016-08-26 00:02:32 +02:00
Christoph Oelckers
b83c2056a8
- store the stencil caps in the reserved part of the main vertex buffer instead of constantly recreating them.
2016-08-26 00:01:51 +02:00
Christoph Oelckers
76d7b52fcd
- handle the case where a wall gets drawn with an unmapped buffer and no vertex data.
...
This uses the quad drawer because it can only happen with translucent walls that got split during sorting.
2016-08-25 23:20:23 +02:00
Christoph Oelckers
4598c4138c
- added vertex initialization for walls in the processing pass for core profile without persistent buffers.
...
This is slower than doing it in the render pass so it's only active when actually needed - it's also slower than using a client array so this code only gets used when there is no choice but to work with a 3.x core profile context.
2016-08-25 23:13:49 +02:00
Christoph Oelckers
8f331f56e2
- use MakeVertices directly in the portal code and remove all related code from RenderWall.
2016-08-25 23:02:43 +02:00
Christoph Oelckers
8cf53f04e8
- split off the vertex creation from RenderWall.
2016-08-25 22:54:08 +02:00
Christoph Oelckers
4ab8ca63ce
- use more desctiptive names for the predefined vertex buffer indices.
2016-08-25 22:23:31 +02:00
alexey.lysiuk
52b51e79b9
Fixed missing decals in compatibility renderer
...
The problem was appeared in conjunction with dynamic lights only
See http://forum.zdoom.org/viewtopic.php?f=4&t=19321&start=405#p932733
2016-08-24 10:27:14 +03:00
alexey.lysiuk
a185886924
Added compatibility handling for fog and dynamic lights used together
...
See http://forum.drdteam.org/viewtopic.php?t=7063
2016-08-24 10:26:11 +03:00
Christoph Oelckers
b946114145
- removed unused variable.
2016-08-22 22:00:45 +02:00
Christoph Oelckers
7ba5acfb35
- added quad drawer interface so that this part can be done without altering a vertex buffer.
...
So far it's only the framework, the new code is not active yet.
2016-08-22 14:00:25 +02:00
Magnus Norddahl
302f59ea33
Fix r_clearbuffer color not being used
2016-08-22 01:52:51 +02:00
Magnus Norddahl
5eeac830eb
Clear and InvalidateFramebuffer optimization
2016-08-17 17:37:13 +02:00
Christoph Oelckers
e03696a6c9
- fixed: The model matrix must be disabled right after rendering the sky dome, so that it won't get used for the skyfog layer.
2016-08-14 20:11:46 +02:00
Christoph Oelckers
4e8a96aa0e
- removed FRenderState::set2DMode because it had no effect. This looks like development garbage from old times.
2016-08-14 09:14:26 +02:00
Magnus Norddahl
210fce1193
Fix bloom shader missing its target
2016-08-14 09:05:50 +02:00
Magnus Norddahl
c817979eae
Remove GetTrueHeight from GL renderer and concentrate all viewport calculations in SetOutputViewport
2016-08-14 09:05:48 +02:00
Christoph Oelckers
8daaf61160
- predefine the vertex data for the blend overlay which will never change throughout the lifetime of the GLRenderer object.
2016-08-08 14:24:48 +02:00
Christoph Oelckers
9c9edbffdb
- on older ATI drivers where the clip planes are broken, only disable the clip planes themselves, but not OpenGL 3.x so that dynamic lights still work as intended.
...
- only disable clip planes on Windows, but not on Linux or macOS.
- If a driver reports full OpenGL 4.5 support, assume that all features are working properly.
2016-08-08 12:55:09 +02:00
alexey.lysiuk
9ab9548723
Additional fix for splitting of complex wall in compatibility renderer
...
warp 2720 -200 -32 on Extreme Terror
https://www.doomworld.com/idgames/levels/doom2/Ports/d-f/exterror
2016-08-08 12:19:37 +02:00
Christoph Oelckers
13a2bf57e5
- fixed vertex coordinate ordering for the sky cubemap.
...
This was done differently for FFlatVertex and FSkyVertex which caused a switch of the y and z coordinates for the skybox image.
2016-08-06 11:47:03 +02:00
Christoph Oelckers
13527fdd0a
Merge branch 'lensshader' of https://github.com/dpjudas/zdoom
2016-08-05 00:58:14 +02:00
Christoph Oelckers
21536781a9
- forgot to save this.
2016-08-04 13:01:42 +02:00
Christoph Oelckers
7ba6269450
- changed rendering of sky cubemaps to use precalculated vertex data from the SkyVertexBuffer.
2016-08-04 12:16:53 +02:00
Magnus Norddahl
6b9529d70f
Added lens distortion shader
2016-08-02 17:32:21 +02:00
Magnus Norddahl
e8c98a5901
No gamma and player sprites on screenshots
2016-07-31 16:56:41 +02:00
Magnus Norddahl
7709db4bb0
Fix broken viewport/backbuffer location for WriteSavePic
2016-07-31 16:23:21 +02:00
Magnus Norddahl
a6354c74cf
Fix incorrect viewport location when not using fullscreen HUD
2016-07-31 13:23:49 +02:00
Magnus Norddahl
cfc20d1198
Added multisample support to FGLRenderBuffers and added gl_multisample to the menus
2016-07-30 15:33:30 +02:00
Major Cooke
36705b0f04
Added GZDoom version of SpriteAngle and SpriteRotation.
2016-07-30 00:33:33 +02:00
Magnus Norddahl
9bfce5b6ea
Moved post processing effects to its own file
2016-07-30 00:02:26 +02:00
Magnus Norddahl
5849c83028
Added bloom and tonemap to menus
...
Added gl_renderbuffers CVAR that disables render buffers
Added patch shader support to FShaderProgram
Added OpenGL 2 fallback support to render buffers
2016-07-29 21:31:20 +02:00
Magnus Norddahl
0efee85bd8
Added tonemapping and sector based exposure control
2016-07-29 00:36:43 +02:00
Magnus Norddahl
69f52cc898
Added bloom shaders
2016-07-27 21:50:30 +02:00
Magnus Norddahl
aeb7df09de
Added hardware gamma option and improved window handling on Windows
2016-07-27 11:15:19 +02:00
Christoph Oelckers
071485b22e
- fixed: If the resulting render style, after all adjustments, is None for the weapon sprite, do not attempt to draw it at all.
2016-07-25 11:55:47 +02:00