Commit Graph

293 Commits

Author SHA1 Message Date
Rémi Verschelde 9dfc41568a
Merge pull request #95984 from timothyqiu/what-identifier
Add `String.is_valid_unicode_identifier()`
2024-08-27 16:55:06 +02:00
Rémi Verschelde 21bcff00e9
Merge pull request #95126 from Chaosus/shader_cubemap_fix
Allow setting a cubemap as default parameter to shader
2024-08-27 16:54:50 +02:00
Chaosus db251a3f99 Allow setting a cubemap as default parameter to shader 2024-08-27 09:43:05 +03:00
Chaosus f538376c3b Add `CLIP_SPACE_FAR` built-in to spatial shader 2024-08-27 08:48:46 +03:00
Haoyu Qiu 8bf4ecc026 Add `String.is_valid_unicode_identifier()`
- Adds `is_valid_unicode_identifier()`
- Adds `is_valid_ascii_identifier()`
- Deprecates `is_valid_identifier()`
- Renames `validate_identifier()` to `validate_ascii_identifier()`
2024-08-27 11:34:08 +08:00
Rémi Verschelde 0125b0eb03
Merge pull request #94215 from Chaosus/vs_preview_and_param_list
Add a material preview to visual shader editor
2024-08-26 23:28:46 +02:00
Yuri Rubinsky eef236db63 Fix visual shader inputs to follow the alphabet order 2024-08-20 20:51:47 +03:00
Yuri Rubinsky f202a3d24e Add a material preview to visual shader editor 2024-08-17 08:27:54 +03:00
Rémi Verschelde 1346aaf4e7
Merge pull request #95465 from jsjtxietian/remove-category-warning
Remove `missing a category` warning in visual shader node
2024-08-16 14:34:56 +02:00
jsjtxietian c7249f41e9 Remove `missing a category` warning in visual shader node 2024-08-13 12:20:59 +08:00
tetrapod00 b9876b626d Change "Node3D" to "Spatial" in VisualShader resource 2024-08-12 21:04:13 -07:00
Yuri Rubinsky 14c36b733c Fix internal connection count decreased if visual shader node removed 2024-07-18 11:40:02 +03:00
Yuri Rubinsky 92aa01f937 Add few new outputs to the visual shaders 2024-07-12 17:12:22 +03:00
Yuri Rubinsky 537316098f Fix bugs in visual shader varyings 2024-06-16 16:58:46 +03:00
Yuri Rubinsky 99fa6ee6c4 Fix incorrect preview port in visual shader 2024-06-14 12:31:34 +03:00
Rémi Verschelde 0d1f2396d5
Merge pull request #92847 from aaronp64/varying_getter_port_type
Fix `VisualShaderNodeVaryingGetter` expanded ports adding ".x" to shader
2024-06-11 16:59:25 +02:00
Rémi Verschelde 5fcd9803cd
Merge pull request #90850 from AlexeyBond/patch-1
Handle Vector4 default input values in visual shaders
2024-06-07 23:29:19 +02:00
aaronp64 73343a2e7f Fix VisualShaderNodeVaryingGetter expanded ports adding ".x" to shader
When VisualShaderNodeVaryingGetter type was Vector2/Vector3/Vector4, expanding the output ports and connecting an individual value to a scalar input would add ".x" to the assignment in the generated shader.  This was due to `VisualShaderNodeVarying::get_port_type` ignoring the port number, and always returning the associated vector type.  Added checks for `p_port == 0` to return either the vector type, or scalar for expanded ports, matching similar logic in other nodes, like `VisualShaderNodeColorConstant::get_output_port_type`.

Fixes #92832
2024-06-06 15:21:21 -04:00
kobewi 413c11357d Use Core/Scene stringnames consistently 2024-05-13 23:41:07 +02:00
Hendrik Brucker 62776842df [VisualShader] Add reroute node and improve port drawing 2024-05-13 03:26:01 +02:00
A Thousand Ships 955d5affa8
Reduce and prevent unnecessary random-access to `List`
Random-access access to `List` when iterating is `O(n^2)` (`O(n)` when
accessing a single element)

* Removed subscript operator, in favor of a more explicit `get`
* Added conversion from `Iterator` to `ConstIterator`
* Remade existing operations into other solutions when applicable
2024-05-04 16:08:55 +02:00
Rémi Verschelde de00cfbc01
Merge pull request #90892 from Chaosus/vs_fix_expression_port_expand
Prevent expanding output port in visual shader expression
2024-05-01 09:54:57 +02:00
Aaron Franke b1f5e9fe3a
Rename internal is_ascii_char to is_ascii_alphabet_char 2024-04-20 02:36:41 -07:00
Yuri Rubinsky 56d843724e Prevent expanding output port in visual shader expression 2024-04-19 11:49:10 +03:00
Alexey Bondarenko 69f2e066db
fix: Handle Vector4 default input values in visual shaders 2024-04-18 18:26:03 +06: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
Rémi Verschelde 4a30fe5e7c
Merge pull request #86564 from Giwayume/feature/canvas-item-shader-custom-data
Support CUSTOM shader attributes in 2D
2024-02-08 10:53:24 +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
Giwayume bb83c4adec Add custom shader attributes to Canvas Item Shaders 2024-01-23 14:36:39 -05: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
Rémi Verschelde 5d306202b8
Merge pull request #84348 from jsjtxietian/screen-uv-in-visual-shader-preview-should-uv
Fix visual shader's `screen_uv` input preview uses position of node rather than a sample area like uv
2024-01-04 14:25:21 +01:00
Alistair Leslie-Hughes bfd62d7cdf Visual shader refacter use of connection 2023-12-12 07:36:28 +11:00
Alistair Leslie-Hughes a30dc67007 Fix VisualShader connection use after free. 2023-11-14 07:34:41 +11:00
jsjtxietian d920bdeda5 Fix visual shader's screen_uv input preview uses position of node
rather than a sample area like uv
2023-11-06 11:20:42 +08:00
Rémi Verschelde 111a91a09f
Merge pull request #83194 from jsjtxietian/fix-bool-varying-code-gen
Fix bool varying's generated code will be modified with flat
2023-10-13 11:45:09 +02:00
jsjtxietian 0f7a97eba0 Fix bool varying's generated code will be modified with flat 2023-10-12 19:42:18 +08:00
jsjtxietian 0ecef0e236 Fix parameter shader node not declared when only connected to a VaryingSetter 2023-10-12 17:53:26 +08:00
Yuri Roubinski 4575cc0c6f Implement drop-down list properties to the custom visual shader nodes 2023-09-29 10:55:05 +03:00
DennisManaa f248420a2b made visual shader ports expandable by default if there is only one output port and it's of any vector type
Co-authored-by: QbieShay <cislaghi.ilaria@gmail.com>
2023-09-22 15:28:59 +02: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
kobewi de4a3fa151 Unify and streamline connecting to Resource changes 2023-07-17 19:35:57 +02:00
Yuri Sizov 53d0e6c2d5 Merge pull request #73691 from Chaosus/vs_depth
Add DEPTH to the visual shader output (for spatial mode)
2023-07-12 14:18:41 +02:00
Hugo Locurcio dcc92c174e
Remove uses of `vformat()` with no placeholders
This is identical to passing the string directly.
2023-06-28 16:27:55 +02:00
Yuri Rubinsky 998b48f722 Add handling of custom visual shader nodes from GDExtension 2023-05-06 08:19:12 +03:00
Johan Aires Rastén 14a8124ffe Add LIGHT_IS_DIRECTIONAL built-in for spatial shaders 2023-04-20 14:33:30 +02:00
clayjohn 9be0a73294 Add EXPOSURE built in to spatial shaders
This allows users to restore light values to pre-pre-exposure amounts
2023-04-12 10:35:13 -07:00