void Start()
    {
        fpp = new FboPingPong(size, size);
        mat = new Material(shader);

        mat.SetTexture("_PaperTex", paper);

        Init();
    }
Ejemplo n.º 2
0
        void CheckInit()
        {
            if (m == null)
            {
                m = new Material(shader);
                m.SetTexture("_OriginTex", source);
                m.SetTexture("_CubeMap", map);
                lightDir = m.GetVector("_LightDirection");
            }

            if (fbo == null)
            {
                fbo = new FboPingPong(Screen.width, Screen.height, FilterMode.Trilinear, TextureWrapMode.Repeat);
                Graphics.Blit(source, fbo.GetReadTex());
            }
        }