Commit Graph

93 Commits

Author SHA1 Message Date
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
Yuri Roubinsky db18faf660 Rename `PORT_TYPE_VECTOR` to `PORT_TYPE_VECTOR_3D` 2022-02-06 20:15:28 +03:00
Yuri Roubinsky 59af063636 Add support for 2D vector type to visual shaders 2022-02-02 19:59:34 +03:00
Yuri Roubinsky 538cff1351 Fix default input port hints for some modes in visual shader 2022-01-22 11:12:56 +03:00
Yuri Roubinsky 21cfcaa129 Add a GDScript template for `VisualShaderNodeCustom` 2022-01-06 12:06:33 +03:00
Rémi Verschelde fe52458154
Update copyright statements to 2022
Happy new year to the wonderful Godot community!
2022-01-03 21:27:34 +01:00
Yuri Roubinsky e8a457ba89 Refactor render_mode in shaders, forbid declaring duplicates 2021-12-21 22:20:09 +03:00
Yuri Roubinsky 826e781bfa Fix default_texture_param in shader pipeline to support uniform arrays 2021-11-12 12:53:40 +03:00
Rémi Verschelde a6412e132a
Merge pull request #54660 from Chaosus/vs_particles_mesh_emitter 2021-11-10 19:55:25 +01:00
Rémi Verschelde f253f7b6e6
VisualShader: Document enum args for virtual methods
Fixes #31563.
2021-11-10 13:22:58 +01:00
Yuri Roubinsky 80b563672b Added `MeshEmitter` node for particles in visual shader 2021-11-06 17:45:38 +03:00
Yuri Roubinsky dcdf59cd73 Added 2D boolean hint for particle emitters in visual shaders 2021-11-05 12:45:57 +03:00
clayjohn 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
Yuri Roubinsky c299c54023 Make port previews in visual shader visible in other shader modes 2021-10-11 22:19:08 +03:00
reduz 3682978aee Replace BIND_VMETHOD by new GDVIRTUAL syntax
* New syntax is type safe.
* New syntax allows for type safe virtuals in native extensions.
* New syntax permits extremely fast calling.

Note: Everything was replaced where possible except for `_gui_input` `_input` and `_unhandled_input`.
These will require API rework on a separate PR as they work different than the rest of the functions.

Added a new method flag METHOD_FLAG_OBJECT_CORE, used internally. Allows to not dump the core virtuals like `_notification` to the json API, since each language will implement those as it is best fits.
2021-08-22 08:23:58 -03:00
Yuri Roubinsky e537a1f10e Added missed limiters for Visual Shader node enums 2021-08-15 19:10:51 +03:00
Yuri Roubinsky 94c6817b51 Makes dictionary instead of string for visual shader version
Update doc/classes/VisualShader.xml

Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
2021-08-02 21:34:19 +03:00
Yuri Roubinsky 7d34701d63 Auto-set a first compatible uniform on dragging to create a UniformRef 2021-07-12 11:19:42 +03:00
Yuri Roubinsky 46cd36f009 Fix auto-connection from output node to input (VisualShaders) 2021-06-28 14:38:08 +03:00
Yuri Roubinsky f632e36ae5 Continuation of work on visual particles system 2021-06-07 20:33:17 +03:00
Yuri Roubinsky b2d2822a39 Adds `UVFunc` for panning/scaling on UV's to VisualShader's. 2021-06-07 08:31:48 +03:00
Yuri Roubinsky f06db8b778 Added Billboard Node to Visual Shaders 2021-05-28 09:24:06 +03:00
Yuri Roubinsky 8f9b91dab1 Implements expandable color ports in visual shaders 2021-05-26 10:45:53 +03:00
Rémi Verschelde 4219a4cb6f
Fix typos with codespell
Using codespell 2.0.0.

Method:
```
$ cat > ../godot-word-whitelist.txt << EOF
ang
curvelinear
dof
doubleclick
fave
findn
GIRD
leapyear
lod
merchantibility
nd
numer
ois
ony
que
seeked
synching
te
uint
unselect
webp
EOF

$ codespell -w -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po"
$ git diff // undo unwanted changes
```
2021-05-20 12:38:56 +02:00
Lightning_A 97fecd1b69 Rename "Control" key to "Ctrl" and add "_pressed" suffix to all InputEventWithModifiers properties/methods 2021-05-07 14:00:50 -06:00
Rémi Verschelde b95a82d46a
Merge pull request #47826 from Chaosus/vs_fix_default_input_overriding
Prevents default values of VSNodeCustom from overriding by a script
2021-04-27 10:42:51 +02:00
Yuri Roubinsky 8ae5c6c6ec Fix `sky` visual shader mode after last rename 2021-04-17 20:59:48 +03:00
Yuri Roubinsky 8d3e46098b Prevents default values of VSNodeCustom from overriding by a script 2021-04-12 14:41:08 +03:00
Yuri Roubinsky 44af52d62c Prevents TextureUniform in visual shaders from conversion to constant 2021-04-04 17:32:44 +03:00
Yuri Roubinsky fe3051fcce Added Comment node to Visual Shaders 2021-02-21 12:40:17 +03:00
Pedro J. Estébanez 8e128726f0 Modernize atomics
- Based on C++11's `atomic`
- Reworked `SafeRefCount` (based on the rewrite by @hpvb)
- Replaced free atomic functions by the new `SafeNumeric<T>`
- Replaced wrong cases of `volatile bool` by the new `SafeFlag`
- Platform-specific implementations no longer needed

Co-authored-by: Hein-Pieter van Braam-Stewart <hp@tmm.cx>
2021-02-18 17:12:46 +01:00
reduz f8d03b98e7 Improve resource load cache
-Added a new method in Resource: reset_state , used for reloading the same resource from disk
-Added a new cache mode "replace" in ResourceLoader, which reuses existing loaded sub-resources but resets their data from disk (or replaces them if they chaged type)
-Because the correct sub-resource paths are always loaded now, this fixes bugs with subresource folding or subresource ordering when saving.
2021-02-11 15:44:28 -03:00
Rafał Mikrut 7961a1dea3 Initialize class variables with default values in scene/ [2/2] 2021-02-09 18:24:36 +01:00
Rémi Verschelde c7fb7674c8
Merge pull request #44805 from Chaosus/vs_convert
Add convert options between constants and uniforms in visual shaders
2021-01-15 16:58:26 +01:00
Rémi Verschelde b5334d14f7
Update copyright statements to 2021
Happy new year to the wonderful Godot community!

2020 has been a tough year for most of us personally, but a good year for
Godot development nonetheless with a huge amount of work done towards Godot
4.0 and great improvements backported to the long-lived 3.2 branch.

We've had close to 400 contributors to engine code this year, authoring near
7,000 commit! (And that's only for the `master` branch and for the engine code,
there's a lot more when counting docs, demos and other first-party repos.)

Here's to a great year 2021 for all Godot users 🎆
2021-01-01 20:19:21 +01:00
Yuri Roubinsky c98c6eadbe Add convert options between constants and uniforms in visual shaders 2020-12-30 13:07:08 +03:00
Yuri Roubinsky dd32d7b7ee Fixed some errors when changing port name in visual shader expressions 2020-12-02 13:27:37 +03:00
reduz 127458ed17 Reorganized core/ directory, it was too fatty already
-Removed FuncRef, since Callable makes it obsolete
-Removed int_types.h as its obsolete in c++11+
-Changed color names code
2020-11-07 20:17:12 -03:00
Yuri Roubinsky f402e1e675 Added VisualShaderNodeCurve to easy gather data from a CurveTexture 2020-10-18 09:57:15 +03:00
Yuri Roubinsky dc713e149f Fix VisualShaderNode::set_output_port_connected 2020-10-02 09:06:13 +03:00
Yuri Roubinsky 07fb960a88 Fix some bugs in visual shader editor 2020-09-21 22:19:20 +03:00
Yuri Roubinsky 8dbf3d7c44 Improve performance of Add/Remove/Connect/Change nodes in visual shader 2020-09-11 15:45:18 +03:00