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

UBER - Standard Shader Ultra

Discussion in 'Assets and Asset Store' started by tomaszek, Jun 23, 2015.

  1. frbrz

    frbrz

    Joined:
    May 10, 2016
    Posts:
    76
    Thank you. Do you have any idea why i'm counting almost 5,000 keywords while your tool is counting approximately 60 (plus 76 unused)?

    sense.jpg
     
    Last edited: Dec 17, 2016
  2. punk

    punk

    Joined:
    Jun 28, 2013
    Posts:
    408
    I've never used it, but I'd imagine it's counting them more than once, where it says uber 34 keywords on each of those shaders, they're the same keywords shared across all the uber shaders, probably should go private if you wanna talk more, so we don't clog up Tom's forum
     
    frbrz likes this.
  3. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    I elaborated about keywords before here (many pages back :0 ). For Unity only keywords setup in materials or globally counts. Sometimes material is not used in scene so it might work, sometimes Unity will give error and you don't see effect, but then after a while you'll see shaders don't work as expected (because they have wrong keyword "switches" selected. If you import UBER and remove all examples & materials, then start using UBER with your own materials using only necessary features (my example scene uses a lot of keywords because I need to show most of features at once) it won't be that drastic. Definitely seeing "stats" showing up 5000 keywords is propaganda ? Why then UBER example scene would work at all (with 128 keyword limits) ? For incoming pacakges I will do some tricks to use no keyword at all (even in U5.5 limit will be broken at some point in the future with plenty of 3rd party packages installed).

    Tom
     
    punk likes this.
  4. punk

    punk

    Joined:
    Jun 28, 2013
    Posts:
    408
    agreed I can see that 256 limit being smashed very quickly
     
  5. frbrz

    frbrz

    Joined:
    May 10, 2016
    Posts:
    76
    Hi. I appreciate your answer but you don't need to be so suspicious. I'm trying to understand how Unity works. I'm not making statements about your work nor making propaganda. I'm removing references to other assets on the store. Although users talk about TimeOfDay and Scion. I thought it was necessary to explain myself and my problem.
    The first time I imported UBER in a project (UBER + Unity Post-Processing https://github.com/Unity-Technologies/PostProcessing) it worked fine, but a couple hours later Unity gave me a keyword limit error, only because I imported another very basic asset with 3 shaders (I wont say wich asset now).
    I don't know what was the cause of the error but I think that maybe it was due to an Unity bug because I tried to replicate the process with good results, including a handful of other assets.
    Just for the record, I did read your answers on your forum before writing my post https://forum.unity3d.com/threads/uber-standard-shader-ultra.335493/page-13 + page-14 + page-18. But that doesn't anwer the question regarding how many keywords UBER consumes in his normal capacity.
    I understand that nobody uses UBER in his full capacity because it's very big and no one ever needs so many variants. An idea or raw estimate of how many keywords UBER will normally need based on experience or memories would be nice, because you need to have that in mind to evade headaches, although I understand it's a very subjective matter.
     
    Last edited: Dec 17, 2016
  6. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Eh, it's nothing personal. Was rather a joke when worded it "propaganda" :). The method in which keywords are listed and result of 5000 is more than mysterious to me though.

    OK, so you dug already in this forum thread (congrats - it's hard to do on these 25 pages). So let me explain it more deeply now. Let's say you've got a shader imported. It takes ... 0 zero keywords, no matter how many keywords and variants used in this shader (!). It counts when You create material using this shader. Then this matters. Anyway that's what I observe (because I don't have access to Unity sources - it's only a guess made basing on my experience). For what you'll see below - disclaimer - I might be wrong. I can only try to share the knownledge I collected over last few years :) (it's not obvious how things work and it took me some time to figure it out as well).

    Let's say shader has such keywords defined:
    Code (csharp):
    1. #pragma shader_feature FEATURE_A FEATURE_B
    When you make material Unity sees it as 2 keywords and handle 2 variants. If material would haven't keywords defined, Unity assumes first variant is used and compiles this variant. Shader will work as if FEATURE_A is set.

    If you make it in shader like this:
    Code (csharp):
    1. #pragma multi_compile FEATURE_A FEATURE_B
    It works the same, but Unity compiles 2 variants at place. They are stored (making shader code stored in build bigger). That's why Unity introduced shader_feature vs. multi_compile difference. With shader that has many variants, it code can take several MB ! You probably don't need all variants in your game, you don't use them. Only used in materials are compiled and included to build. If you need more variants (even not used) you could rely on multi_compile. That's why I use multi_compile on my other product RTP. User should be able to switch between different shading levels (visual quality vs. performance). So we compile them all and include in build to be ready for realtime switch/usage.

    Keywords are thing that can make shader variants explode
    Code (csharp):
    1. #pragma multi_compile FEATURE_A FEATURE_B FEATURE_C
    is 3 variants
    Code (csharp):
    1. #pragma multi_compile FEATURE_A FEATURE_B FEATURE_C
    2. #pragma multi_compile FEATURE_D FEATURE_E FEATURE_F
    is 3x3. With increasing number of features it grows exponentially... (that's a side note).

    Unity handles internally up to 256 (in U5.5) keywords. They code it probably in some kind of mask (8 bytes = 256 bits) which defines variant to be used. Variants come not only from shader developers like me. Unity uses internally many keywords regarding lighting, shadowing, using HDR/LDR buffers and many more. That's why limit can be quickly exceeded.

    So, they introduced underscore thing like this:

    Code (csharp):
    1. #pragma shader_feature _ FEATURE_B
    Unity handles 2 variants but uses only 1 keyword. If FEATURE_B is not set in material, first variant (without FEATURE_B defined) is used.

    There is answer for your question.

    Import a shader of UBER. Make material out of it. Select features you need. Then go into debug mode of inspector (click on menu in the very top right corner of inspector - you'll find there debug mode). Now you'll see material inspector - very basic/default one + some other useful info about material. For example render queue, tags AND keywords set. They are stored in material as string separated by spaces. I found that only these keywords matter.

    So, a shader with such definitions:

    Code (csharp):
    1. #pragma shader_feature _ FEATURE_A
    2. #pragma shader_feature _ FEATURE_B FEATURE_C
    It's 2x3=6 variants and 3 keywords used.

    When you create material and don't set any keyword, no keywords are used. If you use FEATURE_A and FEATURE_B. Here is what I'm not sure about - probably 2 keywords add to the limit, but maybe 3 - I haven't checked it already. My guess is 2 keywords count, because when Unity throws error on console it shows up keyword list used (list should be then as long as 128 positions in U5.4 and 256 in U5.5). I can't recall if I saw such list with "FEATURE_B FEATURE_C" or only FEATURE_B (when it's set as keyword in material).

    Simple way to reduce number of keywords is to hardcode a feature:

    Code (csharp):
    1. #define FEATURE_B 1
    instead of:

    Code (csharp):
    1. #pragma shader_feature _ FEATURE_B FEATURE_C
    when you know that only FEATURE_B will be used. Then you need to make sure FEATURE_B and FEATURE_C are NOT listed on keywords list of material (you can do it by script or in debug mode I mentioned above). Then you would also need to make sure no inspector script set the keyword again. Shader inspector scripts rely on keywords set, so it's sometimes a bit awkward to find the right place in inspector code and change all things to work "like if the keyword is always set" - inspectors shows differe state of GUI depending on keywords. Compare in UBER - if you select a feature checkbox it can be unfolded and you can set feature parameters like translucency, etc.

    The other source of "keyword limit trouble" are global keywords. Unity store somewhere a list of keywords seen globally. They only can be set, unset and you can poll if keyword is globally set (when you know its name). Hopefully this global keyword is not serialized nor saved anywhere, so when you make sure no script sets it, you're save. Because the problem is that when global keyword is set and you don't know it - you're screwed. You can't unset it because you might not even know its name (which is necessary to unset it). We've got no function to list all global keywords set (which would be very helpful BTW).

    I hope this long post will help other developers. I hope that I won't need to elaborate on it more in the future. Because Unity keywords are real pain in ... back :).

    When installing UBER - do it w/o example materials (which have keywords set and this can add to the limit). Make materials in project with only features needed. Store no materials that are not used while they can potentialy consist of keywords for features that are not used. We don't need features from not used materials. Do we ? Such materials store keywords junk - their only purpose is to let you down when limit breaks... Remember that when you import yet another 3rd party package (including mine) where dangerous thing named "materials with keywords set" can harm your patience.

    Tom
     
    Last edited: Dec 17, 2016
    chelnok, John-G, TZYalcin and 2 others like this.
  7. punk

    punk

    Joined:
    Jun 28, 2013
    Posts:
    408
    The scientist came out in me, I did a whole bunch of tests this morning and they seem support what you've said here, ie it only materials that are contributing to the keyword count, it looks I was incorrect suggesting that a shader does, sorry for causing any confusion ;)
     
    hopeful likes this.
  8. vladstorm_

    vladstorm_

    Joined:
    Nov 26, 2013
    Posts:
    184
  9. vladstorm_

    vladstorm_

    Joined:
    Nov 26, 2013
    Posts:
    184
    also a question. i'd like to add vertex shader before your shader to change geometry a bit.
    how can i do it ?

    i tried to put 2 materials on the object - 1st mine and then yours - but it doesnt work this way. - in the end i have 2 models affected by 2 shaders separately.
    what's the right way to do it? can i keep my vertex/tessellation shader as a separate one or i have to add them to your shader file?
     
  10. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    HAve you imported UBEr in right order ? It's important first part with scripts is imported first because it consist of asset processor for meshes that are placed in 2nd part. Such models using this kind of UBEr shader variant need mesh to be preprocessed. It's described in my pdf doc. If you've got everything imported you can reimport again (right click on mesh in proejct view - select reimport) mesh. Also - for me to check the issue I'd need exact Unity version and UBER version. Might be that you're trying to run UBER in U5.6 ?

    You need to combine your displacement functionality and UBER in one shader. It's relatively easy to find vertex functions in UBER_StandardCore.cginc (split into different lighting variants - forward/deferred)

    Tom
     
    vladstorm_ likes this.
  11. arenshi

    arenshi

    Joined:
    Dec 21, 2012
    Posts:
    3
    Hi! Please fix it as soon as possible:
    Unity 5.4.3p4

    Shader error in 'UBER - DynSnow - Metallic Setup/ Core': Program 'fragForwardBase', error X4510: maximum number of samplers exceeded. ps_3_0 target can have a maximum of 16 samplers (on d3d9)

    Compiling Fragment program with DIRECTIONAL SHADOWS_SCREEN LIGHTMAP_ON DIRLIGHTMAP_COMBINED DYNAMICLIGHTMAP_ON LOD_FADE_CROSSFADE _WETNESS_NONE _DETAIL_TEXTURED
    Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING
     
  12. agentc0re

    agentc0re

    Joined:
    Feb 28, 2014
    Posts:
    77
    Merry Christmas everyone!!

    I am using Unity 5.5.0p3 with Uber Version: 1.2 (Oct 24, 2016).

    When I hit the play button, everything works as you'd expect. No pink shaders!! :D Uhh yeah, it's perfect.
    When I create a build for windows however, everything goes pink! In The graphics settings I've added the Uber Metallic and Secular shader to the list of always used shaders as it was suggested to me in another forum. This however only ever leads to a unity crash after HOURS of it trying to compile.

    Prior from Unity 5.5.0, it complied just fine! I'm not sure whats happened. Is there anything on my end that I could give you Tom that would help diagnose this?

    **EDIT
    Finally got some errors after it compiled.
    Code (CSharp):
    1. Shader error in 'UBER - Specular Setup/ Core': invalid subscript 'xyw' at Assets/UBER/Shaders/Includes/UBER_StandardShadow_Tessellation.cginc(656) (on d3d9)
    2.  
    3. Compiling Vertex program with SHADOWS_CUBE LOD_FADE_CROSSFADE
    4. Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING SHADER_API_DESKTOP
    Code (CSharp):
    1. Shader error in 'UBER - Metallic Setup/ Core': invalid subscript 'xyw' at Assets/UBER/Shaders/Includes/UBER_StandardShadow_Tessellation.cginc(656) (on d3d9)
    2.  
    3. Compiling Vertex program with SHADOWS_CUBE LOD_FADE_CROSSFADE
    4. Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING SHADER_API_DESKTOP
    5.  
    I am using DX11 in Unity
     
    Last edited: Dec 26, 2016
  13. vladstorm_

    vladstorm_

    Joined:
    Nov 26, 2013
    Posts:
    184
    thank you / ill try

    another questions is how to edit emission map texture?
    if i open it in unity it looks like this

    if i open it in system browser on mac it looks like this

    if i open it on photoshop then like this


    so i can't edit it. how can i do it?
    maybe it has something to do with the fact that they are sRGB or sth.
    how u make them on the first place like all the textures ? r u using substance designer or sth ?
     
  14. agentc0re

    agentc0re

    Joined:
    Feb 28, 2014
    Posts:
    77
  15. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    As you said you're using dx11 only (do dx9 we simply forget as it's slowly decaying gaming target platform). For build go to Unity/Settings/Plyaer and uncheck automatic API, for manual one you can select d3d9 and d3d11 for windows. Remove d3d9 and errors should be gone.

    The same - it's due to exceeded resources available for dx9. With plenty of features used dx9 is not capable of handling it (together with Unity's lightmaps which takes textures).

    rgb is direct emissive value. With no alpha you'll have constant (or pulsating) emission available. Although if you like to have animated panned mask - it's placed in alpha channel - whereever alpha is white rgb emission will be seen. Mask can be panned - example is the cube with blinking yellow "lightbulbs"

    Tom
     
  16. agentc0re

    agentc0re

    Joined:
    Feb 28, 2014
    Posts:
    77
  17. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    I error is dx9 only I believe that there must be more errors then - most probably sampler count limit. In editor only variants that are used are compiled. In build Unity prepares more variants (for different lighting scenarios) which can break the limit in UBER. I'm not sure but can you make a simple build with a single UBER material used in scene (material with UBER variant that makes trouble). Then reduce some feature that uses dedicated texture (like 2ndary maps or water droplets) and try again. Give me the shader you use and feature list used + lighting scenario (lightmaps, lights used, shadows, probes of used). I can try to reproduce the issue on my side to fix it.

    Tom
     
    agentc0re likes this.
  18. agentc0re

    agentc0re

    Joined:
    Feb 28, 2014
    Posts:
    77
    Made a new project like you suggested. Could not reproduce the error so it's something specific to my project that is experiencing these issues. uhhg. I've un/reinstalled many of my assest in my project, including uber and I am just not sure what the problem could be.
     
  19. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Drop me a line via private message incl. order number and purchase date. We might arrange skype screenshare session to quickly find the issue on your side remotely.

    Tom
     
    agentc0re likes this.
  20. agentc0re

    agentc0re

    Joined:
    Feb 28, 2014
    Posts:
    77
    Holy cow so I wasn't receiving the UBER errors until I switched my project back to "Visible Meta Files" in Edit > Project Settings > Editor
    Hrmm the plot thickens!
     
  21. imtehQ

    imtehQ

    Joined:
    Feb 18, 2013
    Posts:
    232
    So i got the snow level set to be controlled by the script folloing your manual, but in the editor everything works fine, but in the standalone its not working,
    Had the issue with d3d3 before, but fixed that as you said above, but somehow i can not get the snow to display after a build.

    No issues with compiling the game.
    Any idea?
     
  22. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Give me moe specs (UBER version, Unity version). Do you turn on snow, use separate shader - is it (the snow shader with right variant) present/included in your build ?

    Tom
     
  23. imtehQ

    imtehQ

    Joined:
    Feb 18, 2013
    Posts:
    232
    unity version 5.4.2f2
    UBER 1.1c
    I turn snow on by putting the snow level to 1 on the Uber_Global Params script.
    The shader i use is the Uber - DynSnow - Metallic Setup/Core

    If i include the shader in the build, it wont build andmore, it will just get stuck.

    Any idea?
     
  24. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    I've just made a build in U5.4.1 from example scene and global snow control works (Win7). Could you check it on your side ? (fresh project, UBER installed and example scene built). I still suspect some shader code might be stripped out from build by Unity. You could also check target - d3d9 vs. d3d11 (d3d9 might not work and you can remove this target from build in Unity player settings).

    Tom
     
  25. imtehQ

    imtehQ

    Joined:
    Feb 18, 2013
    Posts:
    232
    i was not using d3d9

    i just upgraded to unity 5.5, looking it that fixed the issue, it did not :(
    So same issue now on unity 5.5 :p
     
  26. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Please answer my question - make a build on fresh project with UBER installed - example scene built and tell me. It might be something specific to your project setup.
     
  27. imtehQ

    imtehQ

    Joined:
    Feb 18, 2013
    Posts:
    232
    Well, everything works fine in the example, even after build, in unity 5.5
     
  28. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Good news. In U5.5.0p3 things seem to work back (I can test it only in editor using split mode non head mounted). The only fix need to be done like n00body said. Open UBER_CopyPropsTexture.shader and change this:

    Code (csharp):
    1. return tex2D(_MainTex, i.uv).a;
    into this:

    Code (csharp):
    1. float2 correctedUv = UnityStereoScreenSpaceUVAdjust(i.uv, _MainTex_ST);
    2. return tex2D(_MainTex, correctedUv).a;
    also add this:

    Code (csharp):
    1. float4 _MainTex_ST;
    after this:

    Code (csharp):
    1. sampler2D _MaintTex;
    I will put this fix in next update.

    Tom
     
    Last edited: Jan 5, 2017
    Deleted User likes this.
  29. punk

    punk

    Joined:
    Jun 28, 2013
    Posts:
    408
    Awesome I'll test it out now
     
  30. punk

    punk

    Joined:
    Jun 28, 2013
    Posts:
    408
    Works perfectly now in single pass VR mode, thankyou ;)
     
  31. Deleted User

    Deleted User

    Guest

    Hallo Tom,

    how does the 2-Sided Core variant compare performance wise to using the 1-Sided Core variant with duplicated and flipped faces?

    Thanks!

    Sean
     
  32. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    2sided should be always better, but you won't notice it untill your vegetation reach something like 1m tris.
    Tom
     
  33. GWStudio

    GWStudio

    Joined:
    Sep 27, 2016
    Posts:
    109
    UBER V1.1b not working in unity 5.5.0 f3
    I got compile errors and pink shader
    Please help ...
     
  34. Lex4art

    Lex4art

    Joined:
    Nov 17, 2012
    Posts:
    445
    Current version of UBER is 1.2 - works fine with 5.5.0f3...
     
  35. Andresmonte

    Andresmonte

    Joined:
    Nov 22, 2014
    Posts:
    37
    hello, is there a way to fix this, it happens when you scale a bone using tessellation, in this case the ethan's head.
    problem.png
     
  36. Andresmonte

    Andresmonte

    Joined:
    Nov 22, 2014
    Posts:
    37
    Fixed with GPU Skinning. on

    Edit:
    Fix works in 5.4 (only tested), not working in 5.5.
    is there a way to fix this, i want a smoothed character
     
    Last edited: Jan 19, 2017
  37. ZoneOfTanks

    ZoneOfTanks

    Joined:
    Aug 10, 2014
    Posts:
    128
    Just a stupid question - which version of UBER is optimal for Unity 5.3.7? :confused:
    We plan to use Unity 5.3.x version for a long time. We are small team of Unity fans - so is it enough to have one license for team or we need a license for each team member? Thanks! Great asset so far! :) Keep going!
     
    Last edited: Jan 22, 2017
  38. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    I guess if the team is small enough one lincense is enough. :) Get the version Unity gives you for your Unity (open download manager of AssetStore in your Unity). It should give you right version. You know that some fixes introduced in newer UBER versions might be not reflected in lower UBER package versions though.

    Phong smoothing (I see you have also displacement set - try to lower it) is realised basing on data given by Unity in mesh (it uses normals and vertex positions). Ifskinned meshes works different (providing different data it will be hard to manage unless we can determine it's skinned mesh at shader level which I'm not aware of). On your screenshot it looks like phong overshoot it while lower smoothing lvevel wouldn't it improve the look ?

    Tom
     
  39. Porto881

    Porto881

    Joined:
    Jul 11, 2013
    Posts:
    74
    Bought it a while ago but havn´t had a chance to test it until now and I can´t really get POM or Tesselation to work, at all. I add my textures, Albedo, Metallic, Normal, Height an occlusion but the only thing that happens when I increase depth is that the cube comes "apart" and the sphere get bigger.

    The example scene works great. I use textures from gametextures.com and I use the Metallic setup.

    A step by step tutorial on how to get UBER to work would be nice.

    Unity 5.5 and UBER 1.2

    Edit: changed height-texture to "Alpha source from gray scale" and it worked.
     
    Last edited: Jan 23, 2017
    Lex4art likes this.
  40. Andresmonte

    Andresmonte

    Joined:
    Nov 22, 2014
    Posts:
    37
    setting displacement to zero improved the performance a little bit, thanks.
    On the smoothing, Ill have to establish my character at the posible maximum scale, and then calibrate the smoothing, something is something.
     
  41. vladstorm_

    vladstorm_

    Joined:
    Nov 26, 2013
    Posts:
    184
    Hi guys,

    I have a question. I'm new to PBR shaders but UBER is amazing! I compared like 6 different unity PBR alternative frameworks and UBER is the best.
    I'm learning how to simulate different materials with PBR and struggling with finding info how to simulate liquids.
    Wood, metal, rubber, etc are pretty straight forward.
    But what about liquids. I have to make blood, milk and ocean materials in my next project. Can't find anything.
    I know that liquids should have SSS and fresnel. But how exactly it should be done for UBER for example.
    1. You can't tweak fresnel in PBR shaders but instead its a part of softness - which is very confusing.
    Even if I turn off softness and metallic to 0, the material still has reflections - that's super weird
    2. SSS is the most confusing. for example for the ocean - the sun should come thru just the upper waves - how am i doing that? or for the other liquids even more mysterious.

    How people normally simulate these materials? are there any references or places w reference values for liquids?
    All PBR examples I found aren't liquid / Even in Substance Designer they dont have SSS- which is confusing.

    Pls, help :>
     
  42. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Oceans need quite different lighting treatment that's not covered by regular PBR shaders. UBER is no exception - it's packed with features but generally PBR idea still is built over Unity's PBR GGX model. For removing reflections - if you use specular model you can set specular color explicitly to whatever value you need. Setting it belov ceratin threshold will remove spcular effects on material (like setting spcular color to 0). That's how Unity implemented this.

    Tom
     
  43. vladstorm_

    vladstorm_

    Joined:
    Nov 26, 2013
    Posts:
    184
    @tomaszek thank you.
    >specular color to 0
    im using metallic PBR setup / should i use rather specular?

    i'm new to PBR shaders. I thought since UBER has SSS it wud be easy to implement stuff like ocean/milk. DO u think if ill add custom fresnel manually on top of UBER if could work ? or to make liquids is a completely different idea?
     
  44. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Ocans need different approach. specular setup allolws for removing specular effects (from direct lights) when you set specular color to 0.

    Tom
     
    vladstorm_ likes this.
  45. GoGoGadget

    GoGoGadget

    Joined:
    Sep 23, 2013
    Posts:
    864
    Hi Tom,

    Unity 5.6 has some very nice instancing features, now as a default option on every shader, but ticking the option for UBER shaders (even simple ones like Core/No Normalmap) doesn't work. From my tests, I've seen amazing perf. improvements with the Unity standard shader when this is enabled, so it would be great to have!
     
  46. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    I'm not sure, but you could try to uncomment #pragma multi_compile_instancing in given shader in its all passes. Might help (or U5.6 solves instancing different comparing to 5.5). I'll look into this on some next U5.6 beta iteration.

    Tom
     
    nxrighthere and GoGoGadget like this.
  47. GoGoGadget

    GoGoGadget

    Joined:
    Sep 23, 2013
    Posts:
    864
    Works like a charm! (I think, haven't tested too deep yet, but it definitely instances Uber shaders now).

    One more question: in your opinion Tom, do you think it's worth setting up a LOD material for faraway objects that uses, say, the "Simple" uber shader (w/no normalmap) vs a standard Uber shader (no POM)? I'm probably going to profile as well, but thought I'd ask here first.
     
  48. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    It depends on scene complexity I gues. Profiler should tell you the truth (GPU load - opaque in forward or Gbuffer drawing in deferred).

    Tom
     
    GoGoGadget likes this.
  49. Darkmonk

    Darkmonk

    Joined:
    Nov 3, 2010
    Posts:
    50
    Hi,
    I am currently working on a project that requires the use of allot of rocks and boulders, we would really like to have moss on the up vector of the rocks but it seems that you cant do it with your current shaders, is there some way we can achieve this with the shaders as they are now ? or could I put in a request to have a variation made that has the ability to choose a texture to be applied to the up vector of the objects ?
     
  50. plink

    plink

    Joined:
    Mar 23, 2012
    Posts:
    23
    Hello,

    I'm getting this error in Unity 5.5.0p1:
    error CS0246: The type or namespace name `UBER_MouseOrbit_DynamicDistance' could not be found.

    Any help would be appreciated. Also, I saw you mention RTP4 earlier in this thread and I was wondering if you had an estimate as to when that will be available. Thank you!