unity 部分obj不接受后处理

考虑了很多方案,比如渲染次序和mask(stencilebuffer)

渲染次序

sorting order(深度) renderer都有的属性能开放出来,sprite renderer原本就开放在inspector里面了

https://unity3d.com/cn/learn/tutorials/topics/2d-game-creation/sorting-layers

 

render queue 在shader里面设置 

https://docs.unity3d.com/ScriptReference/Rendering.RenderQueue.html

https://docs.unity3d.com/ScriptReference/Material-renderQueue.html

https://docs.unity3d.com/462/Documentation/Manual/SL-SubshaderTags.html

 

command buffer 在pp后面自己画

https://docs.unity3d.com/Manual/GraphicsCommandBuffers.html

 

最后发现用camera  一个挂pp一个不挂 , 不要pp的obj用不挂的camera layer画

不挂pp的camera depth值大一些在前面就ok了 unity很强大

这说明它管线做的相当碎了comman buffer

posted on 2018-01-11 17:20  minggoddess  阅读(950)  评论(1编辑  收藏  举报