Skip to main content
Up and Coming
March 8, 2016

MAJOR ISSUE with Unity Shadows and Parallax Textures

--- EDIT ---

Half-Fixed with latest Unity 5.4.0b9 released (see page 2 for more info).

--- END OF EDIT ---


Hi,

I'm currently updating my game from 0.4.4 runtime to 0.8 runtime.

With 0.4.4 runtime, my player was based on OculusUtilies exemple :
- a lefteye with a camera (used by the hmd)
- a centereye with no camera
- a righteye with a camera (used by the hmd)

With the new 0.8 runtime, my player now have :
- a lefteye with a camera
- a centereye with a camera (used by the hmd)
- a righteye with a camera

It's good but at first I notice an issue with my Stereo pictures. Then I create a new GameObject (used for the left eye) at the exact same position of the centereye (used for the right eye) and then I used a different layer for each one to see it 3d and it works.

Now I also have a texture issue with "parallax textures" using normal and height maps :


With my old project with 0.4.4 runtime, the 3d was great. With 0.8 runtime it looks like it's 2d ...

Someone can help ?
    This topic has been closed for replies.

    26 replies

    PierreFRAuthor
    Up and Coming
    March 11, 2016
    Thank you for your answers but :

    - Disable "receive shadows" on the height mapped object doesn't help.
    - When my game was using the 0.4.4 runtime without "VR Supported" checked in Unity it was working with shadows on them.
    - I've tryed Parallax Bumped shader and it's not working too :S
    - The relief pack from the Asset Store is $49 and it's not sure it will work ...

    In my game, there is 90% of my objects that use Parallax mapping, I've spend a lot of time with 0.4.4 runtime to make it right :?

    Bug reported to Unity but I never had an answer from them for previously reported bugs ...
    PierreFRAuthor
    Up and Coming
    March 11, 2016
    To quickly reproduce the issue :

    Make a new scene with an OVRPlayer and a simple box.
    Apply parallax texture (albedo, normal and height maps) to it (standard shader is the best for what I've seen).
    Add a light, make sure the lightning is build then click Play.

    1) In game you won't see the 3d effects on the box.

    2)Then deactivate shadows projected by the light (or click "no shadows" in the project quality).
    You now see 3d effects on the box.
    PierreFRAuthor
    Up and Coming
    March 11, 2016
    Tested with the all new Oculus Sample Framework downloadable here :

    https://developer.oculus.com/downloads/ ... _5_Project

    In the Surface Detail scene with Parallax and Normal Mapping activated it works until we activate shadows in the scene :?
    Inspiring
    March 11, 2016
    What Unity version were you using with the 0.4.4 runtime? If you disable "Virtual Reality Supported", do the parallax shaders seem to add height when viewed from an oblique angle with a regular (non-VR) camera with shadows on? When you reported this bug to Unity, what case number did it send you?
    PierreFRAuthor
    Up and Coming
    March 11, 2016
    I was using Unity 5.2.2f1 with the 0.4.4 runtime.

    :arrow: For Unity, it's the case 778568.

    With Unity 5.3.3f1, if I disable "Virtual Reality Supported", the standard parallax shader seems to add height from an oblique angle with a non VR camera with shadows on :
    PierreFRAuthor
    Up and Coming
    March 11, 2016
    It the same with old Parallax Diffuse Shader :
    PierreFRAuthor
    Up and Coming
    March 11, 2016
    Another example with a visible shadow on the screen :

    Inspiring
    March 11, 2016
    Ok, it sounds like it isn't actually disabling parallax mapping. It's more likely using the same _WorldSpaceCameraPos, etc, between the two eyes. This was a known issue in Unity 5.2 and I don't believe it will be fixed until 5.4. Can you try 5.4.0b10 and let me know if the issue still occurs there?
    PierreFRAuthor
    Up and Coming
    March 11, 2016
    Exactly !

    Ok for trying 5.4.0b10, I'll come back when it's done ;)
    PierreFRAuthor
    Up and Coming
    March 11, 2016
    Still testing, there are good news and no so good ones ... I'll come back tomorrow with a full feedback ;)