summaryrefslogtreecommitdiff
path: root/servers/rendering/shader_language.cpp
AgeCommit message (Collapse)Author
2023-05-12Enable shadow warnings and fix raised errorsNinni Pipping
(cherry picked from commit 71ee65dc5701a0675ae6b1879a694a28c7206a63)
2023-03-13Error on hint_normal_roughness_texture and hint_depth_texture outside of ↵Fabio Iotti
spatial shader (cherry picked from commit 528e0d095eba65804e3b4174f8138cdc920382a9)
2023-02-21Forbid passing multiview sampler to the custom function in shadersYuri Rubinsky
2023-02-13Improvements and fixes based on Weblate commentsHaoyu Qiu
* Description of `ui_text_submit` action should be "Submit Text" instead of "Text Submitted". * Spell out "Animation" instead of using "Anim.". * Treat "Max" as regular word instead of writing "Max.". * Use generic "Set %s" for action name instead of a dedicated "Set target_position". * Add translator comment for: * "Inclusive" and "Self" in the profiler. * Places where it needs the context about being an editor progress label. * "Duplicated Animation Name" since it's refering to the new name of a duplicated animation. * Disambiguation of "View Plane Transform", "Paste Selects" and "Display Normal". * Fix wrong undo action name for renaming an input action. * Fix missing end quote in a shader error message. * In class reference: * Fix duplicated "if" in the description of `signf()`. * Fix mismatched example output in `String.operator %()`. * Fix typo in the description of `Decal.texture_emission`. * Unify description of `String.match()` and `StringName.match()`.
2023-02-09Improve some editor strings for localizationHaoyu Qiu
2023-02-08Mark fma function as high end so it isn't used with the gl_compatibility ↵clayjohn
renderer
2023-02-02Merge pull request #72494 from Chaosus/shader_fix_const_initRémi Verschelde
Fix shader failure when using non-const initializer on a constant
2023-02-01More codespell fixes, do more changes from previous ignore listRémi Verschelde
2023-02-01Fix shader failure when using non-const initializer on a constantYuri Rubinsky
2023-01-30Add a shader error when trying to using hint_normal_roughness_texture in the ↵clayjohn
gl_compatibility renderer
2023-01-26Merge pull request #72138 from clayjohn/GL-globalsRémi Verschelde
Properly append global uniform buffer name in gl_compatibility shaders
2023-01-26Merge pull request #72109 from Chaosus/shader_derivativeRémi Verschelde
Add derivative functions with precision to shaders
2023-01-26Properly append global uniform buffer name in gl_compatibility shadersclayjohn
Also error when using instance uniforms
2023-01-26Add derivative functions with precision to shadersYuri Rubinsky
2023-01-26Several shader preprocessor parser fixes and improvementsbitsawer
2023-01-25Fix array of token names in the shader parser Yuri Rubinsky
2023-01-20Fix type in hint when using removed built-in texturesPrecisionRender
2023-01-20Decrement texture_binding count when using screen texturesclayjohn
2023-01-18Remove SCREEN_TEXTURE, DEPTH_TEXTURE, and NORMAL_ROUGHNESS_TEXTUREclayjohn
in favour of texture hints
2023-01-05One Copyright Update to rule them allRémi Verschelde
As many open source projects have started doing it, we're removing the current year from the copyright notice, so that we don't need to bump it every year. It seems like only the first year of publication is technically relevant for copyright notices, and even that seems to be something that many companies stopped listing altogether (in a version controlled codebase, the commits are a much better source of date of publication than a hardcoded copyright statement). We also now list Godot Engine contributors first as we're collectively the current maintainers of the project, and we clarify that the "exclusive" copyright of the co-founders covers the timespan before opensourcing (their further contributions are included as part of Godot Engine contributors). Also fixed "cf." Frenchism - it's meant as "refer to / see".
2022-12-23Fix shader crash when using boolean type for vertex->fragment varyingsYuri Rubinsky
2022-12-20Add missing != operator to `StringName`Yuri Rubinsky
2022-11-24Add MAKE_RESOURCE_TYPE_HINT macro to simplify binding arrays of resourcesRémi Verschelde
2022-11-22Shader: Set proper resource type hints for sampler uniformsRémi Verschelde
Supersedes #64383.
2022-11-21Code simplifications found by cppcheckMarkus Sauermann
They are based on: - Boolean arithmetic simplifications - setting variables that are not accessed - constant variables
2022-11-17Fix global uniforms parsed as instance uniformLily Garcia
2022-11-16Merge pull request #68718 from dzil123/fix_fog_shader_buffer_overflowRémi Verschelde
Fix shader compiler asan out of bounds
2022-11-15Mark shader built-ins as used when passed to functions as out parameter Yuri Rubinsky
2022-11-15Fix Fog shader buffer overflowdzil123
2022-11-14Remove redundant Variant-types initializationsMarkus Sauermann
2022-11-09Some fixes for instance shader parametersYuri Rubinsky
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.