mirror of
https://github.com/drewcassidy/KSP-Conformal-Decals.git
synced 2024-09-01 18:23:54 +00:00
Add text decal shader
This commit is contained in:
@ -29,10 +29,17 @@ float sdRoundedUVBox( float2 uv, float r ) {
|
||||
return sdRoundedBox(pos, halfDim, r);
|
||||
}
|
||||
|
||||
float SDFAA(float dist) {
|
||||
float ddist = length(float2(ddx(dist), ddy(dist)));
|
||||
inline float SDFdDist(float dist) {
|
||||
return length(float2(ddx(dist), ddy(dist)));
|
||||
}
|
||||
|
||||
inline float SDFAA(float dist, float ddist) {
|
||||
float pixelDist = dist / ddist;
|
||||
return saturate(0.5-pixelDist);
|
||||
}
|
||||
|
||||
inline float SDFAA(float dist) {
|
||||
return SDFAA(dist, SDFdDist(dist));
|
||||
}
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user