Christoph Oelckers
54f46fdfee
- moved most of FShadowMap to IShadowMap, except the main Update function.
2018-10-28 16:11:04 +01:00
Christoph Oelckers
926a918e0c
- moved the light buffer pointer to globally visible state.
2018-10-28 15:22:48 +01:00
Christoph Oelckers
b2776c9351
- moved lightbuffer files to hwrenderer.
2018-10-28 15:09:33 +01:00
Christoph Oelckers
54de0bf59f
- changed a bit more stuff that doesn't need to be routed through the OpenGL interface anymore.
2018-10-28 14:25:29 +01:00
Christoph Oelckers
f7c7c8d1c5
- moved some buffer variables out of GLRenderer into common parts of the code so that they can be accessed from hwrenderer as well.
...
This will allow more code to be moved out of the API dependent parts.
2018-10-28 13:56:24 +01:00
Christoph Oelckers
c5b3b9e107
- moved the viewpoint buffer to hwrenderer.
2018-10-28 13:26:47 +01:00
Christoph Oelckers
b51cc8b115
- base the viewpoint buffer on IDataBuffer.
2018-10-28 13:18:13 +01:00
Christoph Oelckers
3b26e64404
- renamed the 'vertexbuffer' files to 'buffers' because it's now generic for all buffer types.
2018-10-28 12:04:20 +01:00
Christoph Oelckers
a1fb1f60f4
- replaced IUniformBuffer with IDataBuffer, which reuses the code for the other buffer types and is more flexible.
2018-10-28 11:54:26 +01:00
Christoph Oelckers
8abf09afe2
- consolidated buffer implementations.
...
Since this is nearly identical for different buffer types they should share the same code wherever possible.
2018-10-28 09:45:51 +01:00
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
a62cd64138
- removed all direct OpenGL dependencies from gl_models.cpp.
2018-10-27 22:55:33 +02:00
Christoph Oelckers
83e706afe7
- - removed the remains of the old FVertexBuffer class.
2018-10-27 22:04:13 +02:00
Christoph Oelckers
067716cefb
- made sky vertex buffer backend independent.
2018-10-27 21:31:27 +02:00
Christoph Oelckers
b92b7ca0a7
- fixed a few more places where unwanted dynamic lights were still active.
2018-10-27 19:25:51 +02:00
Christoph Oelckers
5201501534
- added lock/unlock methods to the buffer implementations.
...
These are not interchangeable with Map/Unmap!
Map/Unmap is for mapping a buffer for updating on old hardware, Lock/Unlock are for manually copying some initialization data directly into a static buffer.
2018-10-27 16:04:28 +02:00
Christoph Oelckers
5a4e5a8038
- moved the remaining parts of the main vertex buffer to hwrenderer.
2018-10-27 14:42:24 +02:00
Christoph Oelckers
dad3c50ebd
- renamed classes before continuing.
2018-10-27 14:27:43 +02:00
Christoph Oelckers
72bc7693bd
- refactored main vertex buffer (but didn't merge with hwrender class yet.
2018-10-27 14:24:47 +02:00
Christoph Oelckers
332ab220ad
- hooked low level buffers into render state.
...
It still needs to support the old interface so the code isn't really clean
2018-10-27 10:55:35 +02:00
Christoph Oelckers
3db26a3a1b
- added an abstract index buffer implementation as well.
2018-10-27 10:26:51 +02:00
Christoph Oelckers
bb09f5488f
- added an abstract base vertex buffer class.
2018-10-27 09:07:26 +02:00
Christoph Oelckers
4f4bcd2d7d
- moved DrawSorted back to HWDrawList.
2018-10-25 22:45:55 +02:00
Christoph Oelckers
c98474d1c7
- portal refactoring complete.
2018-10-25 22:30:03 +02:00
Christoph Oelckers
cead0194bd
- safety commit. To finalize we need a better vertex buffer interface.
2018-10-25 00:49:39 +02:00
Christoph Oelckers
3940f17980
- portals are now completely on the hwrenderer side.
...
The only thing that still needs to be on the backend side is the one function that manages the rendering.
2018-10-25 00:25:55 +02:00
Christoph Oelckers
e6b5eba469
- moved GLScenePortal to the hardware independent code.
2018-10-24 07:57:32 +02:00
Christoph Oelckers
c76c4b77ec
- merged GLPortal into HWPortal after all direct OpenGL dependencies have been removed.
2018-10-24 07:49:06 +02:00
Christoph Oelckers
d757efde96
- renamed IPortal to HWPortal
2018-10-24 07:35:22 +02:00
Christoph Oelckers
3e4dcbe2b4
- groundwork for separating the portal data from the renderer.
...
With GLPortal being responsible for all the setup a lot of code was tied to the backend.
Now FDrawInfo will manage the setup and only call pure data generation functions in the actual portal object.
2018-10-24 00:19:07 +02:00
Christoph Oelckers
93dac4e4d8
- some reorganization of portal code.
2018-10-23 22:32:00 +02:00
Christoph Oelckers
93599e483f
- moved weapon drawing to hwrenderer.
2018-10-22 23:40:44 +02:00
Christoph Oelckers
3775c4756e
- moved sprite drawer to hwrenderer as well.
2018-10-21 17:50:01 +02:00
Christoph Oelckers
8ffeb7812f
- made wall draw code API independent.
2018-10-21 13:53:50 +02:00
Christoph Oelckers
7897f26abf
- started reworking the wall drawer.
2018-10-21 13:11:36 +02:00
Christoph Oelckers
acad8315d0
- move stencil recursion counter to render state.
2018-10-21 10:58:11 +02:00
Christoph Oelckers
a97d71a3c3
- draw decals in hardware independent code.
2018-10-21 10:51:26 +02:00
Christoph Oelckers
1768508c80
- first adjustments to decal code.
...
- moved texture mode constants to a global header and consolidated with the variants of the 2D drawer.
2018-10-21 08:14:48 +02:00
Christoph Oelckers
d45f6b9bea
- moved the flat drawer to hwrenderer.
2018-10-21 00:35:39 +02:00
Christoph Oelckers
e8f48e7535
- moved the color/fog setters to hwrenderer.
2018-10-20 23:33:07 +02:00
Christoph Oelckers
fac7c7a31c
- abstraction of render style in render state.
2018-10-20 23:14:57 +02:00
Christoph Oelckers
9ef5e00cdf
- some cleanup and preparation on RenderState interface.
2018-10-20 21:36:50 +02:00
Christoph Oelckers
3c3be0d349
- started with an abstract render interface, most importantly handle the stencil for plane flooding through the render state object instead of changing GL state directly.
2018-10-20 21:08:24 +02:00
Christoph Oelckers
510aa600dd
- moved hw_renderstate.h to hwrenderer folder and renamed one GL constant it was using.
2018-10-20 18:37:12 +02:00
Christoph Oelckers
9a03ba3cc5
- renamed FRenderState to FGLRenderState.
2018-10-20 13:05:36 +02:00
Christoph Oelckers
5f838d52b9
- some cleanup on the OpenGL interface and its flags.
...
Most importantly, the separate command line options for switching on the legacy buffer handling have been removed.
There's really no need for them anymore, because unlike in earlier versions many of the implementation differences no longer exist - with the exception of where the light and vertex buffer contents are generated.
For testing this, -glversion 3 is sufficient.
2018-10-20 12:55:25 +02:00
Christoph Oelckers
74ba142eae
- allow vertex creation for sprites in the setup pass.
...
Currently only used by legacy hardware.
2018-10-20 11:53:20 +02:00
Christoph Oelckers
00c8c6e3b2
- generate vertices for skybox sectors in the processing pass.
...
Aside from the sprites this was the only other remaining use of FQuadDrawer.
2018-10-20 11:22:55 +02:00
Christoph Oelckers
e5ff500c5a
- rewrote render hacks to prepare their vertex data in the processing pass.
...
This eliminates 3 of the 5 remaining occurences of FQuadDrawer and gets a large section of code out of the GL backend into the common hardware rendering code.
# Conflicts:
# src/gl/scene/gl_scene.cpp
2018-10-20 10:56:12 +02:00
Christoph Oelckers
84a55667d9
- removed more old code from flat renderer.
...
VBOHeightCheck was from early development when interpolation was not reflected by the vertex buffer.
# Conflicts:
# src/gl/scene/gl_flats.cpp
2018-10-20 10:39:28 +02:00
Christoph Oelckers
acb9505606
- fixed cherry-picked commit so that modern OpenGL can still do the light setup in the render pass.
2018-10-20 10:33:26 +02:00
Christoph Oelckers
a9c8546ba3
- changed dynamic light setup so that it is completely in the processing pass, not the render pass.
...
# Conflicts:
# src/gl/scene/gl_flats.cpp
# src/hwrenderer/scene/hw_flats.cpp
2018-10-20 09:46:53 +02:00
Rachael Alexanderson
51dfc82153
- fix missing curly brace
2018-10-03 09:39:32 -04:00
Christoph Oelckers
797f88a6c8
- some tweaking of shadowmap filter setting to allow changing the PCF filter's number of samplings.
2018-10-03 13:45:54 +02:00
Christoph Oelckers
c8852b8fea
- enabled the linear shadowmap filter.
...
Although this doesn't look as good as the PCF version it is a lot less calculation intensive and therefore more suitable for weaker hardware.
It also tends to bleed through walls a lot less.
2018-09-29 13:23:40 +02:00
Christoph Oelckers
bc1e659c7b
Revert "- reworked fog uniforms to move the global fog mode setting to the viewpoint buffer."
...
This reverts commit 8b26b6dd1e
.
This was causing problems with light mode 2 because some edge cases were no longer handled properly.
2018-09-16 22:38:20 +02:00
Christoph Oelckers
4c13a8df6e
Merge branch 'master' of https://github.com/coelckers/gzdoom
2018-09-16 13:52:13 +02:00
Christoph Oelckers
e13d1e4d0d
- do not render lights from uninitialized data.
2018-09-16 13:52:02 +02:00
David Carlier
58c6614c03
silent few warnings
2018-09-16 09:09:47 +02:00
Christoph Oelckers
1c3d4b46c6
- fixed the use of Doom-Legacy-style 3D floor lighting in light mode 8.
...
Legacy used some strange blending formula to calculate its colormaps for colored 3D floor lighting, this is not available in the software lighting mode, so for these the engine has to temporarily revert to light mode 2 to render them correctly.
2018-09-08 13:08:04 +02:00
Christoph Oelckers
8b26b6dd1e
- reworked fog uniforms to move the global fog mode setting to the viewpoint buffer.
2018-09-06 19:14:30 +02:00
Christoph Oelckers
5e39890118
- use a uniform buffer for per-scene data like rotation matrices.
2018-09-02 18:40:36 +02:00
Christoph Oelckers
2d1043d1d3
- added profiling for postprocessing code.
2018-09-02 11:35:02 +02:00
Christoph Oelckers
5b7d3c91f9
- defaulted constructors and assignment operators of several trivial types.
2018-08-25 23:51:36 +02:00
Christoph Oelckers
c33f358894
- clear GLWF_TRANSLUCENT at the end of PutWall.
2018-08-13 20:48:27 +02:00
Magnus Norddahl
d121fa21bf
- add gl_dither for toggling dithered output on and off
2018-08-08 21:58:23 +02:00
alexey.lysiuk
3a6e05710a
- fixed missing decals on 3D floors with hardware renderer
...
https://forum.zdoom.org/viewtopic.php?t=61404
2018-07-23 16:46:51 +03:00
Magnus Norddahl
b1468d9dcc
- somehow visual studio 2015 miscompiles this so badly it triggers an out of bounds assert in STL!
2018-07-22 22:51:08 +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
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
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
Christoph Oelckers
69a3271440
- removed the unused feature to allow animated material layers.
...
This was a relic from trying to support ZDoomGL's texture shader system but would make texture management with Vulkan significantly more complicated because it would require dynamic descriptor set management for textures which can cause a lot of overhead.
2018-07-14 12:10:41 +02:00
usernameak
292458ee2d
Custom hardware shaders now can use custom texture units
2018-07-14 12:01:54 +02:00
Christoph Oelckers
124fe63d00
Merge branch 'master' into modern
2018-07-14 10:24:41 +02:00
Magnus Norddahl
2128b99117
- fix ssao not working when multisample was off
2018-07-03 23:21:54 +02:00
Magnus Norddahl
128c8d8318
- improve the bloom blur quality slightly
2018-07-03 23:12:47 +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
Christoph Oelckers
158890e0ce
- fixed : Decals used the wrong texture variant.
2018-07-02 19:12:48 +02:00
Magnus Norddahl
8eb825e25a
- fix some postprocess bugs
2018-06-30 16:44:09 +02:00
Magnus Norddahl
723b18f2cd
Merge branch 'hw_postprocess' of https://github.com/coelckers/gzdoom into hw_postprocess
2018-06-30 15:24:25 +02:00
Magnus Norddahl
35c13763db
- convert the SSAO pass to use hw_postprocess
2018-06-30 15:24:13 +02:00
alexey.lysiuk
da005fa7fc
Fixed compilation warnings reported by Clang
...
hwrenderer/postprocessing/hw_postprocess.cpp:22:3: warning: delete called on non-final 'PPEffectManager' that has virtual functions but non-virtual destructor [-Wdelete-non-virtual-dtor]
hwrenderer/postprocessing/hw_postprocess.h:64:5: warning: cannot delete expression with pointer-to-'void' type 'void *' [-Wdelete-incomplete]
hwrenderer/postprocessing/hw_postprocess.h:75:3: warning: cannot delete expression with pointer-to-'void' type 'void *' [-Wdelete-incomplete]
hwrenderer/postprocessing/hw_postprocess.h:85:4: warning: cannot delete expression with pointer-to-'void' type 'void *' [-Wdelete-incomplete]
2018-06-30 10:51:47 +03:00
Magnus Norddahl
ecb5d69ae3
- Simplify FGLRenderer::PostProcessScene
2018-06-29 21:55:46 +02:00
Magnus Norddahl
1c5f73727e
- fix missing include
2018-06-26 02:14:08 +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
Christoph Oelckers
6ebec37baf
- moved all portal code that sets up a scene to be rendered into API independent code and let it be handled by a common wrapper class.
2018-06-23 23:03:34 +02:00
Magnus Norddahl
b2fad453fa
- change tonemaps to steps
2018-06-23 19:25:49 +02:00
Christoph Oelckers
1cf3af9c41
- moved the current portal pointer to HWDrawInfo so that the portal managed does not need to save and restore a global variable for each portal.
2018-06-23 13:51:19 +02:00
Christoph Oelckers
282fdac660
- made the static portal state a struct inside the Renderer object
2018-06-23 13:25:59 +02:00
Christoph Oelckers
82d7e5970f
- moved the clipline uniform to the viewpoint buffer.
...
This was the final one of the per-scene values that could be taken out of the render state.
2018-06-22 23:49:39 +02:00
Christoph Oelckers
80a9028938
- mirror clip planes moved - not working yet.
2018-06-22 22:45:05 +02:00
Christoph Oelckers
d5af939119
- more uniforms moved.
...
(not working yet.)
2018-06-22 21:32:38 +02:00
Christoph Oelckers
43e1a2d249
- moved uViewHeight and uCameraPos to the viewpoint uniform struct.
2018-06-22 21:05:36 +02:00
Magnus Norddahl
ebf0cef283
- convert colormap shader to postprocess steps
2018-06-22 00:51:58 +02:00