Magnus Norddahl
6363c6cf58
Add a shadowmap shader
2017-03-02 16:19:06 +01:00
Rachael Alexanderson
226e5238fc
Merge https://github.com/coelckers/gzdoom
2017-02-01 21:57:37 -05:00
alexey.lysiuk
1fd37ff2ff
Removed unused input from fog boundary fragment program
...
This should fix https://mantis.zdoom.org/view.php?id=151
2017-02-01 10:05:38 +02:00
Rachael Alexanderson
0c101102dc
Merge https://github.com/coelckers/gzdoom
...
# Conflicts:
# src/r_bsp.cpp
# src/r_main.cpp
# src/r_segs.cpp
# src/r_things.cpp
# wadsrc/static/language.enu
# wadsrc/static/menudef.txt
2017-01-28 17:39:55 -05:00
Christoph Oelckers
ee22a9371b
- use Doom64 colors on sectors and linedefs.
2017-01-28 20:44:46 +01:00
Christoph Oelckers
12d073a27d
- objectcolor stuff.
...
# Conflicts:
# src/gl/renderer/gl_renderstate.cpp
2017-01-28 19:06:21 +01:00
Magnus Norddahl
9c4b11b671
Add OpenGL ES support to Linux target and enable it for ARM devices
2017-01-25 07:18:26 +01:00
Rachael Alexanderson
a04699ec1c
Merge https://github.com/coelckers/gzdoom
2017-01-24 18:15:39 -05:00
Rachael Alexanderson
3154652885
- fixed possible AMD compilation error.
2017-01-24 22:24:53 +01:00
Rachael Alexanderson
9a777f719b
- Added "gl_bandedswlight" to reduce the software light emulation gradient to 32 levels.
2017-01-24 22:24:53 +01:00
Magnus Norddahl
057060022a
Merge remote-tracking branch 'gzdoom/master' into ssao
2016-11-27 09:59:57 +01:00
Rachael Alexanderson
b460ce31e8
Merge http://github.com/coelckers/gzdoom
2016-10-24 21:02:09 -04:00
Christoph Oelckers
bea625a42c
- added an ATTENUATE flag to dynamic lights, this is set by default for attached lights. For placed lights this is off, because it'd interfere with many existing maps that depend on unattenuated lights.
2016-10-23 20:42:48 +02:00
Magnus Norddahl
be2c50f11c
Merge remote-tracking branch 'gzdoom/master' into ssao
2016-10-21 23:48:30 +02:00
Magnus Norddahl
8b297221fe
Merge branch 'gl_swframebuffer' into qzdoom
2016-10-16 23:18:16 +02:00
Magnus Norddahl
f81d0d3964
macOS support and Intel driver bug fixes
2016-10-16 22:40:08 +02:00
Magnus Norddahl
2a0ab96341
Merge remote-tracking branch 'origin/ssao' into qzdoom
2016-10-13 18:12:56 +02:00
Magnus Norddahl
14c1a77f8a
Fix AmbientOcclusionColor bug where pixelpos was assumed to be in eye space coordinates
2016-10-13 18:08:04 +02:00
Magnus Norddahl
f5c069c759
Merge remote-tracking branch 'origin/gl_swframebuffer' into qzdoom
2016-10-11 14:54:18 +02:00
Magnus Norddahl
3c7d6234cb
Add wipes
2016-10-11 14:37:57 +02:00
Magnus Norddahl
01dc9de8d1
Misc bug fixes and performance improvements
2016-10-11 10:27:18 +02:00
Magnus Norddahl
682b040b97
OpenGL based software renderer hardware accel now works for most things
2016-10-11 00:03:46 +02:00
Magnus Norddahl
f4308b3184
Add glsl shader version of the d3d9 shaders and get enough of it working for it to boot without errors
2016-10-10 21:03:55 +02:00
raa-eruanna
2a7b902a0a
Merge http://github.com/coelckers/gzdoom
...
# Conflicts:
# src/gl/renderer/gl_renderer.cpp
2016-10-10 10:39:07 -04:00
Christopher Bruns
779e6acb7b
Create "final" two non-VR 3D modes: Column-interleaved and checkerboard.
2016-10-09 13:05:50 -04:00
Magnus Norddahl
1b7c42f45f
Multisampling ssao bug fixes and split linear depth to its own buffer
2016-10-09 06:17:48 +02:00
Magnus Norddahl
bb79dcb634
SSAO math bug fixes
2016-10-06 07:36:49 +02:00
Magnus Norddahl
00e72028ef
Add another gbuffer with normal data and make ssao pass use it
2016-10-05 07:57:27 +02:00
Magnus Norddahl
ecb57d6cd9
Merge remote-tracking branch 'gzdoom/master' into ssao
...
# Conflicts:
# src/gl/renderer/gl_renderer.cpp
# src/gl/scene/gl_scene.cpp
# src/gl/shaders/gl_shader.cpp
# wadsrc/static/language.enu
# wadsrc/static/menudef.zz
2016-10-04 00:01:03 +02:00
Christoph Oelckers
4eb5f10b02
- use normals to have proper light attenuation. So far only implemented for walls and flats. Models are planned but need some thinking about how to efficiently collect all required lights for an object.
2016-10-03 16:09:32 +02:00
alexey.lysiuk
c68aa2b241
Added FXAA post-processing
...
Implementation of Fast Approximate Anti-Aliasing is based on nVidia sample:
https://github.com/NVIDIAGameWorks/GraphicsSamples/tree/master/samples/es3-kepler/FXAA
2016-10-03 00:15:45 +02:00
Christopher Bruns
0240cdef18
Modulate row interleaved stereo 3d offset with window height parity, because gl_FragCoord.y approaches zero at the bottom, not the top of the window.
2016-10-02 16:10:58 -04:00
Christopher Bruns
fcbf9342d6
Compute row location using gl_FragCoord.
2016-10-02 16:10:39 -04:00
Christopher Bruns
460b653709
Row interlaced 3d might be working, at least in fullscreen 1920x1080 mode.
2016-10-02 16:10:21 -04:00
Magnus Norddahl
d774136282
Added SceneData texture as the second colorbuffer when rendering a scene and placed fog data into it
2016-09-25 00:22:32 +02:00
Magnus Norddahl
9af34bac69
Add gbuffer pass support to FShaderManager and FRenderState
2016-09-25 00:22:32 +02:00
Magnus Norddahl
0a8cc1b74c
Fix depth blur
2016-09-25 00:22:31 +02:00
Magnus Norddahl
24ab13f1ce
Fix stripes in the reconstructed normals due to down scaling
2016-09-25 00:22:31 +02:00
Magnus Norddahl
e025f6e54b
Mark portals in scene alpha channel for the SSAO pass
2016-09-25 00:22:31 +02:00
Magnus Norddahl
c7c0ffadb5
Move SSAO pass to be before translucent rendering
...
Fix depth sampling location when not using fullscreen scene
2016-09-25 00:19:16 +02:00
Magnus Norddahl
09bec67821
Resolve multisampling depth in shader
2016-09-25 00:19:16 +02:00
Magnus Norddahl
a246b58673
Change SSAO blur to be depth aware
2016-09-25 00:19:16 +02:00
Magnus Norddahl
723eb746f6
Add ssao random texture
2016-09-25 00:19:15 +02:00
Magnus Norddahl
9076d46261
Added SSAO pass
2016-09-25 00:19:15 +02:00
raa-eruanna
2339b18b01
Quick fix: prevents negative values being passed to pow.
2016-09-22 09:23:26 +02:00
raa-eruanna
72491049e0
Changes to the contrast/brightness/gamma formula for both hardware and shader gamma correction. Mainly makes a correction with the shader version where contrast/brightness being negative values would clip them inappropriately.
2016-09-22 09:23:25 +02:00
Magnus Norddahl
f7b6b1433c
Added exposure pass calculating the bloom/tonemap exposure based on what the eye is seeing
2016-09-22 09:13:32 +02:00
Magnus Norddahl
f2a3b8978d
Added declaration in the shader that was missing
2016-09-17 00:30:03 +02:00
Gaerzi
d99d43aeba
Fixes to fuzz shaders
2016-09-17 00:30:03 +02:00
Magnus Norddahl
dc39a006dc
Fix palette tonemap precision and compile error on Intel
2016-09-04 02:37:59 +02:00
Christoph Oelckers
589936f570
- draw the colormap blend after postprocessing, not before it.
...
- added colormap shader to postprocessing.
This replaces the in-place application of fullscreen colormaps if renderbuffers are active. This way the fully composed scene gets inverted, not each element on its own which is highly problematic for additively blended things.
2016-09-01 17:14:51 +02:00
Christoph Oelckers
3389a5a74e
- removed most of the specific options for legacy hardware and consolidated them in one variable (does not work yet.)
2016-09-01 11:52:52 +02:00
alexey.lysiuk
2f893af857
Fixed palette tonemap mode for OpenGL 2.x
2016-08-24 11:44:33 +03:00
Magnus Norddahl
25645d901e
Add Palette LUT tonemap mode
2016-08-23 09:18:18 +02:00
Christoph Oelckers
250be72939
- added handling for drawing with uniform vertices. It draws something but in the wrong place. Right now I have no idea what's happening...
2016-08-22 15:31:23 +02:00
Christoph Oelckers
7ba5acfb35
- added quad drawer interface so that this part can be done without altering a vertex buffer.
...
So far it's only the framework, the new code is not active yet.
2016-08-22 14:00:25 +02:00
Magnus Norddahl
0e2d9affb2
Make sure tonemap shader never takes the sqrt of a negative number
...
Fix bug where the old hardcoded exposure bias was still being used in the uncharted2 tonemap
2016-08-16 00:22:00 +02:00
Magnus Norddahl
a8d1197ea7
Make sure we never pass a negative value to pow, and optimize gamma uniform
2016-08-16 00:01:18 +02:00
Magnus Norddahl
210fce1193
Fix bloom shader missing its target
2016-08-14 09:05:50 +02:00
Christoph Oelckers
675822004d
- use static buffer data and a uniform to handle the texture positioning of the present shader.
...
That's again one less write access to the buffer. The uniform method was chosen because this way a buffer update can be completely avoided, and setting a single uniform is a lot cheaper and simpler to handle.
2016-08-08 16:06:02 +02:00
Magnus Norddahl
346badf25f
Moved state to FGLPostProcessState and merged vertex shaders
2016-08-06 11:51:08 +02:00
Magnus Norddahl
6fc7596d52
Fix aspect ratio and texture clipping in lens shader
2016-08-04 15:47:15 +02:00
Magnus Norddahl
6b9529d70f
Added lens distortion shader
2016-08-02 17:32:21 +02:00
Magnus Norddahl
7709db4bb0
Fix broken viewport/backbuffer location for WriteSavePic
2016-07-31 16:23:21 +02:00
alexey.lysiuk
7de242930a
Removed obsolete gamma correct shader used on macOS only
2016-07-30 15:30:35 +03:00
Magnus Norddahl
5849c83028
Added bloom and tonemap to menus
...
Added gl_renderbuffers CVAR that disables render buffers
Added patch shader support to FShaderProgram
Added OpenGL 2 fallback support to render buffers
2016-07-29 21:31:20 +02:00
Magnus Norddahl
0efee85bd8
Added tonemapping and sector based exposure control
2016-07-29 00:36:43 +02:00
Magnus Norddahl
69f52cc898
Added bloom shaders
2016-07-27 21:50:30 +02:00
Magnus Norddahl
aeb7df09de
Added hardware gamma option and improved window handling on Windows
2016-07-27 11:15:19 +02:00
Magnus Norddahl
669238db66
Fix Apple GLSL compile errors
2016-07-23 17:27:19 +02:00
Magnus Norddahl
c08fc8f5a8
Fix depth calculations for R_DoomLightingEquation and make it an exact match of what zdoom does
2016-07-23 17:27:19 +02:00
Christoph Oelckers
3334b28a02
- don't let the light go completely black with software-emulated lighting.
2016-05-04 14:30:10 +02:00
Christoph Oelckers
9f91fa8f43
- make the warp2 shader's formula match the software renderer's.
...
This fixes some jerkiness with vertical scrollers due to a bad sine period and makes the overall appearance of the effect what it was originally supposed to be. The old warp2 shader was not created by replicating the formula but by trial and error until it looked close enough.
A version of the old warp2 shader with a fixed sine period is still available as a custom hardware shader.
2016-05-04 13:47:40 +02:00
alexey.lysiuk
f9022f3054
Fixed compilation of gamma correction shader with particular OpenGL setup
2016-05-02 16:13:54 +03:00
alexey.lysiuk
333560086d
Calculate color values for gamma correction directly in shader
...
Gamma table texture is no longer needed
2016-05-02 11:24:42 +03:00
alexey.lysiuk
44b019413c
Implemented gamma correction in OS X native backend using shader effect
2016-05-02 10:04:09 +03:00
Christoph Oelckers
70bf649364
- added clip planes for line portals and mirrors. This should eliminate the remaining problems with some visible geometry in front of the portal, it is also necessary to handle sprite splitting across line portals properly.
2016-04-29 12:26:57 +02:00
Christoph Oelckers
21283b18f4
- preparations for using clip planes on line portals.
2016-04-29 01:48:06 +02:00
Christoph Oelckers
86f38475b0
- shaders for last commit.
2016-04-27 02:10:42 +02:00
Christoph Oelckers
f066457a48
- add shader patching to allow running the engine with GLSL 1.2.
...
- made some initial preparations for the shader-less fallback path.
2016-04-26 15:26:52 +02:00
Christoph Oelckers
fc38728309
- made some changes to the shaders to allow downpatching them to GLSL 1.2:
...
* disable the dynamic light code if no buffers are available
* added a duplicate of the getTexel function which cannot be patched without creating syntax problems.
* fixe int<->float conversion warning, which on some compilers may be an error.
2016-04-26 11:31:27 +02:00
Christoph Oelckers
a96d6ab072
Merge remote-tracking branch 'remotes/zdoom/master'
...
# Conflicts:
# src/g_level.cpp
# src/p_3dfloors.cpp
# src/p_lnspec.cpp
# src/p_saveg.cpp
# src/p_spec.cpp
# src/r_bsp.cpp
# src/r_data/r_interpolate.cpp
# src/r_data/r_translate.cpp
# src/r_data/sprites.cpp
# src/r_defs.h
# src/r_sky.h
# src/stats.h
# src/textures/texturemanager.cpp
# src/textures/textures.h
# src/version.h
# src/win32/fb_d3d9.cpp
# src/win32/hardware.cpp
# src/win32/i_system.cpp
# wadsrc/static/actors/doom/doomarmor.txt
# wadsrc/static/compatibility.txt
# wadsrc/static/language.enu
# wadsrc/static/mapinfo/common.txt
# wadsrc/static/menudef.txt
# wadsrc/static/xlat/eternity.txt
2016-03-01 18:50:45 +01:00
Randy Heit
55142078d8
Normalize line endings
2016-03-01 09:47:10 -06:00
Christoph Oelckers
fc57180d7e
- added necessary state to implement 3D light splitting using hardware clipping planes.
2016-01-30 23:01:11 +01:00
Christoph Oelckers
238990c871
don't leave any gaps in the used clip planes.
2016-01-27 12:32:39 +01:00
Christoph Oelckers
47db3252f4
- it's really not necessary to waste two clip planes for reflective surfaces because only one can be active at any time.
2016-01-27 12:30:55 +01:00
Christoph Oelckers
b45c88fc4f
- changed shaders.
2015-04-05 20:20:56 +02:00
Christoph Oelckers
020b02e073
- changed deprecated texture sampler access function names.
2014-11-28 12:28:45 +01:00
Christoph Oelckers
5638aab63c
- fixed: Even though the name REDISALPHA implies otherwise, this render mode still needs to respect a texture's alpha channel to ensure that things get rendered properly. Otherwise the SmoothEdges function cannot be used which is necessary to ensure that filtered textures look correct.
2014-10-26 21:17:29 +01:00
Christoph Oelckers
fd3128a164
- fixed: When changing enhanced nightvision mode the shaders need to have their fixed colormap state reset to ensure that the new settings get used.
...
- fixed: The shader code for handling special fixed colormaps did not use the color vertex attribute which was most evident with the 'shadow' render style on the spectre.
2014-10-05 09:40:36 +02:00
Christoph Oelckers
4682736585
- fixed: non-tiled mid textures on a fog boundary require some special clamping to be performed in the shader.
2014-09-21 11:08:17 +02:00
Christoph Oelckers
835dbe5bd0
- removed the 'layout' qualifier from the uniform buffer declaration. It's not really needed because the layout of a single vec4 array cannot possibly change, and Intel drivers are complaining for unknown reasons.
2014-09-20 09:10:01 +02:00
Christoph Oelckers
acf6c259d8
- changed the handling of alpha textures. The only special case they need is with palette-less textures and this can be handled far more easily and robustly with a predefined translation instead of passing another parameter through all the layers of the texture management code. This also fixes problems with paletted PNGs that get used as an alpha texture because the old method clobbered the image's palette.
2014-09-09 13:21:36 +02:00
Christoph Oelckers
d5633701b4
- swapped order of textures in burn shader to avoid some problems with the texture samplers.
...
- fixed: texture sampler state for the burn texture was never set.
2014-09-09 10:17:44 +02:00
Christoph Oelckers
b96dd6c421
- fixed: The missing fourth component of the texture coordinate must be filled with 1.0, not 0.0 before applying the texture matrix. Not doing so will cancel out the translation part of the matrix.
2014-09-02 10:31:48 +02:00
Christoph Oelckers
a8e9c1832f
- decided to restrict the 2.0 beta to OpenGL 4.x with GL_ARB_buffer_storage extension and removed all code for supporting older versions.
...
Sadly, anything else makes no sense.
All the recently made changes live or die, depending on this extension's presence.
Without it, there are major performance issues with the buffer uploads. All of the traditional buffer upload methods are without exception horrendously slow, especially in the context of a Doom engine where frequent small updates are required.
It could be solved with a complete restructuring of the engine, of course, but that's hardly worth the effort, considering it's only for legacy hardware whose market share will inevitably shrink considerably over the next years.
And even then, under the best circumstances I'd still get the same performance as the old immediate mode renderer in GZDoom 1.x and still couldn't implement the additions I'd like to make.
So, since I need to keep GZDoom 1.x around anyway for older GL 2.x hardware, it may as well serve for 3.x hardware, too. It's certainly less work than constantly trying to find workarounds for the older hardware's limitations that cost more time than working on future-proofing the engine.
This new, trimmed down 4.x renderer runs on a core profile configuration and uses persistently mapped buffers for nearly everything that is getting transferred to the GPU. (The global uniforms are still being used as such but they'll be phased out after the first beta release.
2014-08-01 22:42:39 +02:00
Christoph Oelckers
7967082e60
- use the light buffer to handle dynamic lighting.
2014-08-01 20:59:39 +02:00
Christoph Oelckers
ef8f66c9a1
- removed the code for hardware alpha testing again because it didn't work anymore with how things are set up now.
...
- we need to check all GL versions when trying to get a context because some drivers only give us the version we request, leaving out newer features that are not exposed via extension.
- added some status info about uniform blocks.
2014-07-30 23:13:16 +02:00
Christoph Oelckers
754c96a540
- added default precision settings to shader include because some old ATI drivers complain if they aren't there - even though the spec doesn't require them...
2014-07-27 16:09:47 +02:00
Christoph Oelckers
eb9d2d9917
- reactivate compatibility profile so that immediate mode drawing can be used on older hardware not supporting persistently mapped buffers.
...
- reactivate alpha testing per fixed function pipeline
- use the 'modern' way to define clip planes (GL_CLIP_DISTANCE). This is far more portable than the old glClipPlane method and a lot more robust than checking this in the fragment shader.
2014-07-17 02:37:18 +02:00