summaryrefslogtreecommitdiff
path: root/servers/rendering/shader_language.cpp
AgeCommit message (Collapse)Author
2022-11-01Fix predefined constants to be accessible in the shader includesYuri Rubinsky
2022-10-16Fix editor crash when assigning some uniform hints to the texturesYuri Rubinsky
2022-09-28Merge pull request #66548 from akien-mga/msvc-warnings-c4701-c4703Rémi Verschelde
Fix MSVC warnings C4701 and C4703: Potentially uninitialized variable used
2022-09-28Fix MSVC warnings C4701 and C4703: Potentially uninitialized variable usedRémi Verschelde
2022-09-28Fix MSVC warning C4702: unreachable codeRémi Verschelde
Part of #66537.
2022-09-11Prevent duplicated hints in shader uniform completionYuri Rubinsky
2022-09-07Remove `shader_type` from completion (when it does not need any more)Yuri Rubinsky
2022-08-25Allow using integer varyings with `flat` interpolation modifierYuri Rubinsky
2022-08-19Merge pull request #64167 from clayjohn/screen-texture-hintMax Hilbrunner
Add shader uniform hints for screen textures
2022-08-12Merge pull request #64310 from Chaosus/shader_texture_funcsYuri Rubinsky
2022-08-12Add `textureQueryLod/Levels` functions to the shader languageYuri Rubinsky
2022-08-12Add `textureProjGrad` function to the shader languageYuri Rubinsky
2022-08-09Add shader uniform hints for screen textures so users can specify custom ↵clayjohn
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.
2022-08-07Merge pull request #62454 from Geometror/reflect-refract-vec2-vec4Rémi Verschelde
Allow for vec2/vec4 to be used in reflect and refract
2022-08-07Allow vec2 and vec4 for reflect and refractHendrik Brucker
2022-08-03Merge pull request #63847 from Zylann/shader_switch_uintYuri Rubinsky
2022-08-02Allow shading language to use `switch` statement with uintsMarc Gilleron
2022-08-01Add `hint_transparent` to use a transparent black placeholder textureHugo Locurcio
This can be used in shaders to avoid the need to supply a transparent placeholder texture manually.
2022-07-28Rename RenderingServer global shader uniform methods to be more explicitHugo Locurcio
The `global_shader_uniform` name is longer, but it makes it much easier to find the methods when searching in the class reference.
2022-07-27Fix incorrect conversion of default value for mat4 uniform in shadersYuri Rubinsky
2022-07-26Implement shader uniform groups/subgroupsYuri Rubinsky
2022-07-25Merge pull request #63424 from Chaosus/shader_preprocessor_inc_fixRémi Verschelde
2022-07-25Fix errors when using built-ins in shaderincYuri Rubinsky
2022-07-23Implement Vector4, Vector4i, Projectionreduz
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.
2022-07-22Clean up Shader Preprocessorreduz
* 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.
2022-07-22Adding shader preprocessor supportYuri Roubinsky
Co-authored-by: TheOrangeDay <6472143+TheOrangeDay@users.noreply.github.com>
2022-06-14Remove GLES2 shader constraints from GLES3clayjohn
2022-06-10Prevent defining float constant without number after exponent in shadersYuri Rubinsky
2022-05-31Refactor shader hintsYuri Rubinsky
2022-05-24Merge pull request #60803 from Chaosus/shader_hint_renameRémi Verschelde
Rename `hint_albedo`, `hint_white/black` in shaders
2022-05-23Merge pull request #61226 from Chaosus/shader_fix_keyword_completionRémi Verschelde
2022-05-20Add a new HashSet templatereduz
* Intended to replace RBSet in most cases. * Optimized for iteration speed
2022-05-20Fix incorrect keyword completion after period in shader editorYuri Rubinsky
2022-05-19Use range iterators for RBSet in most casesAaron Record
2022-05-16Replace most uses of Map by HashMapreduz
* 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!
2022-05-09Rename `hint_albedo`, `hint_white/black` in shadersYuri Roubinsky
2022-05-04Merge pull request #60568 from Chaosus/shader_keyword_completionsRémi Verschelde
Add keyword completion to shader editor
2022-05-01Add `hint_color` support for `vec3` in shadersYuri Roubinsky
2022-04-29Add keyword completion to shader editorYuri Roubinsky
2022-04-26Prevent shader crash when using precision on boolean typesYuri Roubinsky
2022-04-20Merge pull request #60175 from Geometror/visual-shader-vector4Yuri Rubinsky
2022-04-12Add Vector4 to VisualShaderHendrik Brucker
2022-04-12Merge pull request #59825 from Chaosus/shader_fixRémi Verschelde
Fix incorrect parsing array's `length()` at return statement in shader
2022-04-06Fix some issues found by cppcheck.bruvzg
2022-04-03Fix incorrect parsing array's `length()` at return statement in shaderYuri Roubinsky
2022-04-01Fix shader crashing when attempting to access `length()` at global spaceYuri Roubinsky
2022-03-27Add GDExtension support to Scriptreduz
* 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).
2022-03-16Fix device limit exceeding for uniform buffernotSanil
2022-02-16Style: Cleanup single-line blocks, semicolons, dead codeRémi Verschelde
Remove currently unused implementation of TextureBasisU, could be re-added later on if needed and ported.
2022-02-09Fixed shader error message for instance qualifierZuBsPaCe
Moved argument from RTR to vformat. Message is now similar to uniform-arrays-error further down.