Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Simple GrabPass Shader Can cause editor crash! [5.6.2p3]

Discussion in 'Shaders' started by Sparrowfc, Jul 20, 2017.

  1. Sparrowfc

    Sparrowfc

    Joined:
    Jan 31, 2013
    Posts:
    100
    Code (CSharp):
    1. Shader "Unlit/GrabPass"
    2. {
    3.     Properties
    4.     {
    5.         _DistortGrabTex ("Texture", 2D) = "white" {}
    6.     }
    7.     SubShader
    8.     {
    9.         Tags { "Queue"="Geometry+511" }
    10.         GrabPass{ "_DistortGrabTex" }
    11.     }
    12. }
    13.  
    Just trying to see if I can set a custom grabpass texture. Every time I drag the material into the scene, the editor will crash for 100%
     
    DoloroEntertainment likes this.
  2. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,589
    The editor should never crash. Therefore, please submit a bug-report following the advice given in this document.
     
  3. Sparrowfc

    Sparrowfc

    Joined:
    Jan 31, 2013
    Posts:
    100
    Bug report submitted. back to my question, Is my method feasible to get a custom defined grabpass texture?
     
  4. mr_zog

    mr_zog

    Joined:
    Jan 21, 2014
    Posts:
    165
    Just want to confirm the issue.

    We got a glass shader ( https://www.assetstore.unity3d.com/en/#!/content/38603 ) which uses a
    GrabPass{ }

    And as soon as I switch to platform Android, the editor crashes if I load the scene.
    If I load the scene via script (starting from another scene), it works .... o0
     
  5. DoloroEntertainment

    DoloroEntertainment

    Joined:
    Dec 10, 2015
    Posts:
    60
    The same issue on 5.6.3p1. Do you already got an answer on your report?
     
  6. Sparrowfc

    Sparrowfc

    Joined:
    Jan 31, 2013
    Posts:
    100
    nope, I got a work around approach using RenderCommand.Blit to do the custom grab