Hi,
Could you please provide the following details:
Thx and greetings
Nicola
Hi,
The shadow distance is overwritten from the sample code, because different samples need different distances. If you're setting this from Unity, I would just remove it from the scripts.
You can find it in the SampleController.cs, InstantTrackingController.cs, ObjectTrackingController.cs and ExtendedObjectTrackingController.cs, in their Start methods. The API used is "QualitySettings.shadowDistance".
Best regards,
Alexandru
Maya Shekel
Hi!
I'm working with Wikitude on Unity for Instant Tracking and all works fine, but when I try to change the shadow distance in the quality settings every time I hit play it goes back for 4 meters.
I need my shadows to appear when my camera is 10 meters away from the model but no matter what I try is always jumps back to 4 and only when I get close to the model it appears.
I'm attaching the script of the Shader called Transparent Shadow Receiver guessing it has something to do with it.
thanks in advance!
Shader "Custom/Transparent Shadow Receiver" {
Properties { }
SubShader {
Tags {"Queue"="AlphaTest" }
Pass {
Tags {"LightMode" = "ForwardBase" }
Cull Back
ZWrite Off
Blend SrcAlpha OneMinusSrcAlpha
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#pragma multi_compile_fwdbase
#include "UnityCG.cginc"
#include "AutoLight.cginc"
struct v2f {
float4 pos : SV_POSITION;
LIGHTING_COORDS(0,1)
};
v2f vert(appdata_base v) {
v2f o;
o.pos = UnityObjectToClipPos (v.vertex);
TRANSFER_VERTEX_TO_FRAGMENT(o);
return o;
}
fixed4 frag(v2f i) : COLOR {
return fixed4(0, 0, 0, 1.0f - LIGHT_ATTENUATION(i));
}
ENDCG
}
}
Fallback "VertexLit"
}