This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
InUV.y = InUV.y - TopUVOffset; | |
float2 FGTexUV = InUV; | |
float2 BGTexUV = InUV; | |
float2 MGTexUV = InUV; | |
float2 BGGoodsTexUV = InUV; | |
float2 Goods1UV = InUV; | |
float2 Goods2UV = InUV; | |
float2 LabelTexUV = InUV; | |
float2 LogoTexUV = InUV; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//思路 | |
//1.0 当前像素Alpha值>0 | |
//2.0 横向羽化; | |
//2.1 做好uv范围限制 | |
//参数需要 | |
//1.羽化像素个数; | |
//2.图片像素 | |
//图片尺寸 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//思路 | |
//1.0 当前像素Alpha值>0 | |
//2.0 横向羽化; | |
//2.1 做好uv范围限制 | |
//参数需要 | |
//1.羽化像素个数; | |
//2.图片像素 | |
//图片尺寸 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//圆角 | |
float2 UV = uvs; | |
float PixelRange = min(min(SizeX/2,SizeY/2),Range); | |
//当前绘制的像素 | |
float2 CurrentP = float2(UV.x*SizeX,UV.y*SizeY); | |
//像素坐标参照点 | |
//float2 MiddleP=float2(0.5*SizeX,0.5*SizeY); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
float _Tolerance; | |
float _Threshold; | |
// Color Space Conversions can be found here: | |
// http://www.poynton.com/PDFs/coloureq.pdf | |
// http://dougkerr.net/Pumpkin/articles/CIE_XYZ.pdf | |
// cn -> color normalization | |
float cnRGB2XYZ(float val) { | |
if(val > 0.04045) { | |
return pow((val + 0.055) / 1.055, 2.4); | |
} |