Christoph Oelckers
118bc78fe3
- moved the entire OpenGL backend into a separate namespace.
2018-10-29 13:56:17 +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
bd7df13200
- let the light buffer use IDataBuffer as well.
2018-10-28 15:04:57 +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
5a4e5a8038
- moved the remaining parts of the main vertex buffer to hwrenderer.
2018-10-27 14:42:24 +02:00
Christoph Oelckers
08e1b49988
- removed include
2018-10-21 20:21:16 +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
9253118bdc
- removed the quad drawer class
...
This isn't needed anymore.
2018-10-20 11:59:12 +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
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
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
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
7da61ddfee
- fix missing forward declaration when falling back to older user shaders
2018-07-19 02:34:45 +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
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
32d837cdf1
Merge remote-tracking branch 'gzdoom/modern' into hw_postprocess
2018-06-24 17:57:02 +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
Christoph Oelckers
9486180843
- simplify the interface.
2018-06-21 21:36:12 +02:00
Magnus Norddahl
151ed22967
- write OpenGL backend for hw_postprocess (FGLRenderBuffers::RenderEffect)
...
- remove old fxaa and lens shader classes
- render the fxaa and lens effects
2018-06-20 19:56:30 +02:00
Christoph Oelckers
eb277cc101
- calculate the normal view matrix at a higher level.
2018-06-20 13:49:06 +02:00
Christoph Oelckers
4937848123
- refactoring of fixed colormap stuff to have it better organized and to reduce the number of uniforms in the main shader.
...
This removes 3 uniforms, consisting of 9 floats. Those were merged into other values that never get used at the same time.
It also moves the costly setup of the fixed colormap out of the render state into the 2D processing code.
Since 3D forces use of render buffers now, it is no longer necessary to draw the entire scene with the colormap active, meaning it can be handled more efficiently.
2018-06-16 22:40:44 +02:00
Christoph Oelckers
9ff7e5a4ef
- force render buffers to be active.
...
For modern hardware the fallback path really makes no sense and this allows to simplify some things quite a bit.
2018-06-16 09:37:01 +02:00
Christoph Oelckers
8ab68264c1
- removal of all code to handle OpenGL 2. From this commit on the main build of GZDoom will be OpenGL 3.3 or higher.
...
# Conflicts:
# src/gl/renderer/gl_renderer.cpp
# src/gl/shaders/gl_shader.cpp
# src/gl/system/gl_framebuffer.cpp
# src/gl_load/gl_interface.cpp
2018-06-15 21:45:05 +02:00
Christoph Oelckers
9a7f9bdb4c
- moved postprocessing shader classes to hwrenderer after removing all dependencies on OpenGL.
2018-06-13 22:37:01 +02:00
Christoph Oelckers
3401876476
- use FShaderProgram through an abstract interface and remove all dependencies on the GL renderer from the shader definition source files.
2018-06-13 22:08:55 +02:00
Christoph Oelckers
8bf009bd89
- added a RenderQueue parameter to all Bind functions of the postprocessing shaders. This is unused for now. All places calling these pass a dummy NOQUEUE value which is just a nullptr.
...
This is for Vulkan preparation where all of this needs to run in a user-specified context so that this code can be moved out of the GL folder without depending on OpenGL's global state model.
2018-06-13 20:30:51 +02:00
Christoph Oelckers
ce50b0e46b
- read sampler bindings from the shader instead of tagging along a large amount of support data.
...
Works for most shaders, except SSAO.
2018-06-13 17:44:49 +02:00
Christoph Oelckers
59827cd601
- use layout binding qualifiers on uniform buffers when GLSL version >= 4.2
...
This has no performance benefits but allows checking shader generation correctness without having to implement Vulkan first.
2018-06-13 13:16:07 +02:00
Christoph Oelckers
d2dea17e81
- specify vertex attributes in the shader source for Vulkan compatibility.
2018-06-13 08:40:04 +02:00
Christoph Oelckers
ad7aaa8f2a
- specify fragment output locations in the shader source.
...
OpenGL has been supporting this since version 3.3 and Vulkan requires it so it's the way to go.
2018-06-12 23:52:33 +02:00
Magnus Norddahl
832e7818c8
- rewrote the blur shader so that it works the same way as the rest
2018-06-12 22:14:44 +02:00
Christoph Oelckers
cb5caa757b
- moved ShaderUniforms to hwrenderer/ .
2018-06-12 22:08:31 +02:00
Christoph Oelckers
f166624eb2
- some fixes to the PP shader interface.
...
The binding point needs to be part of the ShaderUniforms class because Vulkan will need this value to generate the declaration in the shader source.
There's still one issue here: Since OpenGL has no local render state, the buffer must be bound every time it is used. Once the code is better abstracted this should be moved to a higher level class that knows all associated data and how to set it up.
2018-06-12 21:43:35 +02:00
Christoph Oelckers
4ddd9dde79
Use IUniformBuffer
2018-06-12 17:55:34 +02:00
Magnus Norddahl
9155b773cc
- change ShaderUniforms so that it just contains the uniform block and not the binding point
2018-06-11 22:33:55 +02:00
Magnus Norddahl
49073489e5
- uniform buffers for the fxaa, blur and bloom shaders
2018-06-11 22:06:46 +02:00
Magnus Norddahl
48f753061a
- uniform buffers for the present and shadowmap shaders
2018-06-11 21:42:09 +02:00
Magnus Norddahl
6fcc79d72a
- uniform buffers for the tonemap shaders
2018-06-11 21:18:20 +02:00
Magnus Norddahl
2bde741a7e
- Uniform buffer for colormap shader
2018-06-11 21:03:55 +02:00
Magnus Norddahl
d22fb24e28
- Uniform buffers for lens shader
2018-06-11 20:58:20 +02:00
Magnus Norddahl
763c5c9769
- change ssao pass to use an uniform block
2018-06-11 20:48:43 +02:00