Publisher
flamelizard
ShaderFunction-Extras
This addon aims to help Godot developers writing custom written shaders by providing high-level functions which are often used inside gdshaderinclude files.
This plugin has been mirrored from the Godot Asset Library.
The plugin author is in no way affiliated with Gadget.
If you are the author of this plugin and would like this mirror removed, please contact support@gadgetgodot.com.
ShaderFunction-Extras

This project aims to help Godot developers writing custom written shaders by providing high-level functions which are often used.
:tada: Using the addon
Download the source (releases and AssetLib version are still WIP) and put the ShaderFunction-Extras inside
your addons folder. If you don't have one, create it or put the whole addons folder inside your project directory.
After that, you can include the include files you need in your shader like this:

🔢 Versioning
This repository is only meant for projects created with Godot 4.0 and upwards. However, if you are using Godot 3.x and want to use specific functions, you can copy and paste it inside your shader code still.
ℹ️ Contributing
All these shader functions are based on publicly available shader functions (open-source licensed with permissive licenses such as MIT). If you want to contribute a function, create an issue starting with Proposal: ... describing the shader function and why you think it should be included in here. We can then discuss on how this function and its parameters should be called (for clarity of the users). After that you are open to create a PR (Pull Request) with the dicussed details of the proposal.
Provided Functions
Click me to enlarge
Color
Blend Modes
blend_normalblend_dissolveblend_multiplyblend_screenblend_overlayblend_hard_lightblend_soft_lightblend_burnblend_dodgeblend_lightenblend_darkenblend_differenceblend_additiveblend_addsubblend_linear_lightblend_vivid_lightblend_pin_lightblend_hard_mixblend_exclusion
Color Adjustment
greyscalehsv_to_rgbrgb_to_hsvhsv_adjustment
Noise
psrdnoise3_with_gradientpsrdnoise3psrdnoise2_with_gradientpsrdnoise2
Utility
depth_camera_*depth_vertex_*linear_scene_depth_*distance_fadeproximity_camera_fade_*proximity_vertex_fade_*world_position_from_depth_*screen_normal_world_spacerotation_matrix_by_axisrotate_by_axisrandom_rangeremapfresnelfresnel_glowsmooth_clampsoft_clampsaturatevertex_billboard
UV
uv_panninguv_scalinguv_rotateuv_polar_coord_*uv_flipbookuv_twirluv_grid_tiler
Wave
sawtooth_wavesine_wavesine_wave_angularsquare_wavetriangle_wave
Shapes
polygoncirclesquaresquare_strokesquare_roundedswirlline