Skip to content

Unity material and shader for applying clipped, dithered transparency

License

Notifications You must be signed in to change notification settings

KatPurpy/unity-dithered-transparency-shader

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

unity-dithered-transparency-shader

example

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 so they can easily be added to and used with other shaders and functions.

In Visual Shader Builders

Amplify Shader Editor

ShaderForge

About

Unity material and shader for applying clipped, dithered transparency

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • ShaderLab 91.2%
  • C# 4.5%
  • HLSL 2.4%
  • Processing 1.9%