- Fixed some warnings
{
arrow_coord.y = 1.0 - arrow_coord.y;
}
arrow_coord *= _ScreenToTargetScale;
arrow_coord *= _ScreenToTargetScale.xy;
float2 mv_arrow = SampleMotionVectors(arrow_coord);
positionCS.xy = positionCS.xy / positionCS.w;
previousPositionCS.xy = previousPositionCS.xy / previousPositionCS.w;
return (positionCS.xy - previousPositionCS.xy);
float2 velocity = (positionCS.xy - previousPositionCS.xy);
#if UNITY_UV_STARTS_AT_TOP
velocity.y = -velocity.y;
#endif
return velocity;
#else
return float2(0.0, 0.0);
float Frag(Varyings input) : SV_Depth
PositionInputs posInputs = GetPositionInput(input.positionCS, _ScreenSize.zw);
PositionInputs posInputs = GetPositionInput(input.positionCS.xy, _ScreenSize.zw);
return LOAD_TEXTURE2D(_InputDepthTexture, posInputs.positionSS).x;