Commit graph

14769 commits

Author SHA1 Message Date
Christoph Oelckers
2f4c2e0425 - fixed some includes which did not cause VC++ to error out. 2018-06-13 23:32:43 +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
0b9eaac5e1 - fixed SSAO shader texture assignments. 2018-06-13 19:04:19 +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
Christoph Oelckers
20e84fff5a - fixed crash with GL 3.x and fixed colormap active.
This must skip all light processing. On GL 4.5 it will only collect useless data but on GL 3.x it will run into an unmapped buffer situation.
2018-06-12 17:55:20 +02:00
Christoph Oelckers
6fced1865f Moved ScopedViewShifter to hwrenderer/ . 2018-06-12 14:47:05 +02:00
Christoph Oelckers
f33ddd8cce Made the ScopedViewShifter fully inline 2018-06-12 14:44:58 +02:00
Christoph Oelckers
5a20de829b fixed compiler warning 2018-06-12 10:59:17 +02:00
Christoph Oelckers
3385e28611 Make it compile 2018-06-12 10:58:32 +02:00
Christoph Oelckers
b8b5802599 Added a uniform buffer abstraction class
May get some more methods later, this is just a start to get going.
2018-06-12 10:42:03 +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
alexey.lysiuk
29d2e77840 - fixed portal restoration on revisiting level in hub
Added function to FLevelLocals to test if map is being reentered

https://forum.zdoom.org/viewtopic.php?t=60455
2018-06-11 11:55:49 +03:00
Christoph Oelckers
bd1525eb9d - fixed: ADynamicLight's shadowmap index must be reset when loading a savegame. 2018-06-10 22:57:34 +02:00
Magnus Norddahl
a91147a3a5 - move DrawArray and DrawElements to PolyTriangleDrawer 2018-06-10 15:58:01 +02:00
Magnus Norddahl
9ba26a5ece - add support for using FModelVertex as input to the softpoly vertex shader 2018-06-10 15:29:31 +02:00
Magnus Norddahl
c9fd52340e - add GroupMemoryBarrierCommand 2018-06-10 13:35:15 +02:00
Magnus Norddahl
efa434d47b - remove unused VectoredTryCatch 2018-06-10 13:15:31 +02:00
Magnus Norddahl
628f6c32d9 - remove unused DrawerCommand::DebugInfo 2018-06-10 12:54:37 +02:00
Magnus Norddahl
de67393b4e - use the worker threads to clear the stencil buffer 2018-06-10 12:42:19 +02:00
Christoph Oelckers
8486cd2c0e - fixed generation of brightmaps for sprites.
This forgot to take the added empty border for filtering improvement into account.
2018-06-10 08:22:07 +02:00
Rachael Alexanderson
77956fc485 - remove ARM specific gl_es definition since it's not even really much different from the main line definition, anyhow 2018-06-09 13:40:39 -04:00
Christoph Oelckers
ae1fe041ee - ZScript used the wrong variable for compatflags2.
ii_* is merely the storage for info from the compatibility.txt lump.
2018-06-09 17:59:21 +02:00
alexey.lysiuk
4a1f36623b - fixed: flag CVars in ZScript referenced wrong addresses 2018-06-09 17:21:55 +03:00
Magnus Norddahl
85f5f897d7 - enable model rendering in the software renderer 2018-06-09 12:29:33 +02:00
Christoph Oelckers
1fdcacc337 - redirect script access to the compatflags CVARs to their internal shadow variables.
This is needed so that MAPINFO settings for these flags don't get ignored.
2018-06-08 22:55:44 +02:00
Christoph Oelckers
a312f5a7c1 - update version info. 2018-06-07 00:04:53 +02:00
Magnus Norddahl
2abf700c29 - fix missing include 2018-06-06 00:30:59 +02:00
Magnus Norddahl
5464d2a577 - add dynamic lights to softpoly and software renderer models 2018-06-05 22:43:11 +02:00
Magnus Norddahl
61f379c88f - fix null pointer crash in softpoly 2018-06-05 22:42:21 +02:00
Christoph Oelckers
2baed338f7 - flat rendering must check for missing vertex buffer data. 2018-06-05 21:44:38 +02:00
Christoph Oelckers
60b6dbadb2 - fixed autoaiming for unranged attacks.
The abort condition for the extended checks must completely stop any further processing but the check for this was missing.
2018-06-05 20:35:01 +02:00
Magnus Norddahl
f5386a706f - fix software renderer dynamic lights not working properly in mirrors 2018-06-05 20:09:02 +02:00
Magnus Norddahl
b74a9965b8 - draw models in mirrors and portals at the right location in the software renderer 2018-06-05 19:36:57 +02:00
Rachael Alexanderson
512082b222 - fixed: 'empty function OnGiveSecret' - this was my fault, giving bad advice to Marisa in her PR. I fixed it. 2018-06-05 10:20:02 -04:00
Marisa Kirisame
477cf23fd2 Adds "OnGiveSecret" virtual function on Actor for customizing behavior of secret finding. 2018-06-05 10:06:53 -04:00