Tekkaman

导航

 

2014年12月9日

摘要: 【Glow Shader】 Glow Shader基于BlurShader来实现。总的来说分为2步: 1、利用BlurShader渲染出BlurTexture。 2、将BlurTexture与SrcTexture累加在一起。此步利用GlowShader。 本质就是第二步,将SrcTe... 阅读全文
posted @ 2014-12-09 18:37 Tekkaman 阅读(2308) 评论(0) 推荐(0) 编辑
 
摘要: 【Shder中实现TintColor】 TintColor实现上相当于一个滤镜,若TintColor的R为0,则原图的R通道颜色应该为0。基于此,实现TintColor很容易,原图颜色直接乘以TintColor即可。 下图的_Color.rgb即为TintColor。 而TintColor... 阅读全文
posted @ 2014-12-09 17:30 Tekkaman 阅读(339) 评论(0) 推荐(0) 编辑
 
摘要: 【AABB和平面的相交性检测】 阅读全文
posted @ 2014-12-09 14:30 Tekkaman 阅读(453) 评论(0) 推荐(0) 编辑
 
摘要: 【射线的相交性检测】 定义2条射线:r(t1)=p1+t1*d, r(t2)=p2+t2*d. 为了简化2条射线的处理,先考虑t1,t2可取任意值的情况,此时r(t1)、r(t2)即化身为2条直线。 3D空间中直线相交情况总共有4种: 以及不共面。 下面演示如何解得t1,t2: ... 阅读全文
posted @ 2014-12-09 09:15 Tekkaman 阅读(510) 评论(0) 推荐(0) 编辑