Unity3D PerRendererData


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 MaterialMaterialPropertyBlockPerRendererDataShaderSpriteSpriteRenderer,


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM