Commit graph

1874 commits

Author SHA1 Message Date
Magnus Norddahl
d121fa21bf - add gl_dither for toggling dithered output on and off 2018-08-08 21:58:23 +02:00
Christoph Oelckers
863b9fff8a
Make dither texture data constant 2018-08-08 08:43:46 +02:00
Rachael Alexanderson
24e2c3a611 - replace dither texture with a hand pre-calculated table) 2018-08-07 20:47:17 -04:00
Magnus Norddahl
31addbc859 - use a texture for the dither matrix 2018-08-08 00:54:12 +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
5b8a016cad - add vid_hdr cvar that enables higher than 8bpc output for monitors that support it 2018-07-30 22:01:05 +02:00
Christoph Oelckers
7e69cd862e - restore the viewport after the SSAO pass.
This runs through the generic postprocessing code which restores the screen's viewport but since this is run in the middle of the scene it needs to restore the scene's viewport (i.e. the window controlled by screenblocks.)
2018-07-28 19:01:34 +02:00
Christoph Oelckers
9768698eda - do not use SSBOs for dynamic lights on Intel graphics hardware for performance reasons.
This was already disabled for GL 4.4 and lower but also needs to be done for Intel's GL 4.5 drivers.
Unlike before this is now exclusive to the light buffer, the shadowmap feature is not affected anymore, although that should be impossible to use anyway on all affected hardware due to lack of computing power.
2018-07-28 12:43:35 +02:00
Christoph Oelckers
3b53f31da3 - default to fullscreen display. 2018-07-28 10:05:50 +02:00
Christoph Oelckers
96bb8a779c - fixed incomplete reordering of code. 2018-07-23 21:17:57 +02:00
Christoph Oelckers
6076f0a69d - disable any texture clamping for textures with a user shader.
This cannot be reliably determined so the least restrictive setting must be used.
2018-07-23 17:53:35 +02:00
Christoph Oelckers
2382b9a238 - fixed: GLScenePortal did not forward IsSky to its backing object. 2018-07-22 21:18:00 +02:00
Christoph Oelckers
d84497c85a - don't let the video scale let the screen end up with a client size less than 320x200, which may cause undefined behavior and trigger asserts in debug builds. 2018-07-22 11:40:12 +02:00
Christoph Oelckers
6ca2b3fce1 - fixed display for smaller screeblocks value.
When refactoring the screen scaling one line too many was altered by accident.
2018-07-21 12:13:17 +02:00
Christoph Oelckers
57f65a9379 - fixed: The 2D drawer did not restore the blend mode after finishing. 2018-07-20 19:46:53 +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
7da61ddfee - fix missing forward declaration when falling back to older user shaders 2018-07-19 02:34:45 +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
23c0f8f6ac - fix buffer usage warning caused by using the wrong flag for glMapBuffer after switching to doing a plain memcpy 2018-07-18 16:04:35 +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
Magnus Norddahl
8a500a25f5 - rewrite the user shader support for materials - new syntax is to create a 'Material ProcessMaterial()' function 2018-07-15 23:01:40 +02:00
Christoph Oelckers
f62e2f9ba3 - fixed: The stencil cap may never write to the depth buffer.
Due to the way nested portals work this will block rendering of the nested cap entriely and cause some visual glitches when looking straight up or down in such a sector.
2018-07-15 19:16:12 +02:00
Christoph Oelckers
2c86c4e942 - fixed: When deleting a camera texture's depth buffer, the corresponding variable must also be cleared.
Thanks to OpenGL's messed up state system this didn't cause some clear failure but just reused the last bound buffer instead which may not have had a matching size.
2018-07-15 10:55:34 +02:00
Christoph Oelckers
d58d1e21d0 - removed the texture invalidation check from FHardwareTexture.
This is not needed anymore because only warp and camera textures still implement CheckModified and both are excluded here.
2018-07-15 00:28:16 +02:00
Christoph Oelckers
33ee0f3c27 Merge branch 'master' into modern
# Conflicts:
#	src/gl/renderer/gl_renderer.cpp
#	src/gl/renderer/gl_renderer.h
#	src/gl/renderer/gl_renderstate.h
#	src/gl/system/gl_framebuffer.cpp
#	src/gl/system/gl_framebuffer.h
2018-07-14 13:18:34 +02:00
Christoph Oelckers
7817e6a7b2 - moved the texture binding code back to the OpenGL specific parts.
turns out that this cannot be consolidated with Vulkan because the semantics are far too different here.
2018-07-14 13:05:49 +02:00
usernameak
e306d4ee04 Fix codestyle; add ability to name the textures 2018-07-14 12:01:54 +02:00
usernameak
fa51a54042 Made ability to define custom material shaders for ProcessMaterial function 2018-07-14 12:01:54 +02:00
Magnus Norddahl
ebae12e74b - Make members private that are not used outside FGLRenderBuffers 2018-07-03 23:35:34 +02:00
Magnus Norddahl
092b2953ea - add GL to OpenGL specific postprocess classes to make it more clear which belongs to the generic hw interface and which belong to the OpenGL implementation 2018-07-03 23:31:40 +02:00
Magnus Norddahl
fcee021753 Fix frame buffer binding bug that caused PP textures to end up with bad data 2018-07-03 21:44:49 +02:00
Magnus Norddahl
4482ad2b78 - fix saved texture bindings to work for any number of binds 2018-07-01 14:31:30 +02:00
Magnus Norddahl
5b3212df13 Merge remote-tracking branch 'gzdoom/modern' into hw_postprocess 2018-06-30 16:47:06 +02:00
Magnus Norddahl
c0c7573788 - fix black ssao bug 2018-06-30 16:46:33 +02:00
Magnus Norddahl
8eb825e25a - fix some postprocess bugs 2018-06-30 16:44:09 +02:00
Magnus Norddahl
ba09af7cbb - add GL debug group for the 2D drawer
- remove pointless opengl calls from effects that are doing nothing
2018-06-30 15:41:12 +02:00
Magnus Norddahl
35c13763db - convert the SSAO pass to use hw_postprocess 2018-06-30 15:24:13 +02:00
Magnus Norddahl
ecb5d69ae3 - Simplify FGLRenderer::PostProcessScene 2018-06-29 21:55:46 +02:00
Magnus Norddahl
a7529ce3b4 Merge remote-tracking branch 'gzdoom/modern' into hw_postprocess 2018-06-29 20:24:32 +02:00
Christoph Oelckers
446be98f37 - fixed light application logic for flats.
The light mode check wasn't done properly anymore after merging GLPASS_ALL and GLPASS_PLAIN.
2018-06-26 09:28:10 +02:00
Magnus Norddahl
61d69f5561 Merge remote-tracking branch 'gzdoom/modern' into hw_postprocess 2018-06-26 02:12:49 +02:00
Christoph Oelckers
daf8703fc9 - split up Win32's SystemGLFrameBuffer as well to get the shareable parts between OpenGL and Vulkan into a base class. 2018-06-24 21:26:32 +02:00
Christoph Oelckers
e7365be0d1 - renamed SystemFrameBuffer to SystemGLFrameBuffer.
... because with Vulkan there needs to be some hint what API this is for.
2018-06-24 20:16:30 +02:00
Magnus Norddahl
32d837cdf1 Merge remote-tracking branch 'gzdoom/modern' into hw_postprocess 2018-06-24 17:57:02 +02:00
Christoph Oelckers
491898fe2c - fixed calculation of projection matrix for weapon sprites.
- fixed color mask for green/magenta.
- fixed crash when initializing video, because it was accessing 'screen' before it was set from within the framebuffer's constructor.
2018-06-24 17:16:07 +02:00
Christoph Oelckers
c3d5b960ee - refactored the entire Stereo3D system to get rid of the class hierarchy and all its ugly implications.
Ultimately all this needs is a small data table describing the geometric properties of each mode and a single Present function that calls the mode specific variants.
Code size got reduced from 50kb to less than 20kb with proper separation of the generic parts from the OpenGL parts.
2018-06-24 17:16:07 +02:00
Christoph Oelckers
4ef7b66c4b - partial consolidation of the EyePose classes.
The SBS versions can just as easily be handled with an additional parameter.
2018-06-24 11:45:40 +02:00
Christoph Oelckers
532fba5c26 - moved the Stereo3D EyePose to their own file in hwrenderer/. 2018-06-24 10:47:42 +02:00
Christoph Oelckers
e7a0ccf879 - fixed remaining issues with portal refactoring. 2018-06-23 23:03:34 +02:00