ORL Shaders

orels Unity Shaders

A collection of practical Unity shaders for your next project.

PBR Shaders
18
Toon Shaders
5
VFX Shaders
12
UI Shaders
12

Roadmap

Upcoming, Planned, and Released Features

Add LOD Cross Fade support to the Cutout shader
Close

Unity enables shaders to smoothen the transition between LOD meshes (and during culling) and a good balanced approach is to do it with a cutout shader and dithering.

You just have to make the CutoutFragment() look something like this

sampler2D unity_DitherMask;

void CutoutFragment() {

float2 vpos = d.screenPos.xy / d.screenPos.w * _ScreenParams.xy;

vpos /= 4; // the dither mask texture is 4x4
float mask = tex2D(unity_DitherMask, vpos).a;
float sgn = unity_LODFade.x > 0 ? 1.0f : -1.0f;
clip(unity_LODFade.x - mask * sgn);

#if !defined(_NATIVE_A2C)
if (o.Alpha < _Cutoff) {
clip(-1);
}
#endif
}

Code is taken from https://github.com/keijiro/CrossFadingLod and UnityCG.cginc

Released In: v6.3.0
Connected Issue
Leave your comments and suggestions on GitHub
Original issue in GitHub

In Next Release

Planned

Released