1
0
Fork 0
Commit Graph

2680 Commits

Author SHA1 Message Date
lawnjelly 76bdc0695d `BlobShadows` - Fix `GLES3` shader builtin
The `BLOB_SHADOW` builtin wasn't registered with the shader compiler for GLES3.
2025-11-14 10:52:39 +00:00
lawnjelly dedf461674 Add blob shadows feature
BlobShadow node (sphere or capsule)
BlobFocus
Backends for GLES2 and GLES3
2025-10-01 06:37:54 +01:00
lawnjelly 9b104b3bb8 `Batching` - Fix `MultiRect` casting to wrong type 2025-07-30 07:17:42 +01:00
Pāvels Nadtočajevs 30cb6ec66e
[Windows] Rename `PKEY_Device_FriendlyName` to avoid duplicate symbols with newer MinGW SDKs.
(cherry picked from commit c363e13051)
2025-06-23 18:59:35 +02:00
lawnjelly aec5bf47dd Optimize hotspots with `Object::derives_from` 2025-06-23 09:15:24 +01:00
Julian Todd 060b6bcd28 Initialize pa_buffer_attr.maxlength to -1
(cherry picked from commit b5622e9f78)
2025-06-13 18:41:27 +01:00
lawnjelly 0758ad0612 Add GLOBAL_GET cached macros.
GLOBAL_GET is an expensive operation which should not be used each frame / tick.
This PR adds macros which do a cheaper revision check, and only call the expensive GLOBAL_GET when project settings have changed.

Co-authored-by: Lukas Tenbrink <lukas.tenbrink@gmail.com>
2025-03-18 16:28:40 +00:00
lawnjelly 4c930bb338 Ameliorate performance regression due to directional shadow `fade_start` 2024-11-22 13:04:42 +00:00
Yuri Rubinsky 5d1e7e509d [3.x] Implement glow map effect 2024-09-24 20:47:32 +03:00
Mert Kasar 5543f56ce2 Fix SSR warp when using orthogonal camera 2024-07-11 20:38:06 +03:00
lawnjelly ecd0680b11 Fix fragcolor write locations in scene shaders 2024-05-20 19:31:38 +01:00
Rémi Verschelde dc776e46b6
Merge pull request #60246 from Calinou/directional-light-add-fade-start-3.x
[3.x] Backport DirectionalLight `fade_start` property
2024-02-07 09:49:21 +01:00
Rémi Verschelde 991e922877
Merge pull request #86786 from lawnjelly/calinou_sdf_fixed
[3.x] Fix signed distance field font rendering
2024-02-07 09:40:59 +01:00
Rémi Verschelde 2a1917482a
Merge pull request #86744 from Listwon/custom-shader-compilation-determinism
[3.x] Prevent shuffling custom shader functions (shader cache requires determinism)
2024-02-07 09:40:36 +01:00
lawnjelly bc607fb607 Fix signed distance field font rendering
This fix works in both GLES3 and GLES2.

The rendering formula in the shader was adjusted to further improve the
sharpness/antialiasing quality balance.

Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
2024-02-05 17:50:33 +00:00
Rémi Verschelde 30b81a4bd9
Merge pull request #84529 from lawnjelly/gles2_gl_fragcolor
[3.x] GLES2 & GLES3 - Use `gl_FragColor` temporary
2024-01-29 23:28:19 +01:00
Rémi Verschelde dfb03a3956
Merge pull request #87272 from halotroop2288/patch-3
[3.x] Fix `#if *_ENABLED` inconsistencies, should check if defined
2024-01-17 13:47:09 +01:00
Caroline Joy Bell 9c0bd332a5
Fix `#if *_ENABLED` inconsistencies, should check if defined
Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2024-01-17 10:21:40 +01:00
Alessandro Famà 61b1e2e83f [3.x] Fix Dummy audio driver initialization issue on WASAPI output device initialization failure 2024-01-16 18:40:56 +01:00
Bartłomiej T. Listwon 73793ab89c Prevent shuffling custom shader functions (shader cache requires determinism) 2024-01-03 13:12:48 +01:00
Rémi Verschelde 2ae9c57a0e
Merge pull request #86040 from lawnjelly/new_batch_warning
[3.x] Workaround GCC warning in `rasterizer_canvas_batcher`
2023-12-11 20:02:11 +01:00
lawnjelly 64ab7488db Workaround GCC warning in `rasterizer_canvas_batcher`
`-Werror=array-bounds` flags when creating a new batch, possibly due to the possibility of the malloc failing (out of memory).
This PR adds an explicit `CRASHNOW` in the hope the compiler will recognise this case is not intended to be recoverable.
2023-12-11 17:45:30 +00:00
Rémi Verschelde 02e4e208ef
Fix various GCC 13 warnings
Fixes occurrences of `-Wtype-limits`, `-Wmaybe-uninitialized`,
`-Wduplicated-branches`.
2023-12-08 15:32:59 +01:00
Hugo Locurcio 4fefb136ea
Backport DirectionalLight `fade_start` property to `3.x`
- Implement shadow fading when using the Orthogonal shadow mode
  (like in `master`).

This allows customizing the distance at which directional shadows
start to fade away. Shadow fading will also always start at the same
distance now, regardless of the current shadow mode in use.

This is useful for enclosed levels to prevent shadows from fading
at all with a well-tuned maximum distance.

The default fade start value (0.8) results in fading happening later
in the distance compared to the previous behavior, where fading started
from the last shadow split distance (0.6 in PSSM 4 Splits and
0.1 in PSSM 2 Splits).
2023-11-20 12:41:55 +01:00
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
lawnjelly 6ff370030a Fix glGet overflows by using 64 bit versions
Certain glGet operations require 64 bit versions according to the GLES spec.
The previous code was susceptible to overflow bugs,  especially running under ANGLE.
2023-10-16 13:47:11 +01:00
Rémi Verschelde 5f9cbe514d
Merge pull request #75468 from Ansraer/four_is_overkill
[3.x] Add support for 3 dir shadow splits
2023-10-01 22:50:57 +02:00
kobewi 6e4cee09dc
Add mono audio support to WASAPI
(cherry picked from commit 8d010b44c1)
2023-08-28 17:27:15 +02:00
lawnjelly 857d884026 Initialize `GLWrapper` earlier in `Storage::initialize()`
Make sure `GLWrapper` is initialized before `glActiveTexture` is called by other parts of the storage initialize(), to prevent benign warnings.
2023-08-21 08:51:47 +01:00
Rémi Verschelde 98976f9260
Merge pull request #80652 from Benedani/3.x_fix_gles2_skinning
[3.x] GLES2: Make GPU skinning more consistent with GLES3
2023-08-16 17:14:22 +02:00
Rémi Verschelde dcb097c7a1
Merge pull request #80481 from lawnjelly/clay_unbind_textures
[3.x] Unbind texture slots when changing framebuffer
2023-08-16 17:13:56 +02:00
The Benedani a66e8a29a7 GLES2: Make GPU skinning more consistent 2023-08-15 12:59:39 +02:00
Rémi Verschelde c685501f51
Merge pull request #80325 from lawnjelly/fti2d_check_skel_attach
[3.x] Hierarchical culling - Add extra check to `skeleton_attach_canvas_item`
2023-08-15 09:04:09 +02:00
lawnjelly 5e197fd21e Unbind texture slots when changing framebuffer
Prevent bugs whereby texture still in use.
2023-08-12 11:07:13 +01:00
Rémi Verschelde 75f427b8af
Merge pull request #80294 from Birdulon/PAlatency
[3.x] PulseAudio: Remove `get_latency()` caching
2023-08-08 14:28:45 +02:00
lawnjelly d7cca42ef6 Hierarchical culling - Add extra check to skeleton_attach_canvas_item
Although this check shouldn't be able to fail currently, it provides a small level of extra logic checking at only small cost in DEV builds.
2023-08-06 10:03:49 +01:00
Luke Hubmayer-Werner d90626f583 PulseAudio: Remove get_latency() caching 2023-08-05 20:25:06 +09:30
lawnjelly ad577e3c7e Fix 2D MultiMesh hierarchical culling
Fixes updating local bounds for MultiMeshes used in canvas items by introducing a back link.
2023-08-03 06:49:01 +01:00
Fabio Alessandrelli c783dd4a52 [Net] Explicitly handle buffer errors in send/recv 2023-07-19 19:17:19 +02:00
lawnjelly 43e181a00a Single Compilation Unit build.
Adds support for simple SCU build.
This speeds up compilation by compiling multiple cpp files within a single translation unit.
2023-07-02 20:13:16 +01:00
Rémi Verschelde 29eeb461f2
Merge pull request #68738 from lawnjelly/faster_canvas_item
[3.x] Canvas item hierarchical culling
2023-06-27 08:40:22 +02:00
Rémi Verschelde d644de8088
Merge pull request #76226 from paddy-exe/fix-node-position-view-3.x
[3.x] Fix `NODE_POSITION_VIEW` shader built-in
2023-06-07 14:46:24 +02:00
lawnjelly b777a9e5f9 Canvas item hierarchical culling
Adds optional hierarchical culling to the 2D rendering (within VisualServer).

Each canvas item maintains a bound in local space of the item itself and all child / grandchild items. This allows branches to be culled at once when they don't intersect a viewport.
2023-04-25 20:17:33 +01:00
Aaron Franke 141783d90f
[3.x] Expose `determinant` in Transform2D, rename internal method 2023-04-22 13:47:47 -05:00
Patrick 67d3fe4075 [3.x] Fix NODE_POSITION_VIEW Shader Built-In 2023-04-18 22:11:41 +02:00
Rémi Verschelde 4c5a934408
Merge pull request #68960 from lawnjelly/multirect
Batching - Add MultiRect command
2023-04-17 17:25:20 +02:00
Ansraer 54bc6a300e add support for 3 dir shadow splits 2023-03-29 13:40:17 +02: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
lawnjelly 910ddd13c4 Batching - Add MultiRect command
Large groups of similar rects can be processed more efficiently using the MultiRect command. Processing common to the group can be done as a one off, instead of per rect.

Adds the new API to VisualServerCanvas, and uses the new functionality from Font, BitmapFont, DynamicFont and TileMap, via the VisualServerCanvasHelper class.
2023-03-10 10:58:04 +00:00
Ansraer 0227fcc4cc fix shadows pass viewport calculation 2023-03-07 11:22:05 +01:00