Unity Community


Page 1 of 2 12 LastLast
Results 1 to 20 of 39
  1. Unity Graphics Developer

    Location
    Unity Technologies, basement
    Posts
    3,974

    Builtin Unity shaders source

    Here's the sourcecode for all builtin Unity shaders (always at latest version): http://unity3d.com/download_unity/builtin_shaders.zip

    Unity 1.6.2 shaders, if you still need them, are here: http://unity3d.com/download_unity/bu...ders-1.6.2.zip

    The sourcecode is provided as a reference and for learning purposes. You don't need to put the shaders into your project; they're all builtin. If you do, be sure to modify shader name at start of the file, otherwise names will collide with the builtins.

    Also checkout UnityCG.cginc and AutoLight.cginc in Unity.app/Contents/CGIncludes - the builtin shaders use some helper functions/macros/variables from there.

  2. Unity Graphics Developer

    Location
    Unity Technologies, basement
    Posts
    3,974
    Updated the above with Unity 1.5.1 builtin shaders source code (cleanups, small fixes, more fallbacks).


  3. Posts
    214
    Thank you Aras

    This is must learn for me.


  4. Location
    NE Ohio, USA
    Posts
    7,173

    Re: Builtin Unity shaders source

    Quote Originally Posted by Aras Pranckevicius
    You don't need to put the shaders into your project; they're all builtin. If you do, be sure to modify shader name at start of the file, otherwise names will collide with the builtins.
    I seemingly did need to put these into my project, and I don't see any problems arising due to the names. Any reason for this? I guess I've been using Unity successfully in some kind of cripple state, but I have no idea what is going on.

  5. Unity Graphics Developer

    Location
    Unity Technologies, basement
    Posts
    3,974
    No, you don't need to put them into your project. These are the sources if you want to develop your own shaders and want to take a look at how built-in ones are done.

    Presumably your Unity installation is corrupt (or maybe you're out of disk space?). Try reinstalling Unity.


  6. Location
    NE Ohio, USA
    Posts
    7,173
    For any other neophytes that seem to have this problem, just get out of debug mode and pick your shader then. Thanks, Daniel!

  7. Unity Graphics Developer

    Location
    Unity Technologies, basement
    Posts
    3,974
    Updated with Unity 2.0 and 1.6.2 shaders.


  8. Location
    Minnesota, USA
    Posts
    1,713
    When someone has a chance, could we please have the 2.1 shader update?

    Thanks,
    -Jon


  9. Location
    Unity Technologies HQ, Copenhagen
    Posts
    3,514
    http://unity3d.com/download_unity/builtin_shaders.zip is always the latest deployed version, we have an automatic process that uploads the release.
    Joachim Ante


  10. Location
    Minnesota, USA
    Posts
    1,713
    Even better, thank you!

  11. Unity Graphics Developer

    Location
    Unity Technologies, basement
    Posts
    3,974
    Edited the initial post, now always links to latest shaders.


  12. Location
    China
    Posts
    1,009
    My Blog:Http://Www.1Vr.Cn
    Unity Tencent QQ Group:2453819,34643309,7838310,7838228
    Unity Forum: http://www.iu3d.com
    Development Environment:Unity Pro & iPhone Adv & MacBook Pro & iPhone & iPod & iPad & Zpad.


  13. Location
    Los Angeles
    Posts
    571
    If I want to deliberately replace one of the builtin unity shaders with a slightly modified one, how would I do that ?

    If I add it to my project with the same name... which one will be used ?
    for example the vertex_lit shader that unity uses on the detail objects. like bushes and rocks.


  14. Location
    Zürich, Switzerland
    Posts
    26,572
    if you add your own one with the same name, yours will override the builtin one.

    thats how the SM3 enhanced terrain shader (showcase board) works


  15. Location
    Los Angeles
    Posts
    571
    awesome, thanks


  16. Location
    Netherlands
    Posts
    381
    @Aras: With the file replaced with the latest R3 release, where can I find the Unity 2.6.1 builtin shaders zip file?

    [edit]
    got it: http://download.unity3d.com/download...ders-2.6.1.zip
    Last edited by jcarpay; 10-01-2010 at 07:42 AM.


  17. Location
    Kerala, India
    Posts
    91
    Realtime architectural visualizations
    http://www.vrwalking.com


  18. Location
    GMA950
    Posts
    3,031
    Quote Originally Posted by gfxguru View Post
    here is 3.2 versions sources :
    As Aras said, the link in the first post always has the current shaders.


  19. Posts
    281

    Specular shader

    I downloaded the file that contains the source code for the built-in shaders, but the (plain) "Specular Shader" isn't in there. I was hoping to see how it creates that beautiful, realistic glow which the other specular shaders in Unity don't seem to produce.

  20. Unity tech writer

    Location
    Blackpool, United Kingdom
    Posts
    8,696
    Welcome to the forum, HonoraryBob!

    The code for the Specular shader (at the root of the menu) is actually included in the archive but the filename is a bit misleading - it's in the Normal-Glossy.shader file.
    I'm wired to the world... that's how I... know... everything...

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •