摘要:
原理 采样5x5范围的像素(即25个像素),然后按中间往外减少的权重值,计算出最终颜色值。 效果 c#代码 using UnityEngine; public class GaussianBlurEff : MonoBehaviour { public Shader m_Shader; public 阅读全文
摘要:
原理 就是取自身以及该像素周围的8个像素的颜色值相加,然后除9取个平均值,得到最终颜色值 效果 因为模糊后会出现一些方形的像素效果,模糊效果不是很平均,所以均值模糊也叫做盒状模糊。 c#代码 using UnityEngine; public class BoxBlurEff : MonoBehav 阅读全文
摘要:
就是将颜色值通过映射公式得到另一种颜色值,比如:将颜色值*0.8也算是映射公式 但这边介绍的映射公式可以得到一种电影校色的效果,至于原理,一般都是经验公式。 效果 c#代码 using UnityEngine; public class TonemappingEff : MonoBehaviour 阅读全文
摘要:
效果 c#代码 using UnityEngine; public class MyBrightnessSaturationAndContrast : MonoBehaviour { public Shader m_Shader; public Material m_Material; [Range 阅读全文
摘要:
lua下常用的2个protobuf库 1) GitHub - starwing/lua-protobuf: A Lua module to work with Google protobuf 2) GitHub - cloudwu/pbc: A protocol buffers library fo 阅读全文