码迷,mamicode.com
首页 > 编程语言 > 详细

Unity3D PerRendererData

时间:2015-05-19 20:34:59      阅读:304      评论:0      收藏:0      [点我收藏+]

标签:

http://nordicedu.com/tkokblog/wordpress/?tag=perrendererdata

 

MaterialPropertyBlock and SpriteRenderer

Once again the “Unity-way” supraised me. I made this simple Dissolve shader for sprites. There were many difficulties on a way but the most ambiguous one was releated to SpriteRenderer and MaterialPropertyBlock.

When you do your own shader for sprites and want to use the MaterialPropertyBlock to send some [PerRendererData] you have to use Renderer.GetMaterialPropertyBlock first becouse Unity uses MaterialPropertyBlocks internaly for Sprite rendering and you don’t want to mess it up.

 

 

 

Posted in Uncategorized Tagged ,

Unity3D PerRendererData

标签:

原文地址:http://www.cnblogs.com/lilei9110/p/4515333.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!