Commit Graph

121 Commits

Author SHA1 Message Date
4bb48a4a5c Ported from godot4: Fix reading Unicode from stdio.
- bruvzg
3d8a942a56
2023-08-05 20:33:48 +02:00
834cbe8cef Ported: Single Compilation Unit build.
Adds support for simple SCU build.
This speeds up compilation by compiling multiple cpp files within a single translation unit.
- lawnjelly
43e181a00a
2023-07-11 16:07:36 +02:00
5b869f8b54 Ported from godot: 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.
- lawnjelly
b777a9e5f9
2023-06-28 20:25:48 +02:00
c46c527f01 Backported: [3.x] Fix NODE_POSITION_VIEW Shader Built-In
- paddy-exe
67d3fe4075
2023-06-11 09:38:19 +02:00
552226ab5d Backported: Backport spatial shader built-ins
Backport of this PR: godotengine#63597
This adds these as new Built-Ins to Spatial Shaders
* Object's Position in World Space
* Camera Position in World Space
* Camera Direction in World Space
* Object's Position in View Space
- paddy-exe
be3d331f26
2023-06-11 09:37:10 +02:00
1263101396 Ported: 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.

- lawnjelly

910ddd13c4
2023-04-20 23:09:37 +02:00
43d1126b73 Ported: fix shadows pass viewport calculation.
([3.x] Fix shadows when using 2 directional lights)
- Ansraer
0227fcc4cc
2023-03-12 19:48:33 +01:00
79842beb9a Ported: Expose OS.read_string_from_stdin() to the scripting API
This can be used in scripts to read user input in a blocking manner.
This also removes the unused `block` argument, which is always `true`.
- Calinou
badcfa2523
2023-02-07 01:07:31 +01:00
30d7a3c5a7 Backported: GLES2 fix octahedral half float unpacking
The strides in _unpack_half_floats() were incorrectly calculated in the case where octahedral normals and tangents were in use.
- lawnjelly
c6a428b3d6
2023-02-07 01:01:48 +01:00
2cd4e4d828 Renamed Set to RBSet. 2023-01-15 19:42:08 +01:00
1b0aac6028 Renamed Map to RBMap. 2023-01-15 19:12:50 +01:00
91e598aa7b Ported: SCons: Cleanup DEBUG, _DEBUG and NDEBUG defines
- `_DEBUG` is MSVC specific so it didn't make much sense to define for
  Android and iOS builds.
- iOS was the only platform to define `DEBUG`. We don't use it anywhere
  outside thirdparty code, which we usually don't intend to debug, so it
  seems better to be consistent with other platforms.
- Consistently define `NDEBUG` to disable assert behavior in both `release`
  and `release_debug` targets. This used to be set for `release` for all
  platforms, and `release_debug` for Android and iOS only.
- Due to the above, I removed the only use we made of `assert()` in Godot
  code, which was only implemented for Unix anyway, should have been
  `DEV_ENABLED`, and is in PoolAllocator which we don't actually use.
- The denoise and recast modules keep defining `NDEBUG` even for the `debug`
  target as we don't want OIDN and Embree asserting all over the place.
- akien-mga
b0b759e6da
2022-12-22 17:42:54 +01:00
norrath-hero
e1081d3d33 Fix GLES 2 Spotlight Bug
Fixes https://github.com/godotengine/godot/issues/69759
Fixes https://github.com/godotengine/godot/issues/54343
Fixes https://github.com/godotengine/godot/issues/25526
2022-12-22 14:38:33 +01:00
827638bfe0 Revert "Take FXAA samples from half-pixel coordinates to improve quality"
This reverts commit 8f0e3af2a2.
2022-12-11 19:28:05 +01:00
Ibrahn Sahir
1aa0c81dc1 Fix MIDI input with ALSA.
Reworked the handling of ALSA RawMidi input to support:
- Running Status.
- RealTime Category messages arriving during other messages data.
- Multiple connected RawMidi interfaces.

(cherry picked from commit 81575174cbd99b4d1cedbe763d1df7cbc7e641c6)
2022-12-11 19:09:17 +01:00
nikitalita
90a8cad6ed Fix DirAccessWindows::make_dir() choking on ".."
`CreateDirectoryW()` chokes on absolute paths that contain `..`
example: "C:\\workspace\\..\\games\\assets"
Simplifying the path before creating the dir fixes this.

(cherry picked from commit 0d3d5ac76983de35b8c1dddd65a4c2f8be74d555)
2022-11-30 19:27:06 +01:00
clayjohn
8f0e3af2a2 Take FXAA samples from half-pixel coordinates to improve quality
(cherry picked from commit dbcc0fa2a60edb3f3e69b0b73e7c9c612872559e)
2022-11-30 19:09:24 +01:00
dzil123
298be38336 Fix shader compiler asan out of bounds 2022-11-30 14:34:44 +01:00
31491c78bc Add back missing line. 2022-09-17 00:23:56 +02:00
lawnjelly
19dc79114d Prevent drawing MultiMesh with zero instance count
Issuing a driver drawcall for MultiMesh with zero instances crashes some drivers.
2022-09-17 00:22:17 +02:00
lawnjelly
0dc54e449a Fix GLES directional shadow uninitialized data
Valgrind shows directional_shadow.fbo accessed when uninitialized in directional_shadow_create.
2022-09-16 23:33:38 +02:00
lawnjelly
a39a25694d Batching - fix uninitialized color read
Valgrind was showing a read from uninitialized memory. r_fill_state.curr_batch->color is unset (for performance reasons), so can contain random data.

This actually doesn't matter in practice, since logically this uninitialized state can only occur when change_batch is set, and the only side effect is that change_batch is set. Hence why no bugs occur in practice.

This PR prevents this read from uninitialized data. It is likely free in terms of performance after optimization, and keeps the Valgrind logs clearer, so why not.
2022-09-16 23:30:31 +02:00
bitsawer
fefc436645 Fix Windows list dir handle leak
(cherry picked from commit 40325006b6c08c32b3db9dfd901e54d44b9d4dc3)
2022-09-16 21:11:55 +02:00
e24cb96418 Fix compile. 2022-09-16 13:05:22 +02:00
Pedro J. Estébanez
9db0cca2d9 Make audio thread control flags safe 2022-09-16 12:57:59 +02:00
e4ae7f2ebc Renamed Environment to Environment3D, and WorldEnvironment to WorldEnvironment3D. 2022-08-29 17:21:40 +02:00
e2d42db711 Also renamed the files. 2022-08-19 21:24:36 +02:00
cffe742085 Renamed the VisualServer to RenderringServer like in Godot4, as I think it's a lot better name for it. I did not yet rename the files. 2022-08-19 20:50:20 +02:00
f1619cad4f Ported: Add hint_transparent to use a transparent black placeholder texture - Calinou
ab9a95f266
2022-08-19 02:57:42 +02:00
Fabio Alessandrelli
63fbffd4ee IP uses print_verbose when getaddrinfo fails.
Avoid spamming errors when network is disconnected.
Returned address will be invalid, so it can be checked by the user via
`ret.is_valid_ip_address`.

(cherry picked from commit 59eea34851ef3b71bd9df4258f589d2c9681f5a7)
2022-08-19 02:13:06 +02:00
9757c39f05 Moved a few more core classes. 2022-08-17 17:43:49 +02:00
686663d3e4 Moved around more classes in core. 2022-08-17 16:01:01 +02:00
04feb63860 Moved Engine and projectSettings. 2022-08-17 15:35:28 +02:00
220b2db443 Moved String and related classes under a string folder in core. 2022-08-17 14:19:55 +02:00
9555ee56b9 Moved Variant related classes under a variant folder in core. 2022-08-17 13:17:12 +02:00
388b88678e Moved container related classes in core under a new containers directory. 2022-08-17 12:53:49 +02:00
8c2e76840c Removed CameraMatrix, and switched to Projection. 2022-08-16 10:26:35 +02:00
220954cf08 Backported most of the improvements to String from Godot4. 2022-08-15 22:54:03 +02:00
5cd44e02d0 Backported the improvements to Transform from Godot4. 2022-08-14 20:35:11 +02:00
e4cad690a3 Renamed elements in Transform2D to columns. 2022-08-14 15:37:05 +02:00
d9e094ab9a Renamed elements in Basis to rows. 2022-08-13 19:07:59 +02:00
730bce8587 Renamed Quat to Quaternion for consistency with the other engine math classes. 2022-08-13 15:22:33 +02:00
2e628b7fa8 Ported: Fix skeleton 2D stale bounding rect
Adds special logic for handling skeleton bounding rect updates. Previously these were never being updated because the canvas item is never set to "rect_dirty".
-lawnjelly
18bb668a2e
2022-08-07 16:01:27 +02:00
bb323b5bee Fixed lights. 2022-07-31 01:32:43 +02:00
31136b3669 Ported: Document support limitations for OmniLight cubemap shadows in GLES2 - Calinou
b03ceaba2f
2022-07-29 22:11:41 +02:00
9d76074b58 Ported: Add full support for Android scoped storage.
This was done by refactoring directory and file access handling for the Android platform so that any general filesystem access type go through the Android layer.
This allows us to validate whether the access is unrestricted, or whether it falls under scoped storage and thus act appropriately.
- m4gr3d
24e3b3b88d
2022-07-29 19:24:07 +02:00
44fd82b0b2 Ported: SCons: Properly track codegen script dependency for generated GLES headers - akien-mga
772d071863
2022-07-29 16:44:33 +02:00
152f9728b0 Ported: [Windows, 3.x] Add support for handling network share paths. - bruvzg
11a7997a67
2022-07-28 19:33:43 +02:00
06036225f4 Ported: More low priority redraw request cases
Some more cases of textures etc causing continuous updates in vital updates only mode are fixed.
- lawnjelly
f8df04ed50
2022-07-28 19:15:06 +02:00
84a5cc0fca Fix typo. 2022-07-28 18:44:49 +02:00
3f432af82b Ported: Disable Alpha throughout Glow and FXAA code in order to avoid issues with transparent viewports. - clayjohn
f92141be13
2022-07-28 11:34:02 +02:00
42b0cd29ab Ported: Disable alpha in post process when using opaque framebuffer - clayjohn
9927515254
2022-07-28 11:11:23 +02:00
942c23af34 Pported: Disable writing to alpha with opaque framebuffer - clayjohn
027ec28126
2022-07-28 11:02:41 +02:00
b0894431a2 Ported: Fixed Bug where DoF incorrectly wrote to alpha channel amd bug with tonemap shaders. - clayjohn
3374bae953
2022-07-27 19:47:50 +02:00
b75b256d7f Ported: fix post procressing with transparent bg and keep alpha channel of the tonemap shader output. - Kinwailo
b1a50ad805
2022-07-27 18:11:54 +02:00
clayjohn
e01c60516b Unpack blend shape arrays when necessary
Blend shapes need to be unpacked if the vertex array is being unpacked
2022-07-27 15:08:25 +02:00
850a84584d ported: Add OS::is_process_running function.
Adds the is_process_running function to the native OS class and exposes it to script.
This is implemented on Windows and Unix platforms. A stub is provided for other platforms that do not support this function.
Documentation is updated to reflect new API function. - mdavisprog
53fb0440d3
I did change it a bit.
2022-07-27 14:46:53 +02:00
32f148ac0c Mass replaced godot to pandemonium. 2022-03-23 20:46:05 +01:00
4d7df62b8e Clang format all files. 2022-03-18 19:00:13 +01:00
ce328027fa Same change to drivers. 2022-03-17 22:18:15 +01:00
1e6a70c77a Fix uninitialized variable warnings. 2022-03-16 10:15:33 +01:00
e85cef1745 Run godot's formatting script. 2022-03-16 09:02:48 +01:00
938f72432e Removed the camera server. 2022-03-16 02:16:15 +01:00
a9fca142bc Fully removed Particles and Particles2D, as they were not implemented in gles2. 2022-03-16 00:06:53 +01:00
e111edf4f2 Cleaned up (hopefully all remaining) light baking things. 2022-03-15 21:07:14 +01:00
07a0ed2c42 Removed the xatlas_unwrap module. 2022-03-15 20:25:05 +01:00
6fac6ba7f7 Removed lightmap captures, and also cleaned up almost all lightmap stuff. 2022-03-15 19:57:34 +01:00
03890f9e38 Removed GIProbes. 2022-03-15 19:03:03 +01:00
00b8faf3f3 Fix missing scons script warning. 2022-03-15 17:05:33 +01:00
00285e8b24 Removed the gles3 driver. There are still mentions of it in a few places, I did not removed all of those. 2022-03-15 17:01:21 +01:00
49f8e8c398 Added godot with all my currently used engine modules. 2022-03-15 13:29:32 +01:00