示例#1
0
    public static void CreateRenderTexture(ref RenderTexture renderTexture, string name)
    {
        int pixelWidth  = CamerasMgr.CameraMain.get_pixelWidth();
        int pixelHeight = CamerasMgr.CameraMain.get_pixelHeight();

        UIConst.GetRealScreenSize(out pixelWidth, out pixelHeight);
        ShaderEffectUtils.SafeCreateRenderTexture(ref renderTexture, name, 16, 7, 1, pixelWidth, pixelHeight);
    }
示例#2
0
    private void UpdateRenderTextures()
    {
        Camera component = base.GetComponent <Camera>();
        int    width     = Mathf.FloorToInt((float)component.get_pixelWidth() + 0.5f);
        int    height    = Mathf.FloorToInt((float)component.get_pixelHeight() + 0.5f);

        if (this.QualityLevel == RenderManager.Quality.Mobile)
        {
            this.m_width  = width;
            this.m_height = height;
        }
        else
        {
            this.m_width  = width;
            this.m_height = height;
        }
        RenderTextureFormat    fmt  = 0;
        RenderTextureReadWrite rw   = 1;
        RenderTextureFormat    fmt2 = 0;
        RenderTextureReadWrite rw2  = 0;

        ShaderEffectUtils.SafeCreateRenderTexture(ref this.m_motionRT, "Motion", 24, fmt, rw, this.m_width, this.m_height);
        ShaderEffectUtils.SafeCreateRenderTexture(ref this.m_combinedRT, "Combined", 0, fmt2, rw2, this.m_width, this.m_height);
    }