考虑了很多方案,比如渲染次序和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

相关文章:

  • 2022-12-23
  • 2022-02-27
  • 2021-08-04
  • 2021-11-23
  • 2021-12-04
  • 2021-07-10
  • 2022-12-23
  • 2021-06-13
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-09-14
  • 2021-10-01
  • 2022-12-23
  • 2021-09-11
相关资源
相似解决方案