ARPG scene assets from old project are now correctly visualizing sectors generated by ZoneGenerator and updated by GameContext
17 lines
No EOL
416 B
HLSL
17 lines
No EOL
416 B
HLSL
#ifndef __DITHER_FUNCTIONS__
|
|
#define __DITHER_FUNCTIONS__
|
|
#include "UnityCG.cginc"
|
|
|
|
sampler2D _DitheringTex;
|
|
float4 _DitheringCoords;
|
|
|
|
float isDithered(float2 pos, float alpha) {
|
|
float dither = tex2D(_DitheringTex, pos * _DitheringCoords.xy + _DitheringCoords.zw).r;
|
|
return alpha - dither - 0.0001 * (1 - ceil(alpha));
|
|
}
|
|
|
|
void ditherClip(float2 pos, float alpha) {
|
|
clip(isDithered(pos, alpha));
|
|
}
|
|
|
|
#endif |