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
Qbieshay
657dc82fe4
Sort bent normal output at the bottom to prevent visual shader breakage
2025-07-15 11:36:47 +02:00
Thaddeus Crews
2f39f4746d
Merge pull request #107729 from Chaosus/vs_fix_missing_transform_preview
...
Add missing input transform to visual shader preview
2025-06-27 09:39:55 -05:00
kobewi
28a11ab551
Restore graph_offset property
2025-06-25 18:25:57 +02:00
Chaosus
5a43220818
Add missing input transform to visual shader preview
2025-06-19 20:46:55 +03:00
Hendrik Brucker
666d7c030b
[VisualShader] Fix and improve editor state persistence
2025-06-14 13:10:17 +02:00
LuoZhihao
8ba4656ea3
Compile out editor-only logic within validate_property
in games
2025-06-12 12:54:19 +08:00
Apples
d674c9e289
Add stencil support for spatial materials
2025-06-11 09:59:10 -05:00
Apples
7574a5dbb3
Add depth function for spatial materials
2025-06-06 09:21:19 -05:00
Capry
9828c365c3
Add support for bent normals for indirect lighting and specular occlusion
2025-05-12 12:52:04 +02:00
Yufeng Ying
2db0a44519
Remove vmap.h
2025-05-09 19:05:28 +08:00
Yufeng Ying
31bfc41202
Replace VMap with HashMap in VisualShader.
2025-05-09 19:05:28 +08:00
dsmtE
4e68f277c6
add REGION_RECT
...
fix formatting
fix shader compile (region_rect after draw_data)
fix formatting
fix formatting
Review fix (move region_rect in main + remove useless visual shader options)
fix formatting
fix alphabetic order (+ remove useless action for spatial shaders)
typo + remove TYPE_LIGHT option for region_rect
2025-04-30 11:07:22 +02:00
Max Piepenbrink
b28800e580
Include alpha in visual shader light function inputs
...
Lack of access to the alpha accumulator makes some effects that are sensitive to lighting impossible with the visual shader graph. This is an easy fix thankfully as it simply just wasn't exposed.
2025-03-11 20:57:03 -07:00
A Thousand Ships
5113022dfe
Clean up some uses of String::substr
...
Cases where the end position is either equvalent to the default or past
the end of the string.
2025-03-07 14:50:38 +01:00
aaronp64
c4db6687f9
Generate global code for VisualShader nodes that connect to VaryingSetters
...
Updated visual shader code to call generate_global_per_node() for nodes connected to VaryingSetter nodes, even if they don't connect directly to Output.
2025-01-16 15:14:12 -05:00
A Thousand Ships
a1846b27ea
Improve use of Ref.is_null/valid
...
Use `is_null` over `!is_valid` and vice versa.
2024-12-23 16:35:02 -05:00
Yufeng Ying
73d85f46c9
Remove unused headers in scene.
...
Co-authored-by: Thaddeus Crews <repiteo@outlook.com>
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
2024-12-24 00:40:09 +08:00
Lukas Tenbrink
b5c31ebb41
Add contains_char() for single-character 'contains' calls.
2024-12-06 20:23:35 +01:00
rune-scape
d58b2e879f
Get rid of easily removable uses of const_cast
2024-12-01 17:50:13 -08:00
Chaosus
a64b3fd3f8
Allow SCREEN_UV
to be used in light function of spatial shader
2024-11-19 11:39:49 +03:00
Thaddeus Crews
90ce26a27b
Merge pull request #94889 from rune-scape/no-const-list-erase
...
Remove const_cast in `List::erase`
2024-11-10 12:12:34 -06:00
rune-scape
a47daa0a44
Avoid const_cast in List::erase by requiring mutable elements
2024-11-08 00:10:08 -08:00
Thaddeus Crews
6cef0a17fb
Merge pull request #98571 from timothyqiu/pname-no-editor
...
Don't mark `PROPERTY_USAGE_NO_EDITOR` properties for translation
2024-11-05 18:36:10 -06:00
Haoyu Qiu
d47425b35f
Don't mark PROPERTY_USAGE_NO_EDITOR
properties for translation
...
Using `PNAME()` on these properties are redundant as they won't be displayed
in the editor and some of them will be automatically ignored by the
extraction script.
2024-10-26 22:09:21 +08:00
Chaosus
43a99fba3d
Add alpha channel display to vec4 previews of visual shader nodes
2024-10-18 20:00:10 +03:00
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