Commit graph

213 commits

Author SHA1 Message Date
Christoph Oelckers
612fb40f3a - don't use uniforms related to fixed colormaps for other things.
The fixed colormap is a per-scene global setting that normally does not need to change ever during rendering of a scene so it's easily shoved aside into a static uniform buffer.
Having to change this buffer for inconsequential stuff should be avoided, especially when there's other uniforms that are just as good to hold these values.
2018-06-14 21:28:03 +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
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
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
Christoph Oelckers
cce6c9a085 - fixed precision issue with dot product.
Apparently the shader math is not precise enough to ensure that two supposedly orthogonal vectors are truly orthogonal, resulting in a non-zero dot product
2018-05-24 20:31:44 +02:00
Christoph Oelckers
1266339c0f - fixed shader compilation. 2018-05-19 21:17:58 +02:00
Christoph Oelckers
3dc6ddbcc3 - check light direction in the shader.
There are situations where lights on the wrong side of a linedef may be passed and those need to be skipped in the shader code.
2018-05-19 19:20:45 +02:00
Christoph Oelckers
286846a8ec 2D must consider brightmaps. 2018-04-27 08:59:59 +02:00
Christoph Oelckers
94e8d59dde - implemented shader support for rendering the SW renderer canvas with legacy OpenGL. 2018-04-08 13:05:20 +02:00
Christoph Oelckers
221beec979 - added palette shader and fixed a few things. 2018-04-07 12:17:23 +02:00
Christoph Oelckers
b34d7f9e08 - added a software scene drawer to the GL renderer.
It still looks like shit and only works on the modern render path but at least the basics are working.
2018-04-07 10:20:59 +02:00
Christoph Oelckers
a001a5304d - removed the old software renderer framebuffers for Windows
This cannot be refactored with the old code still present and done properly both renderers should share what they can.
2018-03-30 23:18:25 +02:00
Christoph Oelckers
832df6d43a - implemented desaturation for the legacy GL renderer's 2D.
A lot of work that's only needed to be able to use the hardware renderer's 2D code with the software renderer.
2018-03-30 18:14:42 +02:00
Christoph Oelckers
811d96e07e D3D 2D code refactored but not tested yet. 2018-03-29 23:21:25 +02:00
Christoph Oelckers
a40e085a46 - 2D drawer implementation complete for hardware renderer.
This also replaces DTA_ColormapStyle with proper implementations of its components. As implemented it was a very awkward mixture of various effects that already existed in a separate form. As a result of its implementation it required additional but completely redundant shader support which could be removed now. As a side effect of this change a new DTA_Desaturate option was added.
2018-03-29 16:21:21 +02:00
Christoph Oelckers
70b6754299 - implemented the 2D drawer for the hardware renderer. Not tested yet. 2018-03-28 21:38:00 +02:00
Christoph Oelckers
25999c1c6a - looks like the 2D drawer sources did not get committed...
- This also adds the missing draw modes to the GLSL shader.
2018-03-28 19:07:43 +02:00
Christoph Oelckers
d9f6546c16 - removed Shader Model 1.4 support.
The only hardware ever to support this is ATI's R200 which has been deprecated by ATI before Vista got released, and is no longer a relevant target.
2018-03-26 22:03:33 +02:00
Magnus Norddahl
4ffa344f7d - Fix black pixels when subtractive lights are in range for PBR materials 2018-03-26 00:01:52 +02:00
Christoph Oelckers
d586d774cf - adjusted GL renderer to the new rules for alpha textures. This means that the translation fallback is only needed for the legacy renderer now. Modern GL can use the regular texture and will apply a grayscale mapping instead of merely using the red channel. 2018-03-22 20:42:17 +01:00
Magnus Norddahl
9b7bef59d2 - fixed Intel rendering glitch with uDynLightColor 2018-03-12 21:44:55 +01:00
Magnus Norddahl
07fa310f23 - move material light modes to their own subshader lumps 2018-02-20 00:13:05 +01:00
Magnus Norddahl
eb39e88682 - clean up the main.fp light handling code so that a single ApplyDynLights function applies all dynamic light 2018-02-19 02:01:33 +01:00
Magnus Norddahl
94fbcacf22 Merge branch 'gzdoom' into materials 2018-02-10 00:08:17 +01:00
Magnus Norddahl
3207d8aef7 - generate uniform declarations from c++ 2018-02-09 23:29:31 +01:00
Magnus Norddahl
769867475c - Replaced max(dot(a,b), 0.0) with clamp as some rounding errors caused pow to receive negative values when then value was subtracted from 1.0 (undefined glsl behavior)
- Fixed that surface angle attenuation was getting applied twice
2018-02-03 23:56:55 +01:00
Magnus Norddahl
7b9a334f77 - Change PBR materials to use quadratic light falloff 2018-02-03 13:17:09 +01:00
Magnus Norddahl
747ef8324e - Improve sector light slightly for PBR 2018-01-29 19:09:24 +01:00
Magnus Norddahl
6deb51f23c - disable the tonemapping to let it bloom instead 2018-01-27 00:42:17 +01:00
Magnus Norddahl
a6da1d356a - add PBR materials to main.fp 2018-01-27 00:22:15 +01:00
alexey.lysiuk
7206bfcfbc Made software fuzz shader compatible with supported OpenGL versions
Use array constructors because initializer list is a core feature since OpenGL 4.2
2018-01-26 09:53:31 +02:00
Magnus Norddahl
7a59bcde4c - move glossiness and specular level to GLDEFS 2018-01-25 19:53:55 +01:00
Magnus Norddahl
0855418475 Merge branch 'gzdoom' into materials
# Conflicts:
#	src/gl/shaders/gl_shader.cpp
#	src/gl/shaders/gl_shader.h
2018-01-25 19:21:19 +01:00
Magnus Norddahl
4c0dce875f Merge branch 'fuzz_software' into gzdoom 2018-01-25 19:00:14 +01:00
Magnus Norddahl
1875902414 - Do not flip the normal based on face direction 2018-01-23 23:59:58 +01:00
Magnus Norddahl
81c6808d2a - Add specular and normal map handling to main.fp 2018-01-23 23:10:28 +01:00
Magnus Norddahl
e045fb57c9 - Declare new textures for specular and pbr modes 2018-01-23 20:51:48 +01:00
Magnus Norddahl
a23e5f49f6 - Add "fuzz software" to GL that renders fuzz like the scaled fuzz mode in the software renderer 2018-01-07 02:29:55 +01:00
Magnus Norddahl
5f36b86013 - Add dynamic spot lights 2018-01-04 17:58:11 +01:00
Magnus Norddahl
c3562fead2 Merge branch 'dynlightmodels' 2017-08-15 00:27:26 +02:00
Magnus Norddahl
a6d4bfc748 - Added linear and nearest shadowmap filters (enabled with defines) 2017-08-13 13:49:02 +02:00
Magnus Norddahl
5c7b1ee8e1 - Significantly improve shadowmap light performance for faces with a large number of lights but where only a few applies to each individual fragment 2017-08-08 23:28:42 +02:00
Magnus Norddahl
65d5f4ae18 - Fix normal normalize 2017-07-27 22:31:57 +02:00