Commit graph

134 commits

Author SHA1 Message Date
Lukas Tenbrink
ad600125df Rewrite HashMapHasherDefault based on type traits - it is now possible to declare a default hashing function for any type.
Remove cross-project includes from `hashfuncs.h`.
Improve hashing function for `Color` (based on values instead of `String`).
Move `Variant` comparison from `hash_map.h` to `dictionary.cpp` (`VariantComparatorDictionary`), where it's used.
Remove now unnecessary `HashableHasher`.
2025-10-05 01:49:11 +02:00
kobewi
d61a337a70 Improve usage of String.split() vs get_slice() 2025-09-19 16:31:55 +02:00
Colin O'Rourke
c4559c02de VisualShader Conversion fails with Embeds
Potentially resolves https://github.com/godotengine/godot/issues/101375

VisualShader now has a has_node_embeds function that runs through it's child nodes to find embedded resources via object properties. Conversion plugin uses this function to catch the error.
2025-09-18 14:35:30 -07:00
kobewi
28a11ab551 Restore graph_offset property 2025-06-25 18:25:57 +02:00
Hendrik Brucker
666d7c030b [VisualShader] Fix and improve editor state persistence 2025-06-14 13:10:17 +02:00
Apples
d674c9e289 Add stencil support for spatial materials 2025-06-11 09:59:10 -05:00
Lukas Tenbrink
eb9bea10a9 Remove obsolete VMap forward declaration. 2025-05-28 12:19:33 +02:00
Yufeng Ying
31bfc41202 Replace VMap with HashMap in VisualShader. 2025-05-09 19:05:28 +08:00
kobewi
34b485d62b Remove empty constructors and destructors from scene/ 2025-05-06 14:46:54 +02:00
Lukas Tenbrink
b711d72e8f Remove unnecessary friend class declarations of CowData.
Use default implementations for various containers.
2025-04-11 18:26:08 +02:00
Thaddeus Crews
324512e11c
Style: Replace header guards with #pragma once 2025-03-07 17:33:47 -06:00
Chaosus
db251a3f99 Allow setting a cubemap as default parameter to shader 2024-08-27 09:43:05 +03:00
Yuri Rubinsky
f202a3d24e Add a material preview to visual shader editor 2024-08-17 08:27:54 +03:00
Yuri Rubinsky
537316098f Fix bugs in visual shader varyings 2024-06-16 16:58:46 +03:00
Hendrik Brucker
62776842df [VisualShader] Add reroute node and improve port drawing 2024-05-13 03:26:01 +02:00
Yuri Rubinsky
56d843724e Prevent expanding output port in visual shader expression 2024-04-19 11:49:10 +03:00
Hendrik Brucker
735c45dc8e [Compatibility] Add stub for VisualShaderNodeComment 2024-04-18 02:39:29 +02:00
Hendrik Brucker
a81561cbd9 Add GraphFrame and integrate it in VisualShader 2024-04-04 15:11:00 +02:00
Yuri Rubinsky
aa12241414 Refactor the parsing of port names in visual shader's expressions 2024-03-21 16:34:37 +03:00
Hendrik Brucker
02a33b67a8 Redesign the graph editor for visual shaders 2024-02-22 20:40:09 +01:00
jsjtxietian
ff089f8cea Check is the ref shader valid in visual shader's update_option_menu 2024-01-25 11:54:23 +08:00
Hendrik Brucker
f59419bfe0 Add connection-related VisualShader operations
- Insert a node in a connection
- Drop an unconnected node on a connection to insert it
- Delete a connection
2024-01-19 11:38:59 +01:00
Yuri Roubinski
4575cc0c6f Implement drop-down list properties to the custom visual shader nodes 2023-09-29 10:55:05 +03:00
Hendrik Brucker
5afe78bd9c Clean up/refactor GraphNode and make it more flexible
Split GraphNode into GraphElement and GraphNode, add custom
titlebar, and adjust theming.
2023-09-07 17:29:06 +02:00
Yuri Roubinski
01101134f4 Make the dragging connections more user-friendly in visual shaders 2023-07-20 15:00:19 +03:00
Rémi Verschelde
e4deaa2727
Merge pull request #76787 from RedworkDE/avoid-localvector-copy
Avoid making unnecessary copies of `LocalVector`
2023-06-20 00:01:55 +02:00
RedworkDE
1324c7d06a Avoid making unnecessary copies of LocalVector 2023-05-06 20:39:03 +02:00
Yuri Rubinsky
998b48f722 Add handling of custom visual shader nodes from GDExtension 2023-05-06 08:19:12 +03:00
Yuri Rubinsky
c0a3129210 Prevent preview error for the instance parameter in visual shader 2023-02-03 15:28:04 +03:00
Raul Santos
9e9eac4676
Use enum instead of int in virtual methods return type 2023-01-31 19:06:49 +01:00
Yuri Rubinsky
f101add78b Add uint type support to visual shaders 2023-01-06 10:35:25 +03:00
Rémi Verschelde
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
bruvzg
0103af1ddd
Fix MSVC warnings, rename shadowed variables, fix uninitialized values, change warnings=all to use /W4. 2022-10-07 11:32:33 +03:00
Rémi Verschelde
d1a155e3cd Fix various -Wmaybe-uninitialized warnings from GCC 12.2.1
Not sure why I didn't get those before, it may be due to upstream
changes (12.2.1 is a moving target, it's basically 12.3-dev), or simply
rebuilding Godot from scratch with different options.
2022-09-22 11:29:48 +02:00
Yuri Rubinsky
09c98cdde9 Add conversion for uniform_name property in visual shader 2022-09-07 08:19:02 +03:00
Rémi Verschelde
c82bbc38a5 Merge pull request #64952 from Chaosus/vs_rename_uniform_to_param 2022-09-02 13:49:53 +02:00
Johan Aires Rastén
b7e2d45233 Replace Vector2(i) with Size2(i) for methods returning a size 2022-09-01 20:04:17 +02:00
Yuri Rubinsky
8191b3c110 Rename uniform to parameter across the engine 2022-09-01 11:42:57 +03:00
Yuri Rubinsky
d4a10e7e04 Allow using integer varyings with flat interpolation modifier 2022-08-25 13:21:02 +03:00
kobewi
1abdffe7a0 Replace Array return types with TypedArray 2 2022-08-23 23:21:32 +02:00
Yuri Sizov
1a24c9e14b Make _validate_property a multilevel method 2022-08-22 18:35:11 +03:00
Yuri Rubinsky
f05fce405e Fix visual shader graph not correctly updating when multiple tabs opened 2022-07-16 16:43:06 +03:00
Yuri Rubinsky
d6622330d7 Remove engine version from visual shader 2022-06-10 13:17:16 +03:00
reduz
45af29da80 Add a new HashSet template
* Intended to replace RBSet in most cases.
* Optimized for iteration speed
2022-05-20 22:40:38 +02:00
reduz
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
Yuri Roubinsky
8bf632240d Continue to improve vector4 type in visual shaders 2022-04-22 22:29:26 +03:00
Hendrik Brucker
cf58d23a72 Add Vector4 to VisualShader 2022-04-12 19:09:29 +02:00
Yuri Roubinsky
4d6790e9df Add _get_func_code/_is_available virtual functions to custom nodes 2022-03-08 16:23:44 +03:00
Yuri Roubinsky
15a87f8e92 Add varying support to visual shaders 2022-03-04 23:30:47 +03:00
Yuri Roubinsky
a6e280c5de Add some more fixes to visual shader 2022-02-07 11:28:42 +03:00