Commit Graph

192 Commits

Author SHA1 Message Date
Rémi Verschelde 140350d767
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
2021-05-05 15:02:01 +02:00
Rémi Verschelde a828398655
Style: Replaces uses of 0/NULL by nullptr (C++11)
Using clang-tidy's `modernize-use-nullptr`.
https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-nullptr.html
2021-05-04 16:30:23 +02:00
Rémi Verschelde b5e1e05ef2
Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2021-05-04 14:45:16 +02:00
Rémi Verschelde 64a63e0861
Style: clang-format: Disable AllowShortCaseLabelsOnASingleLine 2021-05-04 14:45:15 +02:00
Rémi Verschelde 3d15f04668
Style: clang-format: Disable AllowShortIfStatementsOnASingleLine 2021-05-04 14:45:15 +02:00
Hugo Locurcio 0c6873b13e
Tweak shader errors for features only usable in GLES3
See https://github.com/godotengine/godot/issues/42719#issuecomment-792168504.
2021-03-07 13:27:13 +01:00
Ev1lbl0w 3fe851accc Added missing returns on error scenarios
(cherry picked from commit 3d9ef1e4de)
2021-03-02 10:26:14 +01:00
Yuri Roubinsky 29616f4a35 Fix parsing hexadecimal (lowercase `e`,`f`) in shaders
(cherry picked from commit 19e0a1ec9d)
2021-03-02 10:26:14 +01:00
Rémi Verschelde 49646383f1
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 🎆

(cherry picked from commit b5334d14f7)
2021-01-13 16:17:06 +01:00
Rémi Verschelde c8859f0463
Fix typos with codespell
Using codespell 1.17.1.

Method:
```
$ cat > ../godot-word-whitelist.txt << EOF
ang
curvelinear
dof
doubleclick
fave
findn
leapyear
lod
merchantibility
nd
numer
ois
ony
que
seeked
synching
te
uint
unselect
webp
EOF

$ codespell -w -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po"
$ git diff // undo unwanted changes
```
2020-09-18 14:09:51 +02:00
Yuri Roubinsky ecd54630ef [3.2] Fix some incorrect conversions which lead to crash in shaders 2020-07-15 06:36:24 +03:00
Yuri Roubinsky 891b84a833 [3.2] Prevents usage of return in main shader functions 2020-06-27 17:38:22 +03:00
Yuri Roubinsky 474b178534 [3.2] Fix shader crash if pass const argument to 'out/inout' parameter 2020-06-25 10:27:37 +03:00
Yuri Roubinsky ee93c85ef1 Fix shader constant sorting 2020-03-31 14:32:33 +03:00
Yuri Roubinsky 4dd1eee769 Enables passing out built-in parameter from parent function in shaders
(cherry picked from commit 7a2c6a8c0e)
2020-03-25 11:38:53 +01:00
fhuya 30d738eda7 Add support for opengl external textures as defined by https://www.khronos.org/registry/OpenGL/extensions/OES/OES_EGL_image_external.txt 2020-03-05 13:09:49 -08:00
Yuri Roubinsky 3b2490f19c Prevent shader crash if invalid builtin used after array member accessor
(cherry picked from commit 3a70566b15)
2020-02-14 16:02:21 +01:00
Yuri Roubinsky 0995696e08 Prevent shader crash when name conflict with "dus" and "__" occured
(cherry picked from commit 2c4367441c)
2020-02-06 13:02:07 +01:00
Yuri Roubinsky 3473a195fc Hides high-level functions from GLES2 shader autocompletion 2020-01-23 12:41:21 +03:00
Yuri Roubinsky 4c456ef979 Disallow uint/uvec usage on GLES2 platform 2020-01-20 18:59:35 +03:00
Yuri Roubinsky 3dea1c725e Clears completion_class in shaders (may cause troubles if not). 2020-01-19 16:35:54 +03:00
Yuri Roubinsky 1eb8d5e142 Added missing form of array constructor in shaders 2020-01-18 11:41:55 +03:00
Yuri Roubinsky 5098232ee6 Disabled array initialization, const array and arr.length in shaders 2020-01-16 11:46:11 +03:00
Yuri Roubinsky 1e154e0947 Fix nested break/return in shader switch statement 2020-01-10 11:57:56 +03:00
Rémi Verschelde 5edd1a27d2
Merge pull request #34671 from Chaosus/shader_hex_support
Support for hex numbers in shaders
2020-01-08 10:01:49 +01:00
Rémi Verschelde a7f49ac9a1 Update copyright statements to 2020
Happy new year to the wonderful Godot community!

We're starting a new decade with a well-established, non-profit, free
and open source game engine, and tons of further improvements in the
pipeline from hundreds of contributors.

Godot will keep getting better, and we're looking forward to all the
games that the community will keep developing and releasing with it.
2020-01-01 11:16:22 +01:00
Yuri Roubinsky 99b92c885f Support for hex numbers in shaders 2019-12-29 12:19:10 +03:00
Rémi Verschelde 2845e6a21a
Merge pull request #34040 from qarmin/unused_variable_more_precise_numbers
Removed unused variables, add some constants numbers
2019-12-10 08:25:31 +01:00
Rafał Mikrut ed1c4bc77d Removed unused variables, add some constants numbers 2019-12-10 05:13:02 +01:00
Yuri Roubinsky 8b8faf03d5 Fix expressions for global constants in shaders 2019-12-02 19:00:21 +03:00
Marcel Admiraal 6c3be2ca74 Fix Visual Studio throwing C4146 warning. 2019-11-18 15:14:04 +00:00
Yuri Roubinsky 5e44b5be81 Prevents usage of unsupported texture shader types in GLES2 2019-11-03 13:41:15 +03:00
Yuri Roubinsky 6b7f8558d9 Removed switch operator from GLES2 shader back-end 2019-11-02 12:43:32 +03:00
Yuri Roubinsky 1b003f3d64 Prevents shader crash on GLES2 if unsupported built-in has been used 2019-10-31 09:21:44 +03:00
Yuri Roubinsky 76eb486413 Added check if field name in the shader is equal to builtin 2019-10-29 15:37:19 +03:00
Yuri Roubinsky ef6161532d Fix shader crash if non-boolean expression inserted into "if" 2019-10-28 08:35:33 +03:00
Hugo Locurcio 701581d1d3
Improve error messages related to `shader_type`
The list of allowed shader types is now displayed if any
`shader_type`-related error is emitted.

This makes it easier to remember which shader types are allowed
when creating a new shader.
2019-10-26 17:43:14 +02:00
Yuri Roubinsky ada4bcbe30 Fix invalid autocompletion pasting of shader param name 2019-10-08 18:33:22 +03:00
Yuri Roubinsky 76324bec8d Prevent shader crash if name of variable overrides function name 2019-10-06 20:35:41 +03:00
Yuri Roubinsky d9087e1b44 Prevent shader crash if function call been used on constant 2019-10-06 18:20:05 +03:00
Yuri Roubinsky 5a5a062d61 Fix few redefinition name errors for variable/param/function in shaders 2019-10-06 17:27:28 +03:00
Yuri Roubinsky 1472fca951 Removed unnecessary shader error log messages 2019-10-02 12:37:22 +03:00
Chaosus 1333ea2a2d Implement shader array support for varyings 2019-09-14 18:23:25 +03:00
Yuri Roubinski 38601dd3e9 Fix shader crash when users miss the return statement 2019-08-28 11:32:33 +03:00
Yuri Roubinski 4dda253ee0 Implements switch to shaders 2019-08-23 14:43:09 +03:00
Yuri Roubinski a525e3c5ce Implemented do/while loops for shaders 2019-08-13 18:39:55 +03:00
Yuri Roubinski 24417f1975 Force user to initialize local shader constants 2019-08-13 12:31:25 +03:00
Cameron Reikes 9f7a166c35 Show that identifier found in function names 2019-08-09 21:15:33 -07:00
Yuri Roubinski b24b3497d6 Implemented local shader constants 2019-08-05 10:35:53 +03:00
qarmin aab8da25ad Fix some code found by Coverity Scan and PVS Studio 2019-07-23 09:14:31 +02:00