https://github.com/ulastosun/unity-shader-graph-examples
An example Unity project for Shader Graph, including custom HLSL functions, UI shaders and custom post-processing effects.
https://github.com/ulastosun/unity-shader-graph-examples
unity-shader unity-shader-graph unity3d
Last synced: 4 months ago
JSON representation
An example Unity project for Shader Graph, including custom HLSL functions, UI shaders and custom post-processing effects.
- Host: GitHub
- URL: https://github.com/ulastosun/unity-shader-graph-examples
- Owner: UlasTosun
- Created: 2025-01-27T18:29:12.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-01T10:47:25.000Z (over 1 year ago)
- Last Synced: 2025-05-07T12:56:19.409Z (about 1 year ago)
- Topics: unity-shader, unity-shader-graph, unity3d
- Language: ShaderLab
- Homepage:
- Size: 1.13 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Unity Shader Graph Examples
According to [documentation]( https://docs.unity3d.com/Packages/com.unity.shadergraph@17.0/manual/index.html), Shader Graph enables developers to build shaders visually. Instead of writing code, developers create and connect nodes in a graph framework.
This repository includes a couple of specific example cases of Shader Graph such as custom post processing, custom HLSL functions and shaders for UI.
## Example Cases
**Custom HLSL Functions:** Shader Graphs enables developers to add custom HLSL functions to graphs as nodes. Using graphs creates a visual experience for developing, however sometimes it can be exhausting, because you may need tens of nodes to be able to create simple shaders. Also, built-in nodes cannot be enough for purposes. In those cases, adding custom functions is very useful. This example case provides a basic custom function which animates the color in a sinusoidal form.
**Custom Post Processing:** Newer Shader Graph versions (URP 14.0+) have the ability of creating shaders for custom post processing. This example provides a custom post processing shader which converts screen into grayscale colors with a circular animation.


**Shader Graph for UI (Newer Versions):** Newer Shader Graph versions (URP 16.0+) can create canvas shaders to use for UI. This example case includes a basic canvas shader which blends two textures with an adjustable border.

**Shader Graph for UI (Older Versions):** It provides an example UI shader which is based on sprite unlite shaders for older versions.
