Topic locked

Vuforia 5.5.9 Breaks Shadows

March 24, 2016 - 2:53pm #1

Latest SDK breaks the ability to cast shadows onto image targets.  A pretty common things to do is have a plane with a shader that makes the plane transparent but still be able to recieve shadows.  This sits between my model and the image target and gives the illusion of a shadow casted onto the image target.  This all works perfectly with the various TransparentRecieveShadows shaders I have used previously to 5-5-9.  It seems something in the VideoBackgroundmanager is causing issues.  I click disable video background and the shadow appears as it should. Different settings on overflow geometry in the videobackgroundmanager has no effect. Does anyone have any suggestions for a work around?

I've test Unity 5.3.2 and 5.3.4.  Vuforia 5-0-10 always works perfect, 5-5-9 does not.  Happens everywhere, editor and device.  

Attached image will show it in action.  Shader code below.  

// Set main color to black and alpha to zero
Shader "Custom/TransparentShadowCollector"
{
    Properties
    {
        _Color ("Main Color", Color) = (1,1,1,.5)
        _ShadowIntensity ("Shadow Intensity", Range (0, 1)) = 0.6
    }
 
 
    SubShader
    {
 
        Tags {"Queue"="Geometry" }
 
        Pass
        {
            Tags {"LightMode" = "ForwardBase" }
            Cull Back
            Blend SrcAlpha OneMinusSrcAlpha
            CGPROGRAM
            #pragma vertex vert
            #pragma fragment frag
            #pragma multi_compile_fwdbase
 
            #include "UnityCG.cginc"
            #include "AutoLight.cginc"
            uniform fixed4  _Color;
            uniform float _ShadowIntensity;
 
            struct v2f
            {
                float4 pos : SV_POSITION;
                LIGHTING_COORDS(0,1)
            };
            v2f vert(appdata_base v)
            {
                v2f o;
                o.pos = mul (UNITY_MATRIX_MVP, v.vertex);
                TRANSFER_VERTEX_TO_FRAGMENT(o);
             
                return o;
            }
            fixed4 frag(v2f i) : COLOR
            {
                float attenuation = LIGHT_ATTENUATION(i);
                return fixed4(0,0,0,(1-attenuation)*_ShadowIntensity) + _Color;
            }
            ENDCG
        }
 
    }
    Fallback "VertexLit"
}

 

 

 

 

Vuforia 5.5.9 Breaks Shadows

August 9, 2016 - 3:03pm #4

Hello,

This issue was resolved with the release of Vuforia 6.

Thanks.


Vuforia 5.5.9 Breaks Shadows

March 25, 2016 - 1:58am #3

Vuforia 5.5.9 Breaks Shadows

March 24, 2016 - 4:25pm #2

Actually the problem is even more basic.  Shadows don't work at all with Vuforia 5.5.9.

I've submitted this as a bug in the Issues section.

 

 

 

 

Topic locked