コード例 #1
0
        private Vector4 GetBackplateParameters1(float backplatePhi, HDRISky hdriSky)
        {
            // x: BackplateType, y: BlendAmount, zw: backplate rotation (cosPhi_plate, sinPhi_plate)
            float type        = 3.0f;
            float blendAmount = hdriSky.blendAmount.value / 100.0f;

            switch (hdriSky.backplateType.value)
            {
            case BackplateType.Disc:
                type = 0.0f;
                break;

            case BackplateType.Rectangle:
                type = 1.0f;
                break;

            case BackplateType.Ellipse:
                type = 2.0f;
                break;

            case BackplateType.Infinite:
                type        = 3.0f;
                blendAmount = 0.0f;
                break;
            }
            return(new Vector4(type, blendAmount, Mathf.Cos(backplatePhi), Mathf.Sin(backplatePhi)));
        }
コード例 #2
0
        private Vector4 GetBackplateParameters2(HDRISky hdriSky)
        {
            // xy: BackplateTextureRotation (cos/sin), zw: Backplate Texture Offset
            float localPhi = -Mathf.Deg2Rad * hdriSky.plateTexRotation.value;

            return(new Vector4(Mathf.Cos(localPhi), Mathf.Sin(localPhi), hdriSky.plateTexOffset.value.x, hdriSky.plateTexOffset.value.y));
        }
コード例 #3
0
ファイル: SkyboxRotate.cs プロジェクト: v-exec/Qurotema
    void Start()
    {
        pp = gameObject.GetComponent <Volume>();
        HDRISky temp;

        if (pp.profile.TryGet <HDRISky>(out temp))
        {
            sky = temp;
        }
    }
コード例 #4
0
    // Start is called before the first frame update
    void Start()
    {
        volume.profile.TryGet(out HDRISky s);
        if (s)
        {
            sky = s;
            defaultDesiredLuxValue = sky.desiredLuxValue.value;
        }

        defaultSunValue = sunLight.intensity;
    }
コード例 #5
0
 // Update is called once per frame
 void Update()
 {
     if (m_SceneSettings != null)
     {
         HDRISky skyParams = VolumeManager.instance.stack.GetComponent <HDRISky>();
         if (skyParams != null)
         {
             skyParams.rotation.value = (skyParams.rotation + Time.deltaTime * m_RotationSpeed) % 360.0f;
         }
     }
 }
コード例 #6
0
        private Vector4 GetBackplateParameters0(HDRISky hdriSky)
        {
            // xy: scale, z: groundLevel, w: projectionDistance
            float scaleX = Mathf.Abs(hdriSky.scale.value.x);
            float scaleY = Mathf.Abs(hdriSky.scale.value.y);

            if (hdriSky.backplateType.value == BackplateType.Disc)
            {
                scaleY = scaleX;
            }

            return(new Vector4(scaleX, scaleY, hdriSky.groundLevel.value, hdriSky.projectionDistance.value));
        }
コード例 #7
0
    private void Start()
    {
        StartCoroutine(GetSettingsWhenInitialized());
        cubemapEventListenerSet = onCubemapUpdate.GetPersistentEventCount() > 0;
        HDCameraData            = XRCamera.GetComponent <HDAdditionalCameraData>();

        if (!m_skyboxProfile.TryGet(out volumeSky))
        {
            volumeSky = m_skyboxProfile.Add <HDRISky>(true);
        }

        if (!m_skyboxProfile.TryGet(out volumeExposure))
        {
            volumeExposure = m_skyboxProfile.Add <Exposure>(true);
        }

        if (!m_skyboxProfile.TryGet(out volumeVSTWhiteBalance))
        {
            volumeVSTWhiteBalance = m_skyboxProfile.Add <VSTWhiteBalance>(true);
        }
    }
コード例 #8
0
    private void Start()
    {
        originalOpaqueValue = VarjoRendering.GetOpaque();
        VarjoRendering.SetOpaque(false);
        cubemapEventListenerSet = onCubemapUpdate.GetPersistentEventCount() > 0;
        HDCameraData            = xrCamera.GetComponent <HDAdditionalCameraData>();

        if (!m_skyboxProfile.TryGet(out volumeSky))
        {
            volumeSky = m_skyboxProfile.Add <HDRISky>(true);
        }

        if (!m_skyboxProfile.TryGet(out volumeExposure))
        {
            volumeExposure = m_skyboxProfile.Add <Exposure>(true);
        }

        if (!m_skyboxProfile.TryGet(out volumeVSTWhiteBalance))
        {
            volumeVSTWhiteBalance = m_skyboxProfile.Add <VSTWhiteBalance>(true);
        }
    }
コード例 #9
0
 private void GetParameters(out float intensity, out float phi, out float backplatePhi, BuiltinSkyParameters builtinParams, HDRISky hdriSky)
 {
     intensity    = GetSkyIntensity(hdriSky, builtinParams.debugSettings);
     phi          = -Mathf.Deg2Rad * hdriSky.rotation.value;  // -rotation to match Legacy...
     backplatePhi = phi - Mathf.Deg2Rad * hdriSky.plateRotation.value;
 }
コード例 #10
0
 public HDRISkyRenderer(HDRISky hdriSkyParams)
 {
     m_HdriSkyParams = hdriSkyParams;
     m_PropertyBlock = new MaterialPropertyBlock();
 }
コード例 #11
0
ファイル: Story.cs プロジェクト: v-exec/Qurotema
    void Start()
    {
        storyText       = GameObject.Find("Story - Text/Text").GetComponent <Text>();
        storyTextCanvas = GameObject.Find("Story - Text");
        storyBackground = GameObject.Find("Story - Background");
        soundSystem     = GetComponent <Sound>();
        n  = GetComponent <Nox>();
        pp = GameObject.Find("Rendering").GetComponent <Volume>();
        HDRISky temp;

        if (pp.profile.TryGet <HDRISky>(out temp))
        {
            sky = temp;
        }

        sun.SetActive(false);
        gates.SetActive(true);
        sky.multiplier.value = 0f;

        talk = new string[20];

        //intro
        talk[0] = "We have a stable port to Qurotema. RO, your vision should come in soon.";
        talk[1] = "We should remind you that because of the Gates, this is only a one-way communication channel.";
        talk[2] = "Beyond this point is only the unknown. We will keep watch, and study Qurotema alongside you, Operator.";
        talk[3] = "Your vessel should be equipped with a control module through which you can interact with the world.\nHow it functions is beyond our understanding, but we trust you will discover its abilities in time.";
        talk[4] = "Good luck with your research, RO. Make Sino proud.";

        //first monolith discovery
        talk[5] = "What you see in front of you is one of the Monoliths Dr. Sino spoke about. There should be a writing 'eminating' from it. Do you see anything?";

        //first monolith interaction
        talk[6] = "We have a feed of the characters. Sino called this script 'i-tema'. He claims there's no way to speak it, as it is a written-only language.";
        talk[7] = "This set of symbols in particular were already translated by Sino. They say: 'The night will flow when black time's sand knows foreign touch.'";
        talk[8] = "Nothing else was translated other than the writing on the gates, 'Quro' and 'Tema'.";
        talk[9] = "We are not sure how Sino felt so confident in his understanding of i-tema, but finding more Monoliths will help us fill a database for linguistic analysis.";

        //first instrument discovery
        talk[10] = "What is that? Nothing like that was documented in Sino's notes. It's not coming in clear.";

        //instrument playtime story progress
        talk[11] = "We have signals of faint acitivity away from your vessel's current position.";
        talk[12] = "We've lost sight of your feed, but we are still getting readings about your position. Keep up the research.";
        talk[13] = "Our connection is becoming unreliable. We are going to pull you out soon.";

        //ending
        talk[14] = "We are losing connection fast. Abandoning vessel.";
        talk[15] = "RO? Di? Your body in the lab is unresponsive. Initiate return protocol immediately so we can resuscitate.";
        talk[16] = "Di, I don't know what's going on but we have no connection to Qurotema, can't even find it with Sino's systems.";
        talk[17] = "It's possible that Qurotema is gone, and your vessel is in the Void.";
        talk[18] = "I'm going to be honest. I don't know what we're going to do.";
        talk[19] = "";

        if (!introductionFinished)
        {
            backgroundOpacity = 1f;
            storyBackground.GetComponent <CanvasGroup>().alpha = backgroundOpacity;
            talkTracker = 0;
            if (routine != null)
            {
                StopCoroutine(routine);
            }
            routine = StartCoroutine(PlayText(talkTracker));
        }
        else
        {
            //skip intro
            sun.SetActive(true);
            gates.SetActive(false);
            sky.multiplier.value = 1f;
        }
    }