Commit graph

15 commits

Author SHA1 Message Date
lawnjelly
ed3d029f5d GLES2 / GLES3 - Use gl_FragColor temporary
On some hardware, modifying gl_FragColor multiple times can cause large performance drops. This PR writes to a standard temporary variable instead, and copies across to gl_FragColor once only at the end of the fragment shader.

This could potentially lead to large gains in performance on affected hardware.
2023-11-07 11:53:25 +00:00
Alex Nogueira
01d0b9ad15 Fixed Whitescreen Issue in GLES2.0 Glow Setting
Replaced textureLod with texture2DLod in the tonemapping.glsl shader file.
2023-03-15 18:13:57 +01:00
clayjohn
f1bafe8131
Take FXAA samples from half-pixel coordinates to improve quality
(cherry picked from commit dbcc0fa2a6)
2022-11-30 15:39:00 +01:00
clayjohn
f92141be13 Disable Alpha throughout Glow and FXAA code in order to avoid issues with transparent viewports 2022-05-26 11:15:35 -07:00
clayjohn
9927515254 Disable alpha in post process when using opaque framebuffer 2022-05-24 14:11:09 -07:00
clayjohn
3374bae953 Fixed Bug where DoF incorrectly wrote to alpha channel amd bug with tonemap shaders 2022-05-18 13:19:42 -07:00
Kinwailo
b1a50ad805 fix post procressing with transparent bg and keep alpha channel of the tonemap shader output 2022-05-12 16:32:31 +08:00
Rémi Verschelde
42d385b312
clang-format: Disable alignment of operands, too unreliable
Sets `AlignOperands` to `DontAlign`.

`clang-format` developers seem to mostly care about space-based indentation and
every other version of clang-format breaks the bad mismatch of tabs and spaces
that it seems to use for operand alignment. So it's better without, so that it
respects our two-tabs `ContinuationIndentWidth`.
2021-10-28 13:23:38 +02:00
Hugo Locurcio
a9c0c5484f
Add support for contrast-adaptive sharpening in 3D (GLES3 only)
This is an older, easier to implement variant of CAS as a pure
fragment shader. It doesn't support upscaling, but we won't make
use of it (at least for now).

The sharpening intensity can be adjusted on a per-Viewport basis.
For the root viewport, it can be adjusted in the Project Settings.

Since `textureLodOffset()` isn't available in GLES2, there is no
way to support contrast-adaptive sharpening in GLES2.
2021-06-21 15:37:31 +02:00
Hugo Locurcio
af45c97652
Add fast approximate antialiasing (FXAA) to Viewport
This backports FXAA from the `master` branch.

Co-authored-by: Clay John <claynjohn@gmail.com>
2020-10-20 14:54:52 +02:00
clayjohn
ea1b8d8435 Fix glow on devices with only 8 texture slots 2020-09-30 22:28:20 -07:00
clayjohn
82f63633d1 Implement DOF blur, Glow, and BCS in GLES2 2019-09-30 08:04:31 -07:00
Rémi Verschelde
4226d56ca9 Style: Enable clang-format on GLSL shaders
As of clang-format 6.0.1, putting the `/* clang-format off */` hint
around our "invalid" `[vertex]` and `[shader]` statements isn't enough
to prevent a bogus indent of the next comments and first valid statement,
so we need to enclose that first valid statement in the unformatted chunk.
2018-08-27 07:34:14 +02:00
Rémi Verschelde
e68b96928b Style: Fix code formatting in GLES2 shaders 2018-08-24 14:50:59 +02:00
karroffel
eac4c984df add GLES 2 renderer for 2D
This commit adds a new rendering backend, GLES2, and adds a
project setting to enable it.

Currently this backend can only be used on the X11 platform,
but integrating into other platforms is planned.
2018-03-01 15:12:30 +01:00