Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

Stable Fit shadow, how does LWRP do it?

Discussion in 'Graphics Experimental Previews' started by bitinn, Aug 21, 2019.

  1. bitinn

    bitinn

    Joined:
    Aug 20, 2016
    Posts:
    552
    I am reading LWRP source and failed to find the secret sauce that make shadow stable (eg. no shimmering due to camera movement)

    Screen Shot 2019-08-21 at 14.24.36.png Screen Shot 2019-08-21 at 14.24.39.png

    (I am writing my own custom SRP and I would like to know how and where LWRP did it...)
     
  2. phil_lira

    phil_lira

    Unity Technologies

    Joined:
    Dec 17, 2014
    Posts:
    385
  3. bitinn

    bitinn

    Joined:
    Aug 20, 2016
    Posts:
    552
  4. bitinn

    bitinn

    Joined:
    Aug 20, 2016
    Posts:
    552
    Holy, I found the problem: I was passing the resolution of the entire shadow map to ComputeDirectionalShadowMatricesAndCullingPrimitives, when in fact I should be passing tile resolution (eg. resolution of the shadow cascade tile).