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