summaryrefslogtreecommitdiffstats
path: root/servers/rendering/shader_language.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix shader handle constant expressions in function callYuri Roubinsky2021-04-271-4/+44
|
* Remove duplicate commentsDennis Brakhane2021-04-251-3/+0
| | | | | | A few single line comments were duplicated, probably due to bad merges. This commit removes the obviously duplicate ones.
* Refactor GLSL shader compilationreduz2021-04-141-29/+17
| | | | | | | | -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().
* Style: Apply clang-tidy's `readability-braces-around-statements`Rémi Verschelde2021-04-051-3/+5
|
* Style: Apply clang-tidy's `modernize-use-nullptr`Rémi Verschelde2021-04-051-3/+3
|
* Merge pull request #46522 from Ev1lbl0w/bugfix-shader_noretRémi Verschelde2021-03-011-6/+7
|\ | | | | Added missing returns on error scenarios
| * Added missing returns on error scenariosEv1lbl0w2021-02-281-6/+7
| |
* | Fix parsing hexadecimal (lowercase `e`,`f`) in shadersYuri Roubinsky2021-03-011-4/+4
|/
* Prevents shader crash if two struct with the same name are declaredYuri Roubinsky2021-02-211-0/+4
|
* Prevents shader crash if passing invalid struct to the return statementYuri Roubinsky2021-02-211-3/+5
|
* Allow passing varying from fragment to light shader functionYuri Roubinsky2021-02-111-19/+94
|
* Make hex_to_int and bin_to_int handle the prefix automaticallyAaron Franke2021-01-281-1/+1
| | | Also add BinToInt to C#
* Prevent crash due to assigning incorrect order of instance uniformYuri Roubinsky2021-01-101-1/+3
|
* Update copyright statements to 2021Rémi Verschelde2021-01-011-2/+2
| | | | | | | | | | | | | | 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 🎆
* Rename empty() to is_empty()Marcel Admiraal2020-12-281-3/+3
|
* Fix using post-init shader array constructorsYuri Roubinsky2020-12-271-139/+167
|
* Added support for constants in shader `case` and array size declarationYuri Roubinsky2020-12-171-25/+110
|
* Static analyzer fixes:bruvzg2020-12-091-2/+2
| | | | | | Removes unused code in OS. Fixes return types. Fixes few typos.
* Rename TYPE_REAL to TYPE_FLOATGeorge Marques2020-12-041-6/+6
| | | | To be consistent with the naming everywhere else.
* Remove empty lines around braces with the formatting scriptAaron Franke2020-11-161-1/+0
|
* Reorganized core/ directory, it was too fatty alreadyreduz2020-11-071-1/+1
| | | | | | -Removed FuncRef, since Callable makes it obsolete -Removed int_types.h as its obsolete in c++11+ -Changed color names code
* FIx autocompletion for emit_particle in shader editorYuri Roubinsky2020-10-131-1/+58
|
* Forbids varying declaration in particles and sky shadersYuri Roubinsky2020-09-221-0/+8
|
* Implement manual particle emission and particle sub emitters.reduz2020-09-061-71/+109
|
* Fix crash regression in the shader function validationYuri Roubinsky2020-09-051-1/+1
| | | introduced in #41780
* Improve messages in shader function validationYuri Roubinsky2020-09-051-8/+44
|
* [Complex Test Layouts] Change `String` to use UTF-32 encoding on all platforms.bruvzg2020-09-031-15/+15
|
* Fix particles shader to use built-insYuri Roubinsky2020-09-021-0/+5
|
* Make all String float conversion methods be 64-bitAaron Franke2020-07-271-1/+1
|
* Fix some incorrect conversions which lead to crash in shadersYuri Roubinsky2020-07-141-6/+6
|
* Enables 'fma' for GLES2Yuri Roubinsky2020-07-101-4/+4
|
* Added 'fma' function to shader languageYuri Roubinsky2020-07-101-0/+7
|
* Merge pull request #38713 from aaronfranke/string-64bitRémi Verschelde2020-07-011-1/+1
|\ | | | | Make all String integer conversion methods be 64-bit
| * Remove 32-bit String hex_to_int methodAaron Franke2020-06-031-1/+1
| |
* | Added const qualifier support for function arguments in shadersYuri Roubinsky2020-07-011-1/+23
| |
* | Prevents usage of return in main shader functionsYuri Roubinsky2020-06-271-0/+6
| |
* | Fix few places in shaders where const passing still incorrectYuri Roubinsky2020-06-251-2/+4
| |
* | Implemented global const array to shadersYuri Roubinsky2020-06-191-19/+237
|/
* Style: Enforce braces around if blocks and loopsRémi Verschelde2020-05-141-79/+149
| | | | | Using clang-tidy's `readability-braces-around-statements`. https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
* Style: Enforce separation line between function definitionsRémi Verschelde2020-05-141-0/+1
| | | | | | | | | | | | | | | | | | | | | | | I couldn't find a tool that enforces it, so I went the manual route: ``` find -name "thirdparty" -prune \ -o -name "*.cpp" -o -name "*.h" -o -name "*.m" -o -name "*.mm" \ -o -name "*.glsl" > files perl -0777 -pi -e 's/\n}\n([^#])/\n}\n\n\1/g' $(cat files) misc/scripts/fix_style.sh -c ``` This adds a newline after all `}` on the first column, unless they are followed by `#` (typically `#endif`). This leads to having lots of places with two lines between function/class definitions, but clang-format then fixes it as we enforce max one line of separation. This doesn't fix potential occurrences of function definitions which are indented (e.g. for a helper class defined in a .cpp), but it's better than nothing. Also can't be made to run easily on CI/hooks so we'll have to be careful with new code. Part of #33027.
* Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde2020-05-141-210/+0
| | | | | | | | | | | | | | 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.
* New lightmapperJuan Linietsky2020-05-101-7/+22
| | | | | | | -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)
* Style: clang-format: Disable AllowShortCaseLabelsOnASingleLineRémi Verschelde2020-05-101-129/+348
| | | | Part of #33027.
* Style: clang-format: Disable AllowShortIfStatementsOnASingleLineRémi Verschelde2020-05-101-2/+4
| | | | | | | Part of #33027, also discussed in #29848. Enforcing the use of brackets even on single line statements would be preferred, but `clang-format` doesn't have this functionality yet.
* Merge pull request #37795 from Chaosus/shader_fix_const_order2Rémi Verschelde2020-04-291-0/+3
|\ | | | | Fix shader constant sorting
| * Fix shader constant sortingYuri Roubinsky2020-04-111-0/+3
| |
* | Implement global and per instance shader uniforms.Juan Linietsky2020-04-171-3/+120
|/ | | | | | | | Adds two keywords to shader language for uniforms: -'global' -'instance' This allows them to reference values outside the material.
* Replace NULL with nullptrlupoDharkael2020-04-021-101/+101
|
* Prevent shader crash if multiple variables has been declared in 'for'Yuri Roubinsky2020-03-281-0/+5
|
* Renaming of servers for coherency.Juan Linietsky2020-03-271-0/+7006
VisualServer -> RenderingServer PhysicsServer -> PhysicsServer3D Physics2DServer -> PhysicsServer2D NavigationServer -> NavigationServer3D Navigation2DServer -> NavigationServer2D Also renamed corresponding files.