Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    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,448
    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