Search Unity

Custom Editor draw a texture with custom material?

Discussion in 'Immediate Mode GUI (IMGUI)' started by kdkd, Nov 17, 2018.

  1. kdkd

    kdkd

    Joined:
    Nov 21, 2017
    Posts:
    26
    So I wish to extend Unity's toolbox by adding a Texture view window. The catch is I wish to use a custom shader to do some postprocessing (like masking channels, swizzle or biasing) on it so that debugging can be much more smoother.

    But I didn't see any suitable functions for this task.
    I tried Handles.DrawCamera, GUI.DrawTexture, EditorGUI.drawPreviewTexture etc, all of them dont allow for material customization.

    Is there a way to achieve this simple task?
     

    Attached Files:

    Last edited: Nov 17, 2018
  2. Johannski

    Johannski

    Joined:
    Jan 25, 2014
    Posts:
    826
  3. kdkd

    kdkd

    Joined:
    Nov 21, 2017
    Posts:
    26
    my bad. Thanks for pointing out.