/// <summary>
        /// Converts a <see cref="LightEstimation"/> to a <c>Feature</c>.
        /// </summary>
        /// <param name="self">The <see cref="LightEstimation"/> being extended.</param>
        /// <returns>A <c>Feature</c> representation of the <see cref="LightEstimation"/> with the relevant bits enabled.</returns>
        public static Feature ToFeature(this LightEstimation self)
        {
            var feature = Feature.None;

            if ((self & LightEstimation.AmbientIntensity) != LightEstimation.None)
            {
                feature |= Feature.LightEstimationAmbientIntensity;
            }
            if ((self & LightEstimation.AmbientColor) != LightEstimation.None)
            {
                feature |= Feature.LightEstimationAmbientColor;
            }
            if ((self & LightEstimation.AmbientSphericalHarmonics) != LightEstimation.None)
            {
                feature |= Feature.LightEstimationAmbientSphericalHarmonics;
            }
            if ((self & LightEstimation.MainLightDirection) != LightEstimation.None)
            {
                feature |= Feature.LightEstimationMainLightDirection;
            }
            if ((self & LightEstimation.MainLightIntensity) != LightEstimation.None)
            {
                feature |= Feature.LightEstimationMainLightIntensity;
            }

            return(feature);
        }
    void OnEnable()
    {
        arLightEmissionID = Shader.PropertyToID("_AR_LightEmission");
        arLightColorID    = Shader.PropertyToID("_AR_LightColor");

        lightEstimation = FindObjectOfType <LightEstimation>();
        light           = GameObject.Find("Directional Light").GetComponent <Light>();
    }
示例#3
0
    void Start()
    {
        _lightEstimation         = new LightEstimation();
        _planeBackgroundMaterial = _backgroundPlaneRenderer.material;
        _currentScreenShot       = new Texture2D(750, 1334);

        _data = ReadJsonFile(_folderPath);

        SetFrameDipendentValues(_selectedFrame, null);
    }
        /// <summary>
        /// Converts a <see cref="LightEstimation"/> to the deprecated <c>LightEstimationMode</c>.
        /// </summary>
        /// <param name="self">The <see cref="LightEstimation"/> being converted.</param>
        /// <returns>A <c>LightEstimationMode</c> representation of the <see cref="LightEstimation"/>.</returns>
        public static LightEstimationMode ToLightEstimationMode(this LightEstimation self)
        {
            switch (self)
            {
            case LightEstimation.AmbientColor:
            case LightEstimation.AmbientIntensity:
                return(LightEstimationMode.AmbientIntensity);

            case LightEstimation.AmbientSphericalHarmonics:
            case LightEstimation.MainLightDirection:
            case LightEstimation.MainLightIntensity:
                return(LightEstimationMode.EnvironmentalHDR);

            default:
                return(LightEstimationMode.Disabled);
            }
        }
 void Awake()
 {
     m_LightEstimation = FindObjectOfType <LightEstimation>();
 }
示例#6
0
 void Awake()
 {
     m_LightEstimation = GetComponent <LightEstimation>();
 }