Kevin Caccamo
758cd77e55
Rename ColorAdd to AddColor, and use it ingame
...
Rename ColorAdd to AddColor
Add AddColor to FRenderState
Tweak SpecialColors array in ZScript to include the additive color
Add uAddColor to the shader compiler
Add uAddColor to the texel
2018-12-26 16:58:27 +01:00
Magnus Norddahl
0c4602507e
- remove shadow acne when dynlights perfectly align with planes
2018-12-23 15:13:38 +01:00
Magnus Norddahl
bc648015c7
- vWorldNormal is not normalized but R_DoomColormap requires this
2018-12-19 11:07:39 +01:00
Magnus Norddahl
f1fe9a0286
- fix vanilla light mode angle calculation
2018-12-15 10:02:57 +01:00
Magnus Norddahl
3af6ae4b37
- add vanilla lightmode that behaves exactly as Doom's original light did
2018-12-15 07:11:28 +01:00
Christoph Oelckers
f2dcff4386
- more options for Doom 64 style gradients on walls:
...
* Colors can npw be defined per sidedef, not only per sector.
* Gradients can be selectively disabled or vertically flipped per wall tier.
* Gradients can be clamped to their respective tier, i.e top and bottom of the tier, not the front sector defines where it starts.
The per-wall colors are implemented for hardware and softpoly renderer only, but not for the classic software renderer, because its code is far too scattered to do this efficiently.
2018-11-11 16:04:36 +01: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
Rachael Alexanderson
3d81be1517
- 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
2018-10-09 04:45:23 -04:00
Magnus Norddahl
8ea74770fd
- fix artifact in PCF filter when the texture coordinate wraps
2018-10-05 21:30:16 +02:00
Magnus Norddahl
6135e867a9
- remove shadow acne from PCF shadowmap filter and add three quality levels
2018-10-05 04:36:11 +02:00
Magnus Norddahl
cd520a6528
- fix the nearest shadow map filter to have no shadow acne and replace linear with nearest in the menu
2018-10-04 15:33:07 +02:00
Magnus Norddahl
36946a47fe
- fix diagonal linear shadow map artifact
2018-10-04 00:46:17 +02: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
86c7e87767
Merge branch 'master' of https://github.com/coelckers/gzdoom
2018-09-29 12:59:11 +02:00
Magnus Norddahl
3b8b312fae
- clamp the software light to never get brighter than the initial light level
2018-09-23 17:58:17 +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
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
124fe63d00
Merge branch 'master' into modern
2018-07-14 10:24:41 +02:00
alexey.lysiuk
c29651da95
- restored initial grayscale conversion in fragment shader
...
Accidental change of red color multiplier was discovered during investigation of https://forum.zdoom.org/viewtopic.php?t=61126
2018-07-02 17:31:48 +03: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
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
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
Christoph Oelckers
286846a8ec
2D must consider brightmaps.
2018-04-27 08:59:59 +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
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
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
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
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
Magnus Norddahl
7a59bcde4c
- move glossiness and specular level to GLDEFS
2018-01-25 19:53:55 +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
5f36b86013
- Add dynamic spot lights
2018-01-04 17:58:11 +01: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
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
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
Rachael Alexanderson
1562d64580
- fixed: in the availability of gl_fogmode == 0, default to having square fog instead of radial fog in gl_lightmode == 8
2017-06-25 09:37:14 -04:00
Magnus Norddahl
b6e035e796
- Implemented radial fog support in software light mode
2017-06-25 15:02:34 +02:00