Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gkjohnson/unity-dithered-transparency-shader
Unity material and shader for applying clipped, dithered transparency
https://github.com/gkjohnson/unity-dithered-transparency-shader
3d amplify-shader-editor dither graphics rendering shaderforge shaders transparency unity unity3d
Last synced: 9 days ago
JSON representation
Unity material and shader for applying clipped, dithered transparency
- Host: GitHub
- URL: https://github.com/gkjohnson/unity-dithered-transparency-shader
- Owner: gkjohnson
- License: mit
- Created: 2017-08-27T20:26:44.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2021-01-03T17:13:11.000Z (almost 4 years ago)
- Last Synced: 2024-10-18T21:58:20.971Z (21 days ago)
- Topics: 3d, amplify-shader-editor, dither, graphics, rendering, shaderforge, shaders, transparency, unity, unity3d
- Language: ShaderLab
- Homepage:
- Size: 2.23 MB
- Stars: 296
- Watchers: 14
- Forks: 30
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-unity-open-source-on-github - unity-dithered-transparency-shader - Unity material and shader for applying clipped, dithered transparency (Other Shaders)
README
# unity-dithered-transparency-shader
![example](./docs/example.gif)
Unity shader to enable a dithered transparency when rendering transparent objects
## Use
Uses the material's alpha to determine whether a pixel should be discarded or not. Either a dither matrix or dither texture can be used.
## Dither Options
**Dither Texture**Texture defining the dither pattern. The "red" channel is used from the texture to compare against the materials alpha.
**Dither Scale**
The scale of the dither texture in screen-space pixels.
## Extending and Reuse
The functions for performing the dither effect are available in the [Dither Functions.cginc](./Assets/DitherFunctions/Shaders/Dither%20Functions.cginc) so they can easily be added to and used with other shaders and functions.### In Visual Shader Builders
[Amplify Shader Editor](/docs/AmplifyShaderEditor.md)
[ShaderForge](/docs/ShaderForge.md)