09 2017 档案

摘要:最近两个月学了很多Shader的知识,现在也算入点门了。现在网上有很多2D描边的Shader,说实话大多数很差劲。有些多余的条件判断影响效率,提供的参数也不够适配所有图片。因为美术喜欢在图片上面加一些效果,再加上切图的时候背景图的透明部分不够多,或者透明通道透明不彻底等等问题,2D图片描边效果通常都 阅读全文
posted @ 2017-09-29 13:51 StraussDu 阅读(9017) 评论(0) 推荐(0)
摘要:fixed3 RGBtoHSV(fixed3 c) { fixed4 K = fixed4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0); fixed4 p = lerp(fixed4(c.bg, K.wz), fixed4(c.gb, K.xy), step(c.b, c.g 阅读全文
posted @ 2017-09-29 13:23 StraussDu 阅读(153) 评论(0) 推荐(0)
摘要:Introduction We always like to define the protection level of the field as private when writing a script, but it is often wrong because of the spellin 阅读全文
posted @ 2017-09-12 01:36 StraussDu 阅读(534) 评论(0) 推荐(0)
摘要:有时我们想在添加组件时避免重复添加,就需要先把存在的组件删除。于是写出扩展方法封装AddComponent。 通过这种方式就可以直接让gameobject使用我们自己封装的方法了。 阅读全文
posted @ 2017-09-07 11:08 StraussDu 阅读(373) 评论(0) 推荐(0)