Search Unity

Resolved Can a Custom Render Pipeline support Shadow Cascades on mobile?

Discussion in 'General Graphics' started by UBayir, Nov 19, 2021.

  1. UBayir

    UBayir

    Joined:
    Feb 4, 2015
    Posts:
    24
    Is there a possibility that we can write our own custom render pipeline that supports shadow cascades on mobile?
    My game has a large open space and 2 cascades can make the resolution good enough for me.
    Without a cascade I have to cut the visible area to like 100 meters to make the shadow resolution good enough for close objects like the player itself or the npc enemies.
     
  2. cholleme

    cholleme

    Unity Technologies

    Joined:
    Apr 23, 2019
    Posts:
    31
    Yes it's possible to write an custom RP that supports cascades. This involves around the use of ShadowSplitData. It's probably easiest to look at how URP uses this info to figure out how to render cascades.
     
  3. UBayir

    UBayir

    Joined:
    Feb 4, 2015
    Posts:
    24
    I'll get to work then
    Thank you so much for the answer.
     
  4. BattleAngelAlita

    BattleAngelAlita

    Joined:
    Nov 20, 2016
    Posts:
    400
    >cholleme
    Would be great if you opensourced what happens inside ComputeDirectionalShadowMatricesAndCullingPrimitives
     
  5. UBayir

    UBayir

    Joined:
    Feb 4, 2015
    Posts:
    24
    I will if I can handle it properly