示例#1
0
	void Start() 
	{

		glowColors[0] = new Color(255f / 255f, 120f / 255f,  13f / 255f);
		glowColors[2] = new Color(84f  / 255f, 163f / 255f, 255f / 255f);
		glowColors[1] = new Color(155f / 255f, 255f / 255f,  30f / 255f);
		glowColors[3] = new Color(255f / 255f, 47f  / 255f,   0f / 255f);
		currentColor = glowColors[0];


		SENBDLGlobal.sphereOfCubesRotation = Quaternion.identity;
		for (int i = 0; i < 150; i++)
		{
			Instantiate(orbitingCube, Vector3.zero, Quaternion.identity);
		}

		for (int i = 0; i < 19; i++)
		{
			Instantiate(glowingOrbitingCube, Vector3.zero, Quaternion.identity);
		}

		Camera.main.backgroundColor = new Color(0.08f, 0.08f, 0.08f);

		SENBDLGlobal.mainCube = this;

		bloomShader = Camera.main.GetComponent<SENaturalBloomAndDirtyLens>();
	}
示例#2
0
    void Start()
    {
        glowColors[0] = new Color(255f / 255f, 120f / 255f, 13f / 255f);
        glowColors[2] = new Color(84f / 255f, 163f / 255f, 255f / 255f);
        glowColors[1] = new Color(155f / 255f, 255f / 255f, 30f / 255f);
        glowColors[3] = new Color(255f / 255f, 47f / 255f, 0f / 255f);
        currentColor  = glowColors[0];


        SENBDLGlobal.sphereOfCubesRotation = Quaternion.identity;
        for (int i = 0; i < 150; i++)
        {
            Instantiate(orbitingCube, Vector3.zero, Quaternion.identity);
        }

        for (int i = 0; i < 19; i++)
        {
            Instantiate(glowingOrbitingCube, Vector3.zero, Quaternion.identity);
        }

        Camera.main.backgroundColor = new Color(0.08f, 0.08f, 0.08f);

        SENBDLGlobal.mainCube = this;

        bloomShader = Camera.main.GetComponent <SENaturalBloomAndDirtyLens>();
    }
    void Start()
    {
        bloom = GetComponent <SENaturalBloomAndDirtyLens>();

        if (levelMod == 0)
        {
            levelMod = BaseLevel.Instance.bloomMod;
        }
    }
示例#4
0
    void OnEnable()
    {
        serObj                = new SerializedObject(target);
        bloomIntensity        = serObj.FindProperty("bloomIntensity");
        bloomScatterFactor    = serObj.FindProperty("bloomScatterFactor");
        lensDirtIntensity     = serObj.FindProperty("lensDirtIntensity");
        lensDirtScatterFactor = serObj.FindProperty("lensDirtScatterFactor");
        lensDirtTexture       = serObj.FindProperty("lensDirtTexture");
        lowQuality            = serObj.FindProperty("lowQuality");
        depthBlending         = serObj.FindProperty("depthBlending");
        depthBlendFunction    = serObj.FindProperty("depthBlendFunction");
        depthBlendFactor      = serObj.FindProperty("depthBlendFactor");
        maxDepthBlendFactor   = serObj.FindProperty("maxDepthBlendFactor");
        depthScatterFactor    = serObj.FindProperty("depthScatterFactor");

        instance = (SENaturalBloomAndDirtyLens)target;
    }
示例#5
0
    public override void OnInspectorGUI()
    {
        serObj.Update();

        SENaturalBloomAndDirtyLens instance = (SENaturalBloomAndDirtyLens)target;

        if (!instance.inputIsHDR)
        {
            EditorGUILayout.HelpBox("The camera is either not HDR enabled or there is an image effect before this one that converts from HDR to LDR. This image effect is dependant an HDR input to function properly.", MessageType.Warning);
        }

        EditorGUILayout.LabelField(new GUIContent(banner), GUILayout.MinHeight(60.0f), GUILayout.ExpandWidth(true));
        EditorGUILayout.PropertyField(bloomIntensity, new GUIContent("Bloom Intensity", "The amount of light that is scattered inside the lens uniformly. Increase this value for a more drastic bloom."));
        EditorGUILayout.PropertyField(lensDirtIntensity, new GUIContent("Lens Dirt Intensity", "The amount that the lens dirt texture contributes to light scattering. Increase this value for a dirtier lens."));
        EditorGUILayout.PropertyField(lensDirtTexture, new GUIContent("Lens Dirt Texture", "The texture that controls per-channel light scattering amount. Black pixels do not affect light scattering. The brighter the pixel, the more light that is scattered."));



        serObj.ApplyModifiedProperties();
    }
示例#6
0
    void Update()
    {
        if (Input.GetKeyDown(KeyCode.Escape))
        {
            if (ShowPM == true)
            {
                HidePM();
                HideOM();
            }
            else if (ShowPM == false)
            {
                DrawPM();
            }
        }
        if (ShowPM == true)
        {
            PauseMenuGroup.SetActive(true);
        }
        else
        {
            PauseMenuGroup.SetActive(false);
        }
        if (ShowOM == true)
        {
            OptionsMenuGroup.SetActive(true);
        }
        else
        {
            OptionsMenuGroup.SetActive(false);
        }

        if (ShowOM == false)
        {
            GeneralGroup.SetActive(false);
            GraphicsGroup.SetActive(false);
            SoundGroup.SetActive(false);
            ControlsGroup.SetActive(false);
        }

        Toggle FT = FogToggler.transform.gameObject.GetComponent <Toggle>();

        if (FT.isOn == true)
        {
            RenderSettings.fog = true;
        }
        else
        {
            RenderSettings.fog = false;
        }
        SunShafts SS  = MainCam.transform.gameObject.GetComponent <SunShafts>();
        Toggle    SST = SunShaftsToggler.transform.gameObject.GetComponent <Toggle>();

        if (SST.isOn == true)
        {
            SS.enabled = true;
        }
        else
        {
            SS.enabled = false;
        }
        SENaturalBloomAndDirtyLens NBAL = MainCam.transform.gameObject.GetComponent <SENaturalBloomAndDirtyLens>();
        Toggle NBALT = NaturalBloomAndLensToggler.transform.gameObject.GetComponent <Toggle>();

        if (NBALT.isOn == true)
        {
            NBAL.enabled = true;
        }
        else
        {
            NBAL.enabled = false;
        }
    }
示例#7
0
 // Use this for initialization
 void Start()
 {
     se = GetComponent <SENaturalBloomAndDirtyLens>();
 }
示例#8
0
    // Use this for initialization
    void Start()
    {
        SENaturalBloomAndDirtyLens lens = GetComponent <SENaturalBloomAndDirtyLens>();

        lens.lensDirtTexture = textures[Random.Range(0, textures.Length)];
    }