Commit Graph

47 Commits

Author SHA1 Message Date
09185d76ac Rename shader hint filter_aniso to filter_anisotropy 2021-12-15 13:18:32 +03:00
92e9cca5be Rename hint_aniso to hint_anisotropy in the shader language
The word "anisotropy" is used in full form in BaseMaterial3D's
anisotropy-related properties.
2021-12-10 17:41:17 +01:00
bcbcf14469 Refactor constant suffix parsing in a shader 2021-12-10 15:38:27 +03:00
b66510d509 Added completion for uniform hints in a shader 2021-12-10 10:12:25 +03:00
76f6c0849c Make compile shader function to use struct instead long parameter list 2021-12-08 11:34:40 +03:00
5ba93619fa Allow using empty statements in the shader, added formatting warning 2021-12-01 11:52:25 +03:00
6e80e97b0f Fix built-in(PI, TAU, E) assignment to a global constant in a shader 2021-11-29 10:32:36 +03:00
e9b7ffd1fa Added few more built-ins to shader language 2021-10-13 20:27:36 +03:00
b1ac3e256f Allow declare the shader arrays with a size defined before identifier 2021-10-08 10:28:31 +03:00
7c07ae4c50 Fix shader crash when passing array.length to functions
and similar cases
2021-10-05 12:49:59 +03:00
6873ecaaf9 Added support for uniform arrays in shaders 2021-10-04 13:57:44 +03:00
700f9d916d More fixes to mobile renderer
* Specify all precision qualifiers
* Makes renderer work on Adreno Vulkan
2021-08-18 12:20:19 -03:00
fa96c98bdf Fix shader crash when using local var with the same name as varying 2021-08-13 09:20:16 +03:00
fb37846b00 Added parameter names to shader built-in function autocompletion 2021-08-12 11:19:53 +03:00
b47b3a9957 Prevents shader crashing if varying assigned incorrectly 2021-07-26 14:47:14 +03:00
a8fcfbf029 Merge pull request #50729 from Chaosus/shader_varying_enchancements2
Allow using vertex-stage varying in both `fragment` and `light` functions
2021-07-26 12:17:49 +02:00
17b462cc5f Allow using vertex-stage varying in both fragment and light 2021-07-22 11:55:14 +03:00
94a7b04a01 Allow using vertex varying in custom functions under any circumstances 2021-07-22 11:27:13 +03:00
5100eed012 Added a shader warning about unused local variable 2021-06-29 15:39:37 +03:00
7dd65a066e Fix length() array function usage in shader 2021-06-10 10:04:28 +03:00
5874b7a29c Allow shader arrays to be passed as parameters and return value 2021-05-22 20:15:03 +03:00
084648bd18 Basic warning support implementation for the Godot Shading Language. 2021-05-22 19:24:31 +03:00
6135744786 Implements length() shader function for arrays in structs 2021-05-19 21:50:11 +03:00
e905e8f145 Highlight control flow keywords with a different color
This makes them easier to distinguish from other keywords.
2021-05-05 22:38:12 +02:00
3c82f01134 Fix shader handle constant expressions in function call 2021-04-27 15:23:01 +03:00
d3b49c416a Refactor GLSL shader compilation
-Used a more consistent set of keywords for the shader
-Remove all harcoded entry points
-Re-wrote the GLSL shader parser, new system is more flexible. Allows any entry point organization.
-Entry point for sky shaders is now sky().
-Entry point for particle shaders is now process().
2021-04-14 11:37:52 -03:00
dd0874e717 Allow passing varying from fragment to light shader function 2021-02-11 15:59:21 +03:00
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
bc0e8e7a21 Fix using post-init shader array constructors 2020-12-27 01:07:24 +03:00
fe4c8e387b Added support for constants in shader case and array size declaration 2020-12-17 11:51:18 +03:00
644f739660 Static analyzer fixes:
Removes unused code in OS.
Fixes return types.
Fixes few typos.
2020-12-09 10:17:53 +02:00
02f60812ed Rename TYPE_REAL to TYPE_FLOAT
To be consistent with the naming everywhere else.
2020-12-04 09:47:26 -03:00
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
6914597026 FIx autocompletion for emit_particle in shader editor 2020-10-13 14:12:51 +03:00
d0bddf53c5 Implement manual particle emission and particle sub emitters. 2020-09-06 10:29:27 -03:00
c554d9e556 Added const qualifier support for function arguments in shaders 2020-07-01 12:55:00 +03:00
636a9d9f50 Implemented global const array to shaders 2020-06-19 16:04:54 +03:00
0ee0fa42e6 Style: Enforce braces around if blocks and loops
Using clang-tidy's `readability-braces-around-statements`.
https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
2020-05-14 21:57:34 +02:00
0be6d925dc Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks
Which means that reduz' beloved style which we all became used to
will now be changed automatically to remove the first empty line.

This makes us lean closer to 1TBS (the one true brace style) instead
of hybridating it with some Allman-inspired spacing.

There's still the case of braces around single-statement blocks that
needs to be addressed (but clang-format can't help with that, but
clang-tidy may if we agree about it).

Part of #33027.
2020-05-14 16:54:55 +02:00
1f6f364a56 Port member initialization from constructor to declaration (C++11)
Using `clang-tidy`'s `modernize-use-default-member-init` check and
manual review of the changes, and some extra manual changes that
`clang-tidy` failed to do.

Also went manually through all of `core` to find occurrences that
`clang-tidy` couldn't handle, especially all initializations done
in a constructor without using initializer lists.
2020-05-14 10:01:56 +02:00
1bea8e1eac New lightmapper
-Added LocalVector (needed it)
-Added stb_rect_pack (It's pretty cool, we could probably use it for other stuff too)
-Fixes and changes all around the place
-Added library for 128 bits fixed point (required for Delaunay3D)
2020-05-10 15:59:09 -03:00
0bf6a86db4 Merge pull request #37795 from Chaosus/shader_fix_const_order2
Fix shader constant sorting
2020-04-29 09:41:34 +02:00
0e1c66d9fc Implement global and per instance shader uniforms.
Adds two keywords to shader language for uniforms:
-'global'
-'instance'

This allows them to reference values outside the material.
2020-04-17 12:35:41 -03:00
bc30f541e6 Fix shader constant sorting 2020-04-11 12:40:17 +03:00
95a1400a2a Replace NULL with nullptr 2020-04-02 13:38:00 +02:00
aa33db056a Prevent shader crash if multiple variables has been declared in 'for' 2020-03-28 19:51:42 +03:00
a6f3bc7c69 Renaming of servers for coherency.
VisualServer -> RenderingServer
PhysicsServer -> PhysicsServer3D
Physics2DServer -> PhysicsServer2D
NavigationServer -> NavigationServer3D
Navigation2DServer -> NavigationServer2D

Also renamed corresponding files.
2020-03-27 15:21:27 -03:00