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

Standard Shader 2-sided

Discussion in 'Unity 5 Pre-order Beta' started by kenshin, Feb 28, 2015.

  1. kenshin

    kenshin

    Joined:
    Apr 21, 2010
    Posts:
    936
    Hello!

    Is possible to use unity 5 standerd shader (than PBR) with double-sided render?
    I mean removing face culling.

    If yes, it will work with full features? (i.e. reflection, bump. ecc...)

    I kno it seem a strange question, but sometime for non-game this is a very usefull feature to render correctly meshes with reversed faces... that now are just holes in unity3d :(

    Thanks
    Kenshin
     
  2. kenshin

    kenshin

    Joined:
    Apr 21, 2010
    Posts:
    936
    Please, any feedback by Unity Guys? :)
     
  3. nipoco

    nipoco

    Joined:
    Sep 1, 2011
    Posts:
    2,008
    No it uses Backface culling like the legacy shaders.
    Just duplicate the mesh without moving the position and flip the normals to the other side.
     
  4. kenshin

    kenshin

    Joined:
    Apr 21, 2010
    Posts:
    936
    Hello nipoco, thanks for your answer.

    I understand your idea, but would be great to have a solution that work in the "render-phase" and don't require to manage directly this type of meshes.

    When you visualize CAD files you have to manage very big geometry.

    I understand is not a priority for Unity5 but I hope in the near future Unity team will help also non-game users :)
     
  5. Ostwind

    Ostwind

    Joined:
    Mar 22, 2011
    Posts:
    2,804
    I think the general requirement for such thing is low so you probably need to do it yourself with the shader sources if you really need it
     
  6. one_one

    one_one

    Joined:
    May 20, 2013
    Posts:
    621
    Disabling backface culling in the shader should be relatively easy. At least once there is some kind of documentation about editing the standard shader, which is what quite a few people are actually waiting for.
     
  7. kenshin

    kenshin

    Joined:
    Apr 21, 2010
    Posts:
    936
    I am not a shader guru, but just disable backface culling is not enough to have a full feature shader (i.e. with bump or reflective map).
    I have tried.
    So I fear that with pbr shader is more complex.
     
    XiexeVR and one_one like this.
  8. deram_scholzara

    deram_scholzara

    Joined:
    Aug 26, 2005
    Posts:
    1,043
    Download the built-in shaders, copy the Standard or StandardSpecular shader into your project, then add the "Cull Off" flag to the passes with the names "FORWARD" or "DEFERRED" (there are three total).
     
    Last edited: Mar 2, 2015
    killer_mech, kenshin and LaserWzzrd like this.