Ejemplo n.º 1
0
    void Start()
    {
        frame = new NPFrame2("Stuff", 3);

        donePow2 = new RenderTexture(Screen.width, Screen.height, 0, frame.GetTextureFormat, RenderTextureReadWrite.Linear);
        donePow2.enableRandomWrite = true;
        donePow2.Create();
    }
Ejemplo n.º 2
0
    void Start()
    {
        frame = new NPFrame2("stuff", 8);

        edgesPoT_h = new RenderTexture(frame.GetNativePOTRes, frame.GetNativePOTRes, 0, frame.GetTextureFormat, RenderTextureReadWrite.Linear);
        edgesPoT_h.enableRandomWrite = true;
        edgesPoT_h.Create();

        edgesPoT_v = new RenderTexture(frame.GetNativePOTRes, frame.GetNativePOTRes, 0, frame.GetTextureFormat, RenderTextureReadWrite.Linear);
        edgesPoT_v.enableRandomWrite = true;
        edgesPoT_v.Create();

        donePoT = new RenderTexture(frame.GetNativePOTRes, frame.GetNativePOTRes, 0, frame.GetTextureFormat, RenderTextureReadWrite.Linear);
        donePoT.enableRandomWrite = true;
        donePoT.Create();

        gray = new RenderTexture(frame.GetNativePOTRes, frame.GetNativePOTRes, 0, frame.GetTextureFormat, RenderTextureReadWrite.Linear);
        gray.enableRandomWrite = true;
        gray.Create();
    }
Ejemplo n.º 3
0
 void Awake()
 {
     timer = PerformanceTimer.CreateTimer(); // Create and assign timer
     frame = new NPFrame2("main", new Vector2(64,64));
 }
Ejemplo n.º 4
0
    void Start()
    {
        timer = PerformanceTimer.CreateTimer();
        //line = GetComponent<LineRenderer>();
        frame = new NPFrame2("DoF", 4);
        cam = GetComponent<Camera>();

        depth = new RenderTexture(Screen.width, Screen.height, 0, RenderTextureFormat.RFloat, RenderTextureReadWrite.Linear);
        depth.Create();

        donePow2 = new RenderTexture(frame.GetNativePOTRes, frame.GetNativePOTRes, 0, frame.GetTextureFormat, RenderTextureReadWrite.Linear);
        donePow2.enableRandomWrite = true;
        donePow2.Create();
    }
Ejemplo n.º 5
0
    void Start()
    {
        // Variable for testing
        timer = PerformanceTimer.CreateTimer(); // Create and assign timer

        frame = new NPFrame2("Blur", 5);

        donePow2 = new RenderTexture(frame.GetNativePOTRes, frame.GetNativePOTRes, 0, frame.GetTextureFormat, RenderTextureReadWrite.Linear);
        donePow2.enableRandomWrite = true;
        donePow2.Create();
    }
Ejemplo n.º 6
0
    void Start()
    {
        timer = PerformanceTimer.CreateTimer();
        frame = new NPFrame2("Bloom", 7);

        //Textures used for the bloom effect, currently more than needed are used - probably.
        // TODO: This could be reduced I believe by using the source image non PoT and generate the bloom texture from that and make that PoT and continue from there.
        done = new RenderTexture(Screen.width, Screen.height, 0, frame.GetTextureFormat, RenderTextureReadWrite.Linear);
        done.enableRandomWrite = true;
        done.Create();

        origin = new RenderTexture(frame.GetNativePOTRes, frame.GetNativePOTRes, 0, frame.GetTextureFormat, RenderTextureReadWrite.Linear);
        origin.enableRandomWrite = true;
        origin.Create();

        bloomTexture =  new RenderTexture(Screen.width, Screen.height, 0, frame.GetTextureFormat, RenderTextureReadWrite.Linear);
        bloomTexture.enableRandomWrite = true;
        bloomTexture.Create();
    }