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

Feature Request HDRP materials API

Discussion in 'High Definition Render Pipeline' started by andyz, Sep 29, 2020.

  1. andyz

    andyz

    Joined:
    Jan 5, 2010
    Posts:
    2,251
    So it has been mentioned in a number of threads but it is more than tricky to change some HDRP material settings in code.
    And some typical Material class functions no longer work, as I guess they internally focus on builtin shader naming schemes (?)
    e.g. is Material.CopyPropertiesFromMaterial not working for HDRP?

    I am resorting to looking up Lit shader variable names to make Material extensions but an API would be nice!
     
  2. SebLagarde

    SebLagarde

    Unity Technologies

    Joined:
    Dec 30, 2015
    Posts:
    934
    Hi, we are well aware of this issue and doing an API for HDRP Material (or fixing existing one) is one our roadmap. But we have no ETA for now.

    however Material.CopyPropertiesFromMaterial should work. What kind of issue are you seeing with it?
     
    andyz likes this.
  3. andyz

    andyz

    Joined:
    Jan 5, 2010
    Posts:
    2,251
    Great, Material.CopyPropertiesFromMaterial may be ok - probably just me
     
  4. SebLagarde

    SebLagarde

    Unity Technologies

    Joined:
    Dec 30, 2015
    Posts:
    934
    hmm... I what you may experience with HDRP vs builtin with this function is that once you call it, HDRP require to update all the passes and the keywords to work correctly and it isn't something we have expose currently (it is an internal function). There is exatly the same problem in builtin except builtin have very few kewyord compare to HDRP and so the problem is less noticeable.

    We are working on exposing this 'reset keyword' API.
     
  5. SebLagarde

    SebLagarde

    Unity Technologies

    Joined:
    Dec 30, 2015
    Posts:
    934