Search Issue Tracker

Fixed in 5.5.0

Votes

61

Found in

5.0.1f1

Issue ID

686520

Regression

Yes

Shadow moves in relation to the object that casts it when using a custom projection matrix

Shadows/Lights

-

Reproduction steps:
1. Open the attached project "ShadowProjection 5.0"
2. Open the scene "Scene"
3. Select the camera and change it's "Oblique" value
4. In the game view notice when you change the "Oblique" value the shadows will move relative to the objects that cast them (see Oblique.gif)
5. Open the project "ShadowProjection 4.6.3p3.zip" in Unity 4.6
6. Open the scene "Scene"
7. Select the camera and change it's "Oblique" value
8. Notice that the shadow stays in its place

Comments (21)

  1. Honorsoft

    Dec 06, 2017 19:04

    As of Unity 5.5.4 realtime shadows are still not working on some(if not all) 32-bit systems. As with many other people with the same un-resolved issue, our projects that had realtime shadows worked fine in Unity 4.x and below, but Unity 5.x objects do not cast any shadows on the ground.
    I have not changed hardware/drivers, so the problem is obviously a Unity-based one.

  2. monark

    Nov 10, 2016 13:46

    This is a very bad solution only supporting 5.4 means it can't be ported into Webplayer builds as 5.4 no long supports that pipeline.

  3. Zema

    Aug 10, 2016 20:23

    So after testing the posted solution with Unity 5.4.1 and my custom projection setup in deferred rendering, I have observed that this will only work for a shadows from a Directional Light(s).
    Having a single Point or Spot light will still result in the same behaviour for any shadows cast by these lights.

    How can I go about solving this for non-screen space shadows like those rendered from positional lights and derived from AutoLight.cginc

  4. fguinier

    Feb 23, 2016 06:59

    Hi All,

    To deliver the fix faster we have decided to deliver it as a unity package ->

    To do so please:
    * Download http://files.unity3d.com/florent/Fixes/FixFor686520_ScreenSpaceShadow.unitypackage
    * Import the package into your beloved 5.4 Unity project.
    * Attach the ReplaceScreenSpaceShadowsShader script to the camera using a custom perspective matrice.

    PS : BuiltinShaderType.ScreenSpaceShadows was not exposed in yet in Unity 5.3. Please upgrade to Unity 5.4 if you need this fix.

    As a consequence the fix wont be ported to unity 5.3/5.4, it will be fixed engine side starting from unity 5.5 (and we will probably ship that version with a better fix especially in term of performance)

    Have a good day!

    Florent

  5. Art-Leaping

    Feb 18, 2016 19:54

    Excellent news! Will it be in one of the 5.4 betas prior to release? Would be good for at least pro users to have the chance to test it with their individual cases before it's declared solved.

  6. fguinier

    Feb 18, 2016 14:02

    Hi All,
    Just to let you know that a fix is on its way (being validated atm). The goal is to have it included to 5.3 and 5.4 release.

    Have a good day

    Florent

  7. Art-Leaping

    Feb 15, 2016 22:36

    Hi Karl,

    This issue has not been resolved in 5.4 - I just tested it.

    See example here: http://artleaping.com/off_site_hosting/randomstuff/ProjectionMatrixShadowIssue.gif

    If you need me to provide a sample project, I can do so.

    Thanks!

  8. jpfranssen

    Jan 25, 2016 21:53

    Added my vote too, @Karl.Jones any news/patches/workarounds? This issue is unfortunately stopping us to move to Unity5 :-(

  9. matpow2

    Jan 07, 2016 15:15

    It would be nice if this issue could be reopened, since it hasn't been fixed in 5.3.1 yet (including any of the patch releases).

    For anyone experiencing this issue, there's been some recent discussion in this thread:
    http://forum.unity3d.com/threads/shadows-with-custom-projection-matrix-still-broken-in-5-3-0f4.372623/

  10. Alkann

    Dec 21, 2015 09:48

    Release notes for 5.3.1 http://unity3d.com/unity/whats-new/unity-5.3.1
    say that this issue has been fixed so I downloaded it but no changes.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.