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

Need a windows shader

Discussion in 'Shaders' started by Redeemer86, Sep 16, 2014.

  1. Redeemer86

    Redeemer86

    Joined:
    Jul 16, 2013
    Posts:
    35
    I require a shader for mobile which can impart the properties reflection and transparency. This shader will be used on 3D house model windows and glass doors. Although I don't want immaculate reflection but just a partial effect.
    I tried in-built shaders and related custom shaders on unify wiki, but none of them seem to fulfill my purpose.

    I tried -
    1. mirror reflection shader (water edited shader and script) but there was no transparency.
    2. Glass Shader was showing transparency but could barely notice reflection.

    Frankly I am lost. Could someone help me and guide me in the right direction.

    Red.
     
  2. Daniel_Brauer

    Daniel_Brauer

    Unity Technologies

    Joined:
    Aug 11, 2006
    Posts:
    3,355
  3. Redeemer86

    Redeemer86

    Joined:
    Jul 16, 2013
    Posts:
    35
    Thanks for answering. Yes I am talking about the second shader 'Glass Reflective' in that link. I didnt notice any reflection only transparency. I tried playing with the reflection colour but no reflection just the tint changing. I have unity pro 4.5. I do not understand your question about what cubemap ... Isn't the cubemap generated automatically ?

    I am actually looking for a glass that can show slight reflections ... but for mobile platform. So I want to use it on windows and glass doors.

    Thanks,
    Red
     
  4. Daniel_Brauer

    Daniel_Brauer

    Unity Technologies

    Joined:
    Aug 11, 2006
    Posts:
    3,355
    The cube map is not generated automatically, although you could write a script to do so using Camera.RenderToCubemap()

    On mobile, you'll want to make sure you don't do this every frame as it requires six renders and all the associated draw calls.

    If you do not need live reflections, you can use this function in an editor script to generate a new cube map before you build your game.
     
    Redeemer86 likes this.