Commit Graph

285 Commits

Author SHA1 Message Date
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
clayjohn
016946b552 Write out render_mode even when mode is set to default in VisualShaders 2023-04-11 18:03:00 -07:00
Yuri Rubinsky
faf62ba0cc Add DEPTH to the visual shader output (for spatial mode) 2023-02-21 20:19:37 +03:00
Yuri Rubinsky
c0a3129210 Prevent preview error for the instance parameter in visual shader 2023-02-03 15:28:04 +03:00
Rémi Verschelde
e8240031e7
Merge pull request #71479 from raulsntos/virtual-return-type
Use enum instead of int in virtual methods return type
2023-02-01 07:45:28 +01:00
Rémi Verschelde
ab4d8df163
Merge pull request #72485 from BastiaanOlij/add_eye_matrix_access
Expose EYE_OFFSET to gdshader code
2023-02-01 07:33:18 +01:00
Bastiaan Olij
8c77aea9ab Expose EYE_OFFSET to gdshader code 2023-02-01 12:39:13 +11:00
Marius Hanl
a59819630d Replace Extents with Size in VoxelGI, ReflectionProbe, FogVolume, Decal and GPUParticles*3D
- Extents are replaced by Size (Size is Extents * 2)
- The UI text displays 'Size'
- Snapping is adjusted to work with Size
- _set and _get handle extents for compatibility

Co-authored-by: ator-dev <dominic.codedeveloper@gmail.com>
2023-01-31 20:04:11 +01:00
Raul Santos
9e9eac4676
Use enum instead of int in virtual methods return type 2023-01-31 19:06:49 +01:00