Commit Graph

102 Commits

Author SHA1 Message Date
ae9732139a Merge pull request #109433 from KoBeWi/hastension
Add `has_extension()` method to String
2025-10-31 09:23:30 -05:00
3d1c9fd5de Move server files into their subfolders 2025-09-30 19:39:39 -07:00
9fbf5808a0 Rename server "free" functions to "free_rid" to match exposed API 2025-09-30 16:52:25 -07:00
a33ae0be0e Add has_extension() method to String 2025-08-12 13:15:16 +02:00
f11aff3841 Editor: Restructure editor code
Moving various editor files into sub folders to reduce clutter
2025-07-04 18:18:22 +02:00
91fe434a86 Always use String as StringName backing internally. 2025-04-23 14:57:03 +02:00
ffa6ef220b Use append_ instead of parse_ for String methods. 2025-03-27 17:51:02 +01:00
72045c8306 Scripting: Add script documentation cache to project
This PR adds a script documentation cache in the project folder.
It is loaded at alongside native documentation caches. This makes
scripts fully accessible through Search Help, including their
members, etc, right from project start, without having to compile
every single script.

Co-authored-by: Hilderin <81109165+Hilderin@users.noreply.github.com>
2025-03-12 13:44:41 -04:00
7a438dc72e Merge pull request #97205 from tetrapod00/inspect-native-shader-code
Add "Inspect Native Shader Code" to shader inspector and shader editor
2024-10-21 16:39:13 -05:00
12d2c05936 Add "Inspect Native Shader Code" to shader resource and shader editor 2024-10-08 11:02:45 -07:00
e2c6daf7ef Implement asynchronous transfer queues, thread guards on RenderingDevice. Add ubershaders and rework pipeline caches for Forward+ and Mobile.
- Implements asynchronous transfer queues from PR #87590.
- Adds ubershaders that can run with specialization constants specified as push constants.
- Pipelines with specialization constants can compile in the background.
- Added monitoring for pipeline compilations.
- Materials and shaders can now be created asynchronously on background threads.
- Meshes that are loaded on background threads can also compile pipelines as part of the loading process.
2024-10-02 15:11:58 -03:00
194bdde947 Cleanup of raw nullptr checks with Ref
Using `is_valid/null` over checks with `nullptr` or `ERR_FAIL_NULL` etc.
2024-08-31 15:01:09 +02:00
db251a3f99 Allow setting a cubemap as default parameter to shader 2024-08-27 09:43:05 +03:00
d1cd0c4780 Prevent add shader uniform doc when DocTool is not inited 2024-05-20 12:26:26 +08:00
9eff940a64 Merge pull request #91549 from magian1127/4.0ChangeHighlightingStartKey
Resolve conflict between shader uniform tooltips `/**` and general annotation `/**/`.
2024-05-17 11:13:48 +02:00
8a92615ba0 Resolve conflict between shader uniform tooltips "/**" and general annotation "/**/". 2024-05-14 15:32:47 +08:00
413c11357d Use Core/Scene stringnames consistently 2024-05-13 23:41:07 +02:00
5bd9f4dea5 Don't run Shader doc comments logic outside the editor
Fixes #91306.
2024-04-29 14:54:35 +02:00
e3a7c751f2 Implement tooltips for shader uniform in the inspector.
using regular expressions
2024-04-26 17:48:11 +08:00
15eec2450a Fix empty shader resource loading 2023-09-04 14:59:59 +03:00
26e3443eef Fix Shader and ShaderInclude resource loading 2023-08-17 11:17:54 +03:00
de4a3fa151 Unify and streamline connecting to Resource changes 2023-07-17 19:35:57 +02:00
905c10bc54 Fix shader type detection 2023-07-10 17:44:39 +03:00
67038471ff Fix shader preprocessor cyclic include handling 2023-05-29 12:05:22 +03:00
0acaccebaf Fix several shader preprocessor include issues 2023-01-27 14:37:55 +02:00
81f9529a7e Fix shader include dependency handling 2023-01-22 22:19:52 +02:00
7dbc458bb4 Clean up shader parameter remap
This PR is a follow up to #64092, which fixed important issues but it was implemented in an overly complex and inefficient way (because it forced the default code path to always go through string operations).
This cleans up all the shader parameter code.

This fixes #54336. Also fixes #56219 because, as the new code never queries the RenderingServer on load, potential deadlocks are avoided.

**NOTE**: materials saved between #62972 and #64092 will no longer work and will need to be resaved in an earlier version.
2023-01-21 12:56:28 +01:00
d95794ec8a One Copyright Update to rule them all
As many open source projects have started doing it, we're removing the
current year from the copyright notice, so that we don't need to bump
it every year.

It seems like only the first year of publication is technically
relevant for copyright notices, and even that seems to be something
that many companies stopped listing altogether (in a version controlled
codebase, the commits are a much better source of date of publication
than a hardcoded copyright statement).

We also now list Godot Engine contributors first as we're collectively
the current maintainers of the project, and we clarify that the
"exclusive" copyright of the co-founders covers the timespan before
opensourcing (their further contributions are included as part of Godot
Engine contributors).

Also fixed "cf." Frenchism - it's meant as "refer to / see".
2023-01-05 13:25:55 +01:00
ea33001b95 Add safety-checks before some servers free() 2022-12-29 16:23:38 -05:00
ecec415988 Use system fonts as fallback and improve system font handling.
Add support for font weight and stretch selection when using system fonts.
Add function to get system fallback font from a font name, style, text, and language code.
Implement system font support for Android.
Use system fonts as a last resort fallback.
2022-12-04 18:44:20 +02:00
9d4816fd4a Fix Shader::has_parameter to return a correct value 2022-11-11 11:30:34 +03:00
8191b3c110 Rename uniform to parameter across the engine 2022-09-01 11:42:57 +03:00
22df2c527b Implement coloring for disabled branches in the shader editor 2022-08-14 13:57:26 +03:00
db22b7ded0 Rename shader parameter uniform setter/getter methods for consistency
`shader_uniform` is now consistenly used across both per-shader
and per-instance shader uniform methods. This makes methods easier
to find in the class reference when looking for them.
2022-08-04 23:17:06 +02:00
c3606cb5f3 Swap arguments of ResourceSaver.save() 2022-07-29 19:53:09 +02:00
886c2d9681 Implement shader uniform groups/subgroups 2022-07-26 11:26:09 +03:00
f649678402 Clean up Shader Preprocessor
* Moved preprocessor to Shader and ShaderInclude
* Clean up RenderingServer side
* Preprocessor is separate from parser now, but it emits tokens with include location hints.
* Improved ShaderEditor validation code
* Added include file code completion
* Added notification for all files affected by a broken include.
2022-07-22 22:53:03 +02:00
7b94603baa Adding shader preprocessor support
Co-authored-by: TheOrangeDay <6472143+TheOrangeDay@users.noreply.github.com>
2022-07-22 22:51:57 +02:00
746dddc067 Replace most uses of Map by HashMap
* Map is unnecessary and inefficient in almost every case.
* Replaced by the new HashMap.
* Renamed Map to RBMap and Set to RBSet for cases that still make sense
  (order matters) but use is discouraged.

There were very few cases where replacing by HashMap was undesired because
keeping the key order was intended.
I tried to keep those (as RBMap) as much as possible, but might have missed
some. Review appreciated!
2022-05-16 10:37:48 +02:00
180e5d3028 Remove RES and REF typedefs in favor of spelled out Ref<>
These typedefs don't save much typing compared to the full `Ref<Resource>`
and `Ref<RefCounted>`, yet they sometimes introduce confusion among
new contributors.
2022-05-03 01:43:50 +02:00
9381acb6a4 Make FileAccess and DirAccess classes reference counted. 2022-04-11 13:28:51 +03:00
fe52458154 Update copyright statements to 2022
Happy new year to the wonderful Godot community!
2022-01-03 21:27:34 +01:00
826e781bfa Fix default_texture_param in shader pipeline to support uniform arrays 2021-11-12 12:53:40 +03:00
c012fbc8b2 Rename PROPERTY_USAGE_NOEDITOR to PROPERTY_USAGE_NO_EDITOR
This is consistent with other constants that include `NO`,
such as `PROPERTY_HINT_COLOR_NO_ALPHA`.
2021-11-03 23:06:17 +01:00
1b2cd9f251 Addition of FogVolumes, FogShaders, FogMaterial, and overhaul of VolumetricFog
Co-authored-by: Brian Semrau <brian.semrau@gmail.com>
2021-10-28 22:02:23 -07:00
c63b18507d Use range iterators for Map 2021-09-30 15:09:12 -06:00
136dd887ad Preserve original name in shader params cache 2021-08-05 18:31:08 -05:00
4e6efd1b07 Use C++ iterators for Lists in many situations 2021-07-23 17:38:28 -04:00
e28fd07b2b Rename instance()->instantiate() when it's a verb 2021-06-19 20:49:18 -06:00
9e328bb5b7 Core: Move DirAccess and FileAccess to core/io
File handling APIs are typically considered part of I/O, and we did have most
`FileAccess` implementations in `core/io` already.
2021-06-11 14:52:39 +02:00