Search Unity

DrawTexture RenderTexture

Discussion in 'Immediate Mode GUI (IMGUI)' started by Super_apple, Sep 27, 2011.

  1. Super_apple

    Super_apple

    Joined:
    Mar 14, 2011
    Posts:
    31
    when i make a cube which use the stand shader named "Transparent/cutout/Diffuse"

    and i make a new Camera which focuse the cube ,set the camera background color (255,255,255,0)

    also it only render to texture ;

    in the follow script using the rendertexture;
    ++++++++++++++++++++++++++++++++++++++
    public Texture tex;//here using the rendertexture void OnGUI()
    {
    GUI.DrawTexture(new Rect(100, 200, 300, 300), tex, ScaleMode.ScaleAndCrop, true);

    }

    +++++++++++++++++++++++++++++++++++

    but i can't see anythinig!


    seems that if U set the alpha value of the camera's background color equals zero

    and same time U use CutOUt shader

    the result is U got nothing!