Exemple #1
0
    void Start()
    {
        StartCoroutine(CheckPermission());

        for (int i = 0; i < WebCamTexture.devices.Length; i++)
        {
            UIManager.PrintDebugText(WebCamTexture.devices[i].name + " -- " + WebCamTexture.devices[i].isFrontFacing.ToString());
        }

        Vector2 currentRes = new Vector2(Screen.currentResolution.width, Screen.currentResolution.height);

        UIManager.PrintDebugText("currentRes is: " + currentRes.ToString());

        Globals.PostProductionMaterial.SetVector(flipUVID, new Vector4(1, 0, 0, 0));
        Globals.PostProductionMaterial.SetVector(screenTexelSizeID, new Vector4(1.0f / currentRes.x, 1.0f / currentRes.y, currentRes.x, currentRes.y));

        //bulk initialization, rethink
        currentCCPreset   = Globals.ColorCorrectionPreset[0];
        currentPhotoFrame = Globals.PhotoFrames[0];
        currentResolution = Globals.Resolutions[1];

        InitializeFisheye();
        InitializeRGBDistortion();
        SetupColorCorrection();
        InitializeLuminanceFilter();

        squareSide = (int)Mathf.Min(currentRes.x, currentRes.y);

        InitializeCameraDevice();
    }
Exemple #2
0
 public void ChangeColorizePreset(ColorCorrectionPreset requestedPreset)
 {
     for (int i = 0; i < Globals.ColorCorrectionPreset.Count; i++)
     {
         if (Globals.ColorCorrectionPreset[i].PresetName == requestedPreset)
         {
             currentCCPreset = Globals.ColorCorrectionPreset[i];
             SetupColorCorrection();
             break;
         }
     }
 }