Search Unity

UBER - Standard Shader Ultra

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

  1. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Don't be afraid. Treat is as Unity Standard Shader. Then simply play with features one by one to get the idea how does this work. That's all. For basic features it's nothing much magic inside.

    Can you tell the UBER version (look at verinfo.txt file included). The newest one should be free. Plase give me features enabled to get this shader broken.

    Tom
     
  2. Gord10

    Gord10

    Joined:
    Mar 27, 2013
    Posts:
    142
    It looks awesome! The custom shader I use didn't have an update for the 5.6.3 and I had problems with that, so I consider buying a new shader.

    I am curious if iOS 7+ (and preferably Metal) can run UBER. I won't use tesselation.
     
  3. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    I haven't compiled it for metal, but technically it should work as far as target hardware can handle it. I don't exclude metal (only gles 2.0) so we can count on Unity's shader cross compilation capabilities (fingers crossed) :).
     
  4. ArrenH

    ArrenH

    Joined:
    Jan 18, 2017
    Posts:
    2
    Hi is there going to be an update for compatibility with Unity 2017.2 and 2017.3?
    I wasn't able to get it to work in the 2017.2 beta at the time.
     
    Piahouka likes this.
  5. Devistute

    Devistute

    Joined:
    Aug 23, 2014
    Posts:
    32
    Hi, i have question about the Candle Flame shader in Examples.
    I went on and grabbed the Prefab of the Candle, and placed it to my scene only to find out
    that it does absolutely nothing, and by that i mean that its not moving an inch.

    My rendering path is Deferred and Color Space Linear, if that matters.

    Also, i noticed that adding "Wave Tex" to the texture slot, the candle does start moving.
    But it goes absolutely mental when i add an texture to it. Attached image of that odd behaviour.
    What kind of texture there is supposed to be?

     
  6. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Check the version installed (verinto.txt). UBER 1.2e (U2017.1f3 release) is meant to work in U217.2.0f3 w/o problems.

    BW (only r channel is sampled though) perlin noise texture should be fine. The rest depends on parameters below (amplitudes, frequencies in all axes). You need to manage them experimentally depending on what effect you'd like to achieve. So - even with wav tex that is considered to be "correct" - right numerical parameters are necessary to get realistic effect. I sample texture with Unity _Time depenedence offset - this allows for waves "moving" along the flame.

    Tom
     
  7. JonDadley

    JonDadley

    Joined:
    Sep 2, 2013
    Posts:
    139
    Hi Tomas,

    On Unity 2017.3.b8 with Uber 1.2e I'm getting these two build errors:

    Any thoughts on a fix? It's preventing me doing builds at the moment.

    Thanks!
     
  8. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    I'm able to reproduce the issue, but Your 1.2e version is not suitable for Unity2017 (look at verinfo.txt - there need to be U2017 notice). It's associated with point light shadows that are handled in newest Unity different way (DX11 allows for depth cubemaps). Quick solution is to change such line (above the problematic one - double click the rror to open the file in editor):

    Code (csharp):
    1. #ifdef SHADOWS_CUBE
    to this:

    Code (csharp):
    1. #if defined(SHADOWS_CUBE) && !defined(SHADOWS_CUBE_IN_DEPTH_TEX)
    Save the cginc file and reimport shader to recompile it w/o error. This workaround doesn't manage POM Z-write shadows (which is the reason it doesn't work - I push depths stored in cubemap, but now it's stored natively, not in RFloat one).

    Or simply download 1.2 from Unity 2017.1 (or higher) to get 1.2e that's submitted and managed for Unity2017.

    Tom
     
    Last edited: Nov 10, 2017
    mrleet and JonDadley like this.
  9. Thoronnim_Crystalia

    Thoronnim_Crystalia

    Joined:
    Jan 24, 2017
    Posts:
    29
    Hello,

    I just bought your product and it is absolutely brilliant, really.

    I have a question - I just started to "play" with the tens of settings!! - about using the "Wetness" section as Lava-like flow through the emissive property.

    I noticed that the wetness effect is function of the grade of the surface, which is great!... But when it is vertical (like a wall) the effect seems disappearing... is it correct or I'm doing some kind of error with the properties values?

    Thank you in advance,
    Emanuele
     
  10. Korindian

    Korindian

    Joined:
    Jun 25, 2013
    Posts:
    584
    Hi @tomaszek , I'm having a problem with the emission color when setting the color via code at runtime into a new material, also created at runtime and whose maps are set at runtime.

    I'm setting the color as follows, where "emissive" is a Color32:

    Code (CSharp):
    1. Color color = (Color)emissive * brightness;
    2. material.SetColor("_EmissionColor", color);
    The material has an emission map set. When the emission color (let's say it's green) is set at runtime, the whole object becomes green, rather than just the emission map area. It works as intended when I simply click the dropdown button in the material's inspector to view the material properties.

    It's like the map gets set only when the material properties are viewable in the inspector, but not before. Can you take a look into this please?

    Edit: I figured out that it was a shader keyword issue. I was enabling _EMISSION but it was actually _EMISSION_TEXTURED
     
    Last edited: Nov 14, 2017
  11. cygnusprojects

    cygnusprojects

    Joined:
    Mar 13, 2011
    Posts:
    767
    Hello Tom,

    I'm having a question on how to deal with snow coverage (Uber 1.2e).
    2017-11-15_10-13-21.png
    Whenever I slide the snow slider the snow seems to only affect the top of the material (yellow arrows). However I want to higher parts of the material covered by snow (orange arrow). Can you give me some hints to how to achieve this?
    Also noticed that once you assigned a texture to the Micro surface you aren't able to clear it out afterwards (assigning an empty texture doesn't seem to work).
     
  12. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    In your case water wrinkles/flow is mapped in world XZ plane, so vertical surfaces would present ugly strenching - that's why I dim the flow with angle.

    Snow coverage is controlled also by normals (for vertical surfaces to be free from snow). Adjust slope damp to control this aspect. Micro surface - you're actually not supposed to manage this texture as this is the texture shipped with UBER. It stores micro normals together with dissolve values (so that with small coverage we can see separate snow flakes) and glitter mask. Of course you can use your own texture, but first you'd need to know the meaning of channels so that the texture is "correct" from the shader perspective.

    Tom
     
    Thoronnim_Crystalia likes this.
  13. 265lutab

    265lutab

    Joined:
    Sep 15, 2014
    Posts:
    155
    I'm trying to use the UBER refraction core shader for a VR project and I'm getting very different images for each eye. It looks like a rendering error. Do you support VR with the refraction shader?
     
  14. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Refraction in UBER is based on so called GrabPass which is solved internally by Unity and it doesn't rely on explicitly accessed screen buffers. So, the problem is that most probably it won't work in single pass stereo mode...

    Tom
     
  15. jammer42777

    jammer42777

    Joined:
    Apr 21, 2014
    Posts:
    116
    Hello Tom!
    Thank you for Uber! I just can't go back to the standard shader.
    This isn't a question so much as a request.
    Please keep innovating! A lot of shader solutions are going opensource and then abandoned.
    Please keep Uber around if at all possible!
    --Joshua
     
    tomaszek likes this.
  16. castor76

    castor76

    Joined:
    Dec 5, 2011
    Posts:
    2,517
    I am currently playing with uber, and I have some questions.

    I guess it all depends on the specific settings and hardware, but I was wondering about performance difference in between using pom and tessellation. In general, or other can Tom share his thoughts on this? I like pom and I can understand that it can sometimes look even better (like it said in the manual) but I just wonder about the performance side of thing for now. All assuming that it is running on DX11 such as PS4.

    Any idea?
     
  17. jammer42777

    jammer42777

    Joined:
    Apr 21, 2014
    Posts:
    116
    Made this yesterday with Uber. One of my co workers who has a game development degree said this looked like something made with unreal.
    uberdemo.jpg
     
  18. castor76

    castor76

    Joined:
    Dec 5, 2011
    Posts:
    2,517
    Also.. the snow could benefit from having additional depth or height based extra snow coverage. It has some depth smoothing stuff but it isnt enough to simulate snow building up from cracks first. Like... say a ground tile with bricks. They tends to have snow builds up in the cracks first and then on top of the tile. Not all situation calls for this so it would be super awesome to have height map based additional snow. Similar to water level rising... i wonder if i can hack this in..
     
  19. Weendie-Games

    Weendie-Games

    Joined:
    Feb 17, 2015
    Posts:
    75
    Hi Tomas, is safe to change the UBER folder to a 3rd party folder? It does have any hard coded paths that i should keep attention?

    Thanks
     
  20. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Very dense tessellation can bring GPU to knees - a ton of small triangles can be rasterized very inefficient way (with up to almost all GPU computation power lost). In most cases it's better to use POM with not too huge texture (using 4k RGBA heightmaps is bad idea :) ) that is as small as possible - that's why I suggest using Alpha8 as we don't need RGB info. This helps with texture caching. Having too large empty spaces for POM ray to travel in texture space before it hits can also bring the performance down - having large pure black heightmap with a few small bright elements (standing out details) togehter with high depth values force POM raytracer to travel many, many steps before finding solution (or the solution can't be found and you can see there a "flattening" artifacts). This is also not good usecase. Having heightmaps that has a lot of bright ("up") parts which ensures POM solver can hit the solution fast is best.

    As far as I remember UBER uses relative paths for shader include files. Script locations shouldn't matter as well. Simply - try it. After renaming/moving reimport shaders folder to recompile - any problems will simply show up then - in worst case there will be a part of shader code error reported where you can rename path as well.

    Tom
     
    Weendie-Games likes this.
  21. TechnicalArtist

    TechnicalArtist

    Joined:
    Jul 9, 2012
    Posts:
    736
    I have some errors when using unity 2017.3.0f1
    1)
    Shader error in 'UBER - Specular Setup/ Core': '' : 'unityShadowCoord' already defined at Assets/UBER/Shaders/Includes/UBER_AutoLightMOD.cginc(13) (on gles)

    Compiling Vertex program
    Platform defines: UNITY_NO_DXT5nm UNITY_NO_RGBM UNITY_ENABLE_REFLECTION_BUFFERS UNITY_FRAMEBUFFER_FETCH_AVAILABLE UNITY_NO_CUBEMAP_ARRAY UNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF2 SHADER_API_MOBILE UNITY_HARDWARE_TIER2 UNITY_COLORSPACE_GAMMA UNITY_LIGHTMAP_DLDR_ENCODING

    2)
    Shader error in 'UBER - Specular Setup/ Core': '' : 'unityShadowCoord' already defined at Assets/UBER/Shaders/Includes/UBER_AutoLightMOD.cginc(13) (on gles)

    Compiling Vertex program
    Platform defines: UNITY_NO_DXT5nm UNITY_NO_RGBM UNITY_ENABLE_REFLECTION_BUFFERS UNITY_FRAMEBUFFER_FETCH_AVAILABLE UNITY_NO_CUBEMAP_ARRAY UNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF2 SHADER_API_MOBILE UNITY_HARDWARE_TIER2 UNITY_COLORSPACE_GAMMA UNITY_LIGHTMAP_DLDR_ENCODING
     
  22. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Give me UBER's verinfo.txt contents please. I think I took care about it, but maybe I'm wrong here.

    Tom
     
  23. 265lutab

    265lutab

    Joined:
    Sep 15, 2014
    Posts:
    155
    It looks like they have code here to correct these errors for single pass stereo.
    https://docs.unity3d.com/Manual/SinglePassStereoRendering.html
     
  24. TechnicalArtist

    TechnicalArtist

    Joined:
    Jul 9, 2012
    Posts:
    736
    Hi,
    Thanks for response.
    I attached _verinfo.
     

    Attached Files:

  25. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Tested again newest UBER (yours is), but the problem seems to be related to gles (-> GLES2.0) target. It is platform excluded from my targets (due to resources limitation of it). How could you get such error? (other than removing exclusion keyword in shader code). Gles3 can get compiled, gles can not. Actually it produces empty shader output.

    Tom
     
  26. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    The guidelines here does not apply to grab pass. It was reported seeral times to be broken (google for unity vr single pass grab issue). It might be the case that it is laready fixed by Unity. On my side I tested this with newest UBER and U2017.3.0f1 and it seems to work (I don't have headset but vive has option to show splitscreen when in play mode). Only refraction strength should be halved to get the same results.

    Tom
     
  27. croesus42

    croesus42

    Joined:
    Oct 30, 2014
    Posts:
    23
    Hello, I am a newbie and not much knowledge about shaders. I read the document but still I need some tutorials. Is there any simple tutorials that shows how to use the shader basicaly?
     
  28. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    I couldn't find any myself, but there's not much to know really. It works pretty much in place of Standard Shader with just more options. Any particular thing you are confused about?
     
  29. croesus42

    croesus42

    Joined:
    Oct 30, 2014
    Posts:
    23
    Thanks for the replay. Nothing particular. I just wanted to see how it works with an example. For example on a brick wall or a tree bark someone shows how to make a good looking shader from scratch.
     
  30. Becoming

    Becoming

    Joined:
    May 19, 2013
    Posts:
    781
    The same principles apply as with Unity's standard shader. Uber comes with quite many examples, you can look at them and see what kind of textures and settings are used, brick walls or tree barks are quite generic use cases and tutorials specific for Uber are not needed. You can basically look at any texturing tutorial or tutorials of the standard shader.
     
    croesus42 likes this.
  31. janvetulani3r

    janvetulani3r

    Joined:
    Feb 8, 2017
    Posts:
    12
    I have a use case where I need to do relief mapping /parallax mapping with a correct silhouette on wrapped materials, on objects with edited edge normals on bevelled edges.

    And object like this test object: https://imgur.com/a/8z5uN
    But I need the silhouette on the wrapped corners to be correct, the shader forge shader I have currently is not up to the task.

    The environment for this will be Android and Windows, but on fast devices we have control over, but not fast enough to consider using tessellation and possibly in WebGL.

    Would the parallax shaders in this package allow me to do this?
    Can I recommend this to my boss?
     
  32. amynox

    amynox

    Joined:
    Oct 23, 2016
    Posts:
    178
    Hi Tom,

    i'm getting these errors after upgrading from 2017.1 to 2017.3 :

    Shader error in 'UBER - Metallic Setup/ Core': 'length': no matching 1 parameter intrinsic function; Possible intrinsic functions are: length(floatM|halfM|min10floatM|min16floatM) at Assets/UBER/Shaders/Includes/UBER_StandardShadow_Tessellation.cginc(636) (on d3d11)

    Compiling Vertex program with SHADOWS_CUBE _ALPHATEST_ON _SNOW
    Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_LIGHTMAP_RGBM_ENCODING


    Shader error in 'UBER - Metallic Setup/ Core': invalid subscript 'vec' at Assets/UBER/Shaders/Includes/UBER_StandardShadow_Tessellation.cginc(636) (on d3d11)

    Compiling Vertex program with SHADOWS_CUBE _ALPHATEST_ON _SNOW
    Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_LIGHTMAP_RGBM_ENCODING*

    My uber version is => UBER 1.2e (U2017.1f3 release)

    In 2017.1 everything was working fine without any Uber erros
     
  33. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Yep, worked fine until 2017.3.0f3 release... Need to check it.

    EDIT:
    Tested it in newest Unity (2017.3.0f3)and it seems to work. The error is related to point light shadow caster. But I fixed it already. Which is pretty weird you report UBER version as 1.2e (U2017.1f3 release). I have it as well here and it works...
    The line which produces error is supposed to be never called under dx11, because under dx11 we have native depth cube textures (SHADOWS_CUBE_IN_DEPTH_TEX defined).

    Could you copy and paste a few lines around the error. Right above the error there is such line:

    #if defined(SHADOWS_CUBE) && !defined(SHADOWS_CUBE_IN_DEPTH_TEX)

    which prevents to compile the wrong code.

    Tom
     
    Last edited: Dec 20, 2017
  34. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Ouch, indeed I have some out of sync changes here (related to this bug particularily)... Sorry for the inconvinience. I'm uploading the package with this fix right now.
     
    amynox likes this.
  35. amynox

    amynox

    Joined:
    Oct 23, 2016
    Posts:
    178
    Thanks Tom,

    Didnt find any new update for Uber on the asset store...
     
  36. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    I submitted it yesterday. Should be available soon.
     
  37. mrleet

    mrleet

    Joined:
    Mar 15, 2016
    Posts:
    1
    Thanks for this fix! It's been plaguing me for days! Just so you know when I just re-downloaded version 1.2e from the Asset Store it still had the old version of this line in it. Fixing it got rid of my exporting problems! Yay!
     
  38. BirdInTheCity

    BirdInTheCity

    Joined:
    Jun 9, 2017
    Posts:
    10
    Hi Tom,

    When rendering for VR, I'm only seeing shadows for one eye when using UBER - Specular / Core. Is there an easy fix for this? Loving the shaders so far!
     
  39. 265lutab

    265lutab

    Joined:
    Sep 15, 2014
    Posts:
    155
    How is the performance of the two sided core shader compared to having both sides be geometry and using the Unity standard shader?
     
  40. 265lutab

    265lutab

    Joined:
    Sep 15, 2014
    Posts:
    155
    In my project one scene is using Exponential fog and anther one is using Exponential Squared. Is there any way to have the UBER shaders set up so it can support one it one scene and another in the other scene or can it only be set for the whole project?
     
  41. 265lutab

    265lutab

    Joined:
    Sep 15, 2014
    Posts:
    155
    I was able to do it by copying the core shader and the fog type CG file and pointing the copied core shader to the copied fog type. Let me know if there is a better way to handle this.
     
  42. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    I did it days when Unity was compiling large number of shader variants pertty long (at it was taking extraordinary amount of RAM). We could add directive to shader to multicompile fog for forward now I guess and not using hardcoded fog #define. This would enable switching between fog types globally. To reduce shader variants produced for build you could explicitly use #pragma multi_compile FOG_TYPE1 FOG_TYPE2 - when you need only 2 types)

    What's the VR mode you use? (and Unity version and light that produces the shadow and UBER version)

    TOm
     
  43. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    I'm getting shader errors in Unity 5.6.4p3.

    Shader error in 'UBER - Metallic Setup/ Core': unrecognized identifier 'UNITY_POSITION' at Assets/UBER/Shaders/Includes/UBER_StandardCore.cginc(1096) (on d3d11)
    Compiling Vertex program with DIRECTIONAL _WETNESS_NONE
    Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_LIGHT_PROBE_PROXY_VOLUME

    Shader error in 'UBER - Metallic Setup/ Core': unrecognized identifier 'UNITY_POSITION' at Assets/UBER/Shaders/Includes/UBER_StandardCore.cginc(1096) (on d3d11)
    Compiling Vertex program with DIRECTIONAL _WETNESS_NONE
    Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_LIGHT_PROBE_PROXY_VOLUME
     
  44. nbac

    nbac

    Joined:
    Jul 7, 2015
    Posts:
    267
    btw. it does work. i can use your geom blend shader as a decal shader however wetness>>color/opacity and snow do ignore the alpha cutout area. any fix for that?

     
  45. CosmosBear

    CosmosBear

    Joined:
    Aug 2, 2012
    Posts:
    67
    Hi Tomaszek!
    We are currently working on the PSVR port of our game and I've noticed that all the objects using the Uber Shader (_UBERShader_Specular) are rendered over the fog.

    We also use Unity Post Processing Stack V1
     
  46. MNNoxMortem

    MNNoxMortem

    Joined:
    Sep 11, 2016
    Posts:
    723
    I am getting Shader errors in Unity 2017.3.0f3 and I just redownloaded it. The verinfo says UBER 1.2f (U2017.1f3 release) but I would expect U2017.3 shouldn't I?
    upload_2018-1-4_22-22-35.png
     
    Last edited: Jan 4, 2018
  47. CosmosBear

    CosmosBear

    Joined:
    Aug 2, 2012
    Posts:
    67
    Also: Unity Version 5.6.4p2
     
  48. MNNoxMortem

    MNNoxMortem

    Joined:
    Sep 11, 2016
    Posts:
    723
    By the way. Deleted the library folder. Reloaded the project and it works again.

    There is something COMPLETLY F***ed with the cache unity builds. Switching branches with big changes between both very often leave unity 2017.3.0f3 in a broken state you can simply not recover without deleting the library folder and wait for an eternity to reimport everything again.
     
  49. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Try one of the patches to see if it has more stability for you.
     
  50. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    I guess dealing with this already (point lights shadow casting with newsest Unity that uses raw shadowmaps on cube textures). So - I assume it works in the end (it should for the very last version - it's release from U2017.1f3 but should work on higher versions as well). Does it?

    Please give me the stack effects used. Does it happen in editor? Are you in forward or deferred? In forward you need to enable fog "manually" (open UBER_ForwardFogType.cginc) change to the type you use. Save the file and reimport shaders folder.

    Please give me shader used and features enabled. I assume you use geom blend (from UBER) that has wetness/snow enabled. Do you experience transparency issues when dealing with wetness opacity?

    Tom