summaryrefslogtreecommitdiffstats
path: root/servers/rendering/shader_language.h
Commit message (Collapse)AuthorAgeFilesLines
* Add shader uniform hints for screen textures so users can specify custom ↵clayjohn2022-08-091-0/+6
| | | | | | | | filter and repeat modes. At this time, it works best in the Vulkan Renderers as they support using multiple samplers with the same texture. In GLES3 this feature really only allows you to use the screen texture without mipmaps if you want to save the cost of generating them.
* Add `hint_transparent` to use a transparent black placeholder textureHugo Locurcio2022-08-011-0/+2
| | | | | This can be used in shaders to avoid the need to supply a transparent placeholder texture manually.
* Rename RenderingServer global shader uniform methods to be more explicitHugo Locurcio2022-07-281-3/+3
| | | | | The `global_shader_uniform` name is longer, but it makes it much easier to find the methods when searching in the class reference.
* Implement shader uniform groups/subgroupsYuri Rubinsky2022-07-261-0/+6
|
* Fix errors when using built-ins in shaderincYuri Rubinsky2022-07-251-1/+2
|
* Clean up Shader Preprocessorreduz2022-07-221-4/+9
| | | | | | | | | * Moved preprocessor to Shader and ShaderInclude * Clean up RenderingServer side * Preprocessor is separate from parser now, but it emits tokens with include location hints. * Improved ShaderEditor validation code * Added include file code completion * Added notification for all files affected by a broken include.
* Adding shader preprocessor supportYuri Roubinsky2022-07-221-1/+7
| | | | Co-authored-by: TheOrangeDay <6472143+TheOrangeDay@users.noreply.github.com>
* Remove GLES2 shader constraints from GLES3clayjohn2022-06-141-1/+0
|
* Refactor shader hintsYuri Rubinsky2022-05-311-0/+4
|
* Merge pull request #60803 from Chaosus/shader_hint_renameRémi Verschelde2022-05-241-10/+6
|\ | | | | Rename `hint_albedo`, `hint_white/black` in shaders
| * Rename `hint_albedo`, `hint_white/black` in shadersYuri Roubinsky2022-05-091-10/+6
| |
* | Merge pull request #61226 from Chaosus/shader_fix_keyword_completionRémi Verschelde2022-05-231-2/+2
|\ \
| * | Fix incorrect keyword completion after period in shader editorYuri Rubinsky2022-05-201-2/+2
| | |
* | | Add a new HashSet templatereduz2022-05-201-5/+5
|/ / | | | | | | | | * Intended to replace RBSet in most cases. * Optimized for iteration speed
* / Replace most uses of Map by HashMapreduz2022-05-161-24/+24
|/ | | | | | | | | | | | * 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!
* Merge pull request #60568 from Chaosus/shader_keyword_completionsRémi Verschelde2022-05-041-0/+10
|\ | | | | Add keyword completion to shader editor
| * Add keyword completion to shader editorYuri Roubinsky2022-04-291-0/+10
| |
* | Style: Partially apply clang-tidy's `cppcoreguidelines-pro-type-member-init`Rémi Verschelde2022-05-021-9/+9
|/ | | | | | | | | | | Didn't commit all the changes where it wants to initialize a struct with `{}`. Should be reviewed in a separate PR. Option `IgnoreArrays` enabled for now to be conservative, can be disabled to see if it proposes more useful changes. Also fixed manually a handful of other missing initializations / moved some from constructors.
* Prevent shader crash when using precision on boolean typesYuri Roubinsky2022-04-261-0/+1
|
* Merge pull request #59825 from Chaosus/shader_fixRémi Verschelde2022-04-121-4/+4
|\ | | | | Fix incorrect parsing array's `length()` at return statement in shader
| * Fix incorrect parsing array's `length()` at return statement in shaderYuri Roubinsky2022-04-031-4/+4
| |
* | Zero initialize all pointer class and struct membersRémi Verschelde2022-04-041-7/+7
|/ | | | | This prevents the pitfall of UB when checking if they have been assigned something valid by comparing to nullptr.
* Add GDExtension support to Scriptreduz2022-03-271-1/+1
| | | | | | | | | * Ability to create script languages from GDExtension * Some additions to gdnative_extension.h to make this happen * Moved the GDExtension binder to core This now allows creating scripting languages from GDExtension, with the same ease as if it was a module. It replaces the old PluginScript from Godot 3.x. Warning: GodotCPP will need to be updated to support this (it may be a bit of work as ScriptInstance needs to be created over there again).
* Allow multiple declarations in for loop in a shaderYuri Roubinsky2022-02-031-1/+4
|
* Add translation links to shader errorsYuri Roubinsky2022-01-191-0/+20
|
* Unify variable and array declarations in shadersYuri Roubinsky2022-01-181-24/+5
|
* Refactor size expression parsing for arrays in the shadersYuri Roubinsky2022-01-151-4/+1
|
* Add completion for shader_typeYuri Roubinsky2022-01-131-0/+1
|
* Update copyright statements to 2022Rémi Verschelde2022-01-031-2/+2
| | | | Happy new year to the wonderful Godot community!
* Add a shader warning when the uniform buffer limit is exceededYuri Roubinsky2022-01-031-5/+8
|
* Allow pass varyings as out param to the function, when it's possibleYuri Roubinsky2021-12-231-9/+0
|
* Refactor render_mode in shaders, forbid declaring duplicatesYuri Roubinsky2021-12-211-2/+53
|
* Rename shader hint `filter_anisotropy` to `filter_anisotropic`Yuri Roubinsky2021-12-151-4/+4
|
* Fix shader array parsing in variable declarationYuri Roubinsky2021-12-151-1/+1
|
* Merge pull request #55913 from Chaosus/fix_shader_crashRémi Verschelde2021-12-151-1/+1
|\
| * Fix shader crash when assigned array from struct to a variable by indexYuri Roubinsky2021-12-131-1/+1
| |
* | Rename shader hint `filter_aniso` to `filter_anisotropy`Yuri Roubinsky2021-12-151-4/+4
|/
* Rename `hint_aniso` to `hint_anisotropy` in the shader languageHugo Locurcio2021-12-101-2/+2
| | | | | The word "anisotropy" is used in full form in BaseMaterial3D's anisotropy-related properties.
* Refactor constant suffix parsing in a shaderYuri Roubinsky2021-12-101-0/+6
|
* Added completion for uniform hints in a shaderYuri Roubinsky2021-12-101-0/+4
|
* Make `compile` shader function to use struct instead long parameter listYuri Roubinsky2021-12-081-2/+11
|
* Allow using empty statements in the shader, added formatting warningYuri Roubinsky2021-12-011-0/+1
|
* Fix built-in(PI, TAU, E) assignment to a global constant in a shaderYuri Roubinsky2021-11-291-1/+1
|
* Added few more built-ins to shader languageYuri Roubinsky2021-10-131-1/+10
|
* Allow declare the shader arrays with a size defined before identifierYuri Roubinsky2021-10-081-0/+4
|
* Fix shader crash when passing array.length to functionsYuri Roubinsky2021-10-051-1/+0
| | | and similar cases
* Added support for uniform arrays in shadersYuri Roubinsky2021-10-041-1/+3
|
* More fixes to mobile rendererreduz2021-08-181-0/+1
| | | | | * Specify all precision qualifiers * Makes renderer work on Adreno Vulkan
* Fix shader crash when using local var with the same name as varyingYuri Roubinsky2021-08-131-0/+2
|
* Added parameter names to shader built-in function autocompletionYuri Roubinsky2021-08-121-0/+1
|