Commit graph

241 commits

Author SHA1 Message Date
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
Aaron Franke
2bc0bcbd26
PropertyUsage: Rename "DO_NOT_SHARE_ON_DUPLICATE" to "ALWAYS_DUPLICATE" 2023-01-24 16:05:07 -06:00
Yuri Rubinsky
7cbe2b939e Some refactoring for visual shader texture functions 2023-01-20 12:54:20 +03:00
clayjohn
faea9f5c10 Remove SCREEN_TEXTURE, DEPTH_TEXTURE, and NORMAL_ROUGHNESS_TEXTURE
in favour of texture hints
2023-01-18 19:52:47 -08:00
Yuri Rubinsky
87eafe48b8 Add few improvements for VisualShaderNodeParticleRandomness 2023-01-09 20:33:45 +03: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
Yuri Rubinsky
952015df13 Add missing CUSTOM inputs for the spatial/vertex mode of visual shader 2022-12-26 14:09:07 +03:00
Yuri Rubinsky
bd08f89fd2 Optimize a code generation of visual shader particles 2022-12-11 12:35:48 +03:00
NumbuhFour
1b09fd5410 Implement CAMERA_VISIBLE_LAYERS as built-in shader variable 2022-12-03 22:41:27 -08:00
kobewi
d06a8320e5 Simplify GDVIRTUAL_CALL calls 2022-10-19 00:05:48 +02:00
Rémi Verschelde
8017827144 SCons: Re-enable treating #warning as error with werror
Replace all TODO uses of `#warning` by proper TODO comments, and will open
matching bug reports to keep track of them.

We don't have a great track record fixing TODOs, but I'd wager we're even
worse for fixing these "TODO #warning" so we should prohibit this usage.
2022-10-10 16:12:26 +02: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
Yuri Rubinsky
a656dcec01 Fix boolean connection to ports of other types in visual shader 2022-10-03 20:20:00 +03:00
clayjohn
1a0890122f Clean up canvas light shader API.
Expose LIGHT_ENERGY and LIGHT_IS_DIRECTIONAL.
Add LIGHT_DIRECTION
2022-09-28 11:46:58 -07: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
QbieShay
ecbeb8de1b Improve visual shader defaults for quality of life
- multiply part of addmultiply defaults to 1
- curvetexture's repeat is turned off
- vectors into float takes first component instead of average
2022-08-12 19:39:56 +02:00
Patrick Exner
fe5901310e Add spatial built-ins (camera-pos, object-pos, camera-eye etc.) 2022-08-02 17:30:41 +02:00
Hugo Locurcio
4b42379c8f
Rename RenderingServer global shader uniform methods to be more explicit
The `global_shader_uniform` name is longer, but it makes it much
easier to find the methods when searching in the class reference.
2022-07-28 18:46:59 +02:00
Yuri Rubinsky
2f43398182 Add a check to prevent duplicating connections in visual shader 2022-07-27 08:06:34 +03:00
Yuri Rubinsky
f05fce405e Fix visual shader graph not correctly updating when multiple tabs opened 2022-07-16 16:43:06 +03:00
Rémi Verschelde
1767507e69
Merge pull request #61888 from Chaosus/vs_remove_engine_version
Remove engine version from visual shader
2022-06-16 18:19:03 +02:00
Yuri Rubinsky
f4b4294c5f Revert vector4 output ports in visual shaders 2022-06-11 10:36:11 +03:00
Yuri Rubinsky
d6622330d7 Remove engine version from visual shader 2022-06-10 13:17:16 +03:00
clayjohn
4f82b1bd20 Use IGN instead of white noise for sky dithering 2022-05-24 10:57:07 -07:00
Yuri Rubinsky
0778c7a19e Fix connection of subports after uniform->constant conversion in vshader 2022-05-23 14:09:59 +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
Aaron Record
900c676b02 Use range iterators for RBSet in most cases 2022-05-19 12:09:16 +02:00
Haoyu Qiu
fc3b845c07 Add dedicated macros for property name extraction
* Replace case-by-case extraction with PNAME & GNAME
* Fix group handling when group hint begins with property name
* Exclude properties that are PROPERTY_USAGE_NO_EDITOR
* Extract missing ADD_ARRAY*, ADD_SUBGROUP* macros
2022-05-19 14:08:47 +08:00
Rémi Verschelde
7b571ab8f7
Merge pull request #60986 from fire-forge/capitalism 2022-05-16 13:49:14 +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
FireForge
584a646f50 Capitalize output port names in visual shader 2022-05-13 00:53:09 -05:00
FireForge
88a8038387 Capitalize/fix some property enum hints 2022-05-12 15:03:16 -05: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
509598e8c0 Remove SHADOW_ATTENUATION spatial light shader built-in 2022-03-29 08:43:31 +03:00
Rémi Verschelde
f3bd700767
Merge pull request #59619 from Chaosus/vs_input_desc 2022-03-28 22:32:11 +02:00
Yuri Roubinsky
9edbdc4f36 Add refs to shading language to the desciption of input nodes in vshader 2022-03-28 22:01:10 +03:00
Rémi Verschelde
7119d355eb String: Remove TTR and DTR defines in non-tools build
This ensures we don't use TTR in runtime code, as it's specifically meant
to source translations for the editor.
2022-03-28 20:26:35 +02:00