Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice
  3. 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,335
    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:
    936
    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,335
    Great, Material.CopyPropertiesFromMaterial may be ok - probably just me
     
  4. SebLagarde

    SebLagarde

    Unity Technologies

    Joined:
    Dec 30, 2015
    Posts:
    936
    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:
    936