Working ShaderEffects with distance checking