Commit graph

209 commits

Author SHA1 Message Date
Magnus Norddahl
ae532d88ee - fix distance attenuation for PBR materials 2018-10-17 09:36:01 +02:00
Magnus Norddahl
770c676ac9 - add gl_dither for toggling dithered output on and off
# Conflicts:
#	src/gl/renderer/gl_postprocess.cpp
#	src/gl/renderer/gl_stereo3d.cpp
#	src/hwrenderer/postprocessing/hw_presentshader.h
2018-10-09 21:57:14 +02:00
Rachael Alexanderson
5d7411dd56 - change 'halfstep' in the dither shader to a #define 2018-10-09 13:23:22 +02:00
Rachael Alexanderson
c784411b13 - expand the dither matrix from 4x4 to 8x8 2018-10-09 13:23:21 +02:00
Rachael Alexanderson
d5f71ad3ce - further math tweaks 2018-10-09 13:23:07 +02:00
Rachael Alexanderson
213b33de16 - fix up a bit of math on the dither shader 2018-10-09 13:22:54 +02:00
Magnus Norddahl
60ae0915b9 - add dithering to present shader 2018-10-09 13:22:31 +02:00
Rachael Alexanderson
787638ff5f - always enforce a minimum distance for fog when fogmode is set to standard. without this, it was possible for the GPU to error out and stop rendering pixels for certain screen blocks
# Conflicts:
#	wadsrc/static/shaders/glsl/main.fp
2018-10-09 11:56:41 +02:00
Magnus Norddahl
811bd578cd - fix artifact in PCF filter when the texture coordinate wraps 2018-10-05 22:25:11 +02:00
Magnus Norddahl
33180fd4e8 - remove shadow acne from PCF shadowmap filter and add three quality levels 2018-10-05 10:20:02 +02:00
Magnus Norddahl
8997d5effb - fix the nearest shadow map filter to have no shadow acne and replace linear with nearest in the menu 2018-10-04 19:27:20 +02:00
Magnus Norddahl
7124ba8216 - add some comments to shadowmap.fp 2018-10-04 19:24:22 +02:00
Magnus Norddahl
9ad56a9f66 - fix diagonal linear shadow map artifact 2018-10-04 19:24:12 +02:00
Christoph Oelckers
24d09fe56a - some tweaking of shadowmap filter setting to allow changing the PCF filter's number of samplings.
# Conflicts:
#	src/gl/system/gl_cvars.h
#	src/gl/system/gl_menu.cpp
2018-10-04 19:19:56 +02:00
drfrag666
58b7967eea - 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.
(refactored patch by Graf)
2018-10-04 19:08:49 +02:00
Magnus Norddahl
f9f81cdb32 - clamp the software light to never get brighter than the initial light level 2018-09-23 21:00:51 +02:00
Magnus Norddahl
9c74c9629a - rewrite the user shader support for materials - new syntax is to create a 'Material ProcessMaterial()' function
# Conflicts:
#	src/gl/shaders/gl_shader.cpp
#	src/hwrenderer/textures/hw_material.cpp
#	src/r_data/gldefs.cpp
#	wadsrc/static/shaders/glsl/main.fp
2018-08-20 01:22:34 +02:00
drfrag666
1b7312c0d0 Revert "- check light direction in the shader."
This reverts commit e9f7383279.

It was not needed in the old version.
2018-05-25 20:38:26 +02:00
Christoph Oelckers
b3da533033 - 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

(cherry picked from commit cce6c9a085)
2018-05-24 20:45:17 +02:00
Christoph Oelckers
3703132794 - fixed shader compilation.
(cherry picked from commit 1266339c0f)
2018-05-23 10:22:12 +02:00
Christoph Oelckers
e9f7383279 - 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.

(cherry picked from commit 3dc6ddbcc3)
2018-05-23 10:22:11 +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
Magnus Norddahl
2000784307 - normalize the normal vector in the vertex shader because our vertex attribute uses a low precision format (10 bits) 2017-07-25 20:20:13 +02:00
Rachael Alexanderson
8d3d271484 - tweaked the banded software lightmode shader a bit more, looks a little closer (but still not quite...) to real ZDoom in paletted mode 2017-07-21 18:45:08 -04:00
Rachael Alexanderson
e1b4bb11ba Merge https://github.com/coelckers/gzdoom 2017-07-09 20:09:12 -04:00
Magnus Norddahl
ddd1b629c3 - Calculate globvis/r_visibility in r_utility and use it in GL and poly renderers 2017-07-09 19:01:34 +02:00