Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

SRP DrawingSettings.overrideMaterial no way to retrieve the original material's properties

Discussion in 'Graphics Experimental Previews' started by tibi_fake, Apr 17, 2019.

  1. tibi_fake

    tibi_fake

    Joined:
    Jul 31, 2018
    Posts:
    7
    I'm writing depth and normals with an overrideMaterial, this used to be done with Camera.SetReplacementShader. But since now the material is overridden, not just the shader, the properties from the original material are not retained. In this case they would be needed for alpha clipping. Is there a way this could be done? Also appreciated if someone has an idea on how to get alpha clipping working in an overrideMaterial. I could add a shader pass to all shaders in the scene but I don't want to.
     
  2. CJ_173

    CJ_173

    Joined:
    Dec 4, 2019
    Posts:
    1
    hi i found resolution to handle the problem. use SetPropertyBlock to ref your property name then you can retrieve it.finally, dont forget to clear the blocking;)