summaryrefslogtreecommitdiffstats
path: root/servers/rendering/shader_language.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
| * Fix MSVC warnings C4701 and C4703: Potentially uninitialized variable usedRémi Verschelde2022-09-281-2/+2
| |
* | Fix MSVC warning C4702: unreachable codeRémi Verschelde2022-09-281-2/+0
|/ | | | Part of #66537.
* Prevent duplicated hints in shader uniform completionYuri Rubinsky2022-09-111-14/+34
|
* Remove `shader_type` from completion (when it does not need any more)Yuri Rubinsky2022-09-071-2/+6
|
* Allow using integer varyings with `flat` interpolation modifierYuri Rubinsky2022-08-251-4/+9
|
* Merge pull request #64167 from clayjohn/screen-texture-hintMax Hilbrunner2022-08-191-4/+33
|\ | | | | Add shader uniform hints for screen textures
| * Add shader uniform hints for screen textures so users can specify custom ↵clayjohn2022-08-091-4/+33
| | | | | | | | | | | | | | | | 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.
* | Merge pull request #64310 from Chaosus/shader_texture_funcsYuri Rubinsky2022-08-121-0/+26
|\ \
| * | Add `textureQueryLod/Levels` functions to the shader languageYuri Rubinsky2022-08-121-0/+26
| | |
* | | Add `textureProjGrad` function to the shader languageYuri Rubinsky2022-08-121-0/+12
|/ /
* | Merge pull request #62454 from Geometror/reflect-refract-vec2-vec4Rémi Verschelde2022-08-071-0/+4
|\ \ | |/ |/| Allow for vec2/vec4 to be used in reflect and refract
| * Allow vec2 and vec4 for reflect and refractHendrik Brucker2022-08-071-0/+4
| |
* | Merge pull request #63847 from Zylann/shader_switch_uintYuri Rubinsky2022-08-031-3/+6
|\ \
| * | Allow shading language to use `switch` statement with uintsMarc Gilleron2022-08-021-3/+6
| | |
* | | Add `hint_transparent` to use a transparent black placeholder textureHugo Locurcio2022-08-011-0/+9
|/ / | | | | | | | | 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.
* | Fix incorrect conversion of default value for mat4 uniform in shadersYuri Rubinsky2022-07-271-12/+5
| |
* | Implement shader uniform groups/subgroupsYuri Rubinsky2022-07-261-0/+44
| |
* | Merge pull request #63424 from Chaosus/shader_preprocessor_inc_fixRémi Verschelde2022-07-251-63/+184
|\ \
| * | Fix errors when using built-ins in shaderincYuri Rubinsky2022-07-251-63/+184
| | |
* | | Implement Vector4, Vector4i, Projectionreduz2022-07-231-7/+23
|/ / | | | | | | | | | | | | | | | | | | | | | | | | Implement built-in classes Vector4, Vector4i and Projection. * Two versions of Vector4 (float and integer). * A Projection class, which is a 4x4 matrix specialized in projection types. These types have been requested for a long time, but given they were very corner case they were not added before. Because in Godot 4, reimplementing parts of the rendering engine is now possible, access to these types (heavily used by the rendering code) becomes a necessity. **Q**: Why Projection and not Matrix4? **A**: Godot does not use Matrix2, Matrix3, Matrix4x3, etc. naming convention because, within the engine, these types always have a *purpose*. As such, Godot names them: Transform2D, Transform3D or Basis. In this case, this 4x4 matrix is _always_ used as a _Projection_, hence the naming.
* | Clean up Shader Preprocessorreduz2022-07-221-164/+43
| | | | | | | | | | | | | | | | | | * 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-26/+191
| | | | | | | | Co-authored-by: TheOrangeDay <6472143+TheOrangeDay@users.noreply.github.com>
* | Remove GLES2 shader constraints from GLES3clayjohn2022-06-141-276/+214
|/
* Prevent defining float constant without number after exponent in shadersYuri Rubinsky2022-06-101-1/+5
|
* Refactor shader hintsYuri Rubinsky2022-05-311-161/+319
|
* Merge pull request #60803 from Chaosus/shader_hint_renameRémi Verschelde2022-05-241-48/+34
|\ | | | | Rename `hint_albedo`, `hint_white/black` in shaders
| * Rename `hint_albedo`, `hint_white/black` in shadersYuri Roubinsky2022-05-091-48/+34
| |
* | Merge pull request #61226 from Chaosus/shader_fix_keyword_completionRémi Verschelde2022-05-231-0/+9
|\ \
| * | Fix incorrect keyword completion after period in shader editorYuri Rubinsky2022-05-201-0/+9
| | |
* | | Add a new HashSet templatereduz2022-05-201-10/+10
|/ / | | | | | | | | * Intended to replace RBSet in most cases. * Optimized for iteration speed
* | Use range iterators for RBSet in most casesAaron Record2022-05-191-10/+10
| |
* | Replace most uses of Map by HashMapreduz2022-05-161-29/+29
|/ | | | | | | | | | | | * 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-108/+484
|\ | | | | Add keyword completion to shader editor
| * Add keyword completion to shader editorYuri Roubinsky2022-04-291-108/+484
| |
* | Add `hint_color` support for `vec3` in shadersYuri Roubinsky2022-05-011-10/+32
|/
* Prevent shader crash when using precision on boolean typesYuri Roubinsky2022-04-261-63/+78
|
* Merge pull request #60175 from Geometror/visual-shader-vector4Yuri Rubinsky2022-04-201-4/+4
|\
| * Add Vector4 to VisualShaderHendrik Brucker2022-04-121-4/+4
| |
* | Merge pull request #59825 from Chaosus/shader_fixRémi Verschelde2022-04-121-5/+2
|\ \ | |/ |/| 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-5/+2
| |
* | Fix some issues found by cppcheck.bruvzg2022-04-061-18/+18
|/
* Fix shader crashing when attempting to access `length()` at global spaceYuri Roubinsky2022-04-011-6/+18
|
* Add GDExtension support to Scriptreduz2022-03-271-32/+32
| | | | | | | | | * 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).
* Fix device limit exceeding for uniform buffernotSanil2022-03-161-2/+2
|
* Style: Cleanup single-line blocks, semicolons, dead codeRémi Verschelde2022-02-161-1/+2
| | | | | Remove currently unused implementation of TextureBasisU, could be re-added later on if needed and ported.
* Fixed shader error message for instance qualifierZuBsPaCe2022-02-091-2/+2
| | | | Moved argument from RTR to vformat. Message is now similar to uniform-arrays-error further down.
* Fix unknown identifier error in for loopYuri Roubinsky2022-02-061-11/+11
|
* Few more fixes to for loop in shadersYuri Roubinsky2022-02-051-17/+34
|
* Cleanup and move char functions to the `char_utils.h` header.bruvzg2022-02-041-20/+8
|