Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only. On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live. Read our full announcement for more information and let us know if you have any questions.

[RELEASED] OmniShade - Mobile-Optimized Shader

Discussion in 'Assets and Asset Store' started by OmniShader, Feb 15, 2022.

  1. OmniShader

    OmniShader

    Joined:
    Feb 12, 2022
    Posts:
    45

    OmniShade on the Unity Asset Store

    Website | YouTube | WebGL Demo | Discord Support | Email

    OmniShade
    is a highly performant shader designed for mobile devices. It is packed with a multitude of graphics techiques allowing it to achieve almost any look from realistic to toon to anime, yet also blazingly fast due to a progressive system of calculating only what it needs to for any setting.

    It was designed to bridge the gap between Unity's Standard Shader and mobile shaders, but can often look even better than desktop-class shaders due to its high level of stylization, combination, and customization.

    All of the sample images above were rendered using only OmniShade. It can achieve almost any look, can be used for games with complex or simple lighting -- regardless, the performance is always optimal. It is quite possibly the only shader you will need for your entire game.

    Feature summary
    All of the below can be used in any combination with optimal performance!
    On top of this, you also get:
    • Built-In and URP pipeline support
    • Progressively adaptive performance
    • Set of demo scenes
    • Full source code, easily extendable
    It's true, the Standard Shader is still too slow for mobile devices. And let's face it, giving an artist Shader Graph is like giving a baby a gun. But it doesn't mean you have to settle for Diffuse shader.
     
    Last edited: Jan 22, 2024
    frbrz likes this.
  2. kenlem

    kenlem

    Joined:
    Oct 16, 2008
    Posts:
    1,630
    Great set of shaders. Bought it on sight.

    What does Progressively adaptive performance mean?
     
  3. OmniShader

    OmniShader

    Joined:
    Feb 12, 2022
    Posts:
    45
    Thank you!
    It means the shader will compile into different variants depending on what features you enable.
    So, if you only use Diffuse and Rim Lighting, a minimal shader will be generated just for that to run on the GPU. If you were to add Normal Map, a little more code will be generated and another shader will be made for that variation. It detects what you use, and always creates the minimal GPU code necessary for optimal performance.
     
  4. zinnercircus

    zinnercircus

    Joined:
    Jul 13, 2013
    Posts:
    8
    This Shader makes even the editor faster! I'm loving it but developing for the Quest 2 and having issues when I run it. Seems like it's only running in one eye and having clipping issues, did I mess something up? I am STOKED to use this Shader almost exclusively if I can figure out what my silly issue is lol thanks in advance!
     
  5. OmniShader

    OmniShader

    Joined:
    Feb 12, 2022
    Posts:
    45
    Unfortunately I've never tested this shader on a VR device, although I've heard of one other person use it successfully in VR..

    There are some depth and culling settings at the bottom of the shader which control the visibility.
    I would start with those, like try set Culling to Off, Z Write to Off, Z Test to Always, and see if it makes a difference.
     
  6. kenlem

    kenlem

    Joined:
    Oct 16, 2008
    Posts:
    1,630
  7. OmniShader

    OmniShader

    Joined:
    Feb 12, 2022
    Posts:
    45
    Thanks for sharing that Ken.

    Shader doesn't support Single-Pass stereo rendering,
    so if you have problems in VR, one thing to try is keep it on Multi Pass.
     
  8. kenlem

    kenlem

    Joined:
    Oct 16, 2008
    Posts:
    1,630
    That's a pretty big ask.

    My current project is on multi pass at the moment because I use mirror shader that requires it. It's not ideal and I have plans to change that.

    Multipass is going to be a deal breaker for a lot of VR devs.
     
    mandisaw likes this.
  9. OmniShader

    OmniShader

    Joined:
    Feb 12, 2022
    Posts:
    45
    Yes, I just released a patch to support Single Pass Stereo Rendering. Thanks for the suggestion!
     
    Last edited: Mar 8, 2022
    mandisaw and lclemens like this.
  10. zinnercircus

    zinnercircus

    Joined:
    Jul 13, 2013
    Posts:
    8
    WOW! Awesome thank you so much! going to test it now! SUPER STOKED!!!!


    .. Works perfect THANK YOU AGAIN! :)
     
    Last edited: Mar 10, 2022
  11. sipon

    sipon

    Joined:
    Feb 8, 2009
    Posts:
    143
    Hi, could we have an option on the triplanar shader to use UV0 on the main texture? ( so make moss/snow/etc.... with triplanar top ?)
     
  12. sipon

    sipon

    Joined:
    Feb 8, 2009
    Posts:
    143
    After updating to lastest version I got this error :
    Shader error in 'OmniShade/Triplanar URP': invalid subscript 'viewReflectDir' at Assets/Shaders/OmniShade/Shaders/OmniShadeCore.cginc(911) (on d3d11)
     
  13. OmniShader

    OmniShader

    Joined:
    Feb 12, 2022
    Posts:
    45
    That's a great suggestion, I'll add support for using UV0 on the main tex in triplanar.
    Also, thanks for the error report, will be fixed in the next patch, out later this week.
     
    Last edited: Mar 15, 2022
  14. sipon

    sipon

    Joined:
    Feb 8, 2009
    Posts:
    143
    Hi, just updated and I now got 2 error on Standard URP :

    Shader error in 'OmniShade/Standard URP': 'reflect': no matching 2 parameter intrinsic function; Possible intrinsic functions are: reflect(floatM|halfM|min10floatM|min16floatM, floatM|halfM|min10floatM|min16floatM) at Assets/Shaders/OmniShade/Shaders/OmniShadeCore.cginc(810) (on d3d11)

    Shader error in 'OmniShade/Standard URP': undeclared identifier 'adjNor_world' at Assets/Shaders/OmniShade/Shaders/OmniShadeCore.cginc(810) (on d3d11)


    Unity 2020.3.29 - URP 10.8.1
     
  15. OmniShader

    OmniShader

    Joined:
    Feb 12, 2022
    Posts:
    45
    Thanks for the bug report, indeed you are correct!
    I will have it fixed early next week.

    In the meantime, you can workaround this by simply enabling the Diffuse, Rim Light, MatCap, or Specular feature, or remove the normal map and that should make the error go away.
     
  16. sipon

    sipon

    Joined:
    Feb 8, 2009
    Posts:
    143
    Great thanks!
     
  17. DragonCoder

    DragonCoder

    Joined:
    Jul 3, 2015
    Posts:
    1,789
    Really cool assets!
    Hope you are bringing more of the "mobile features" like triplanar mapping and vertex swaying for vegetation, to the PBR version too :)

    Another cool feature would be tessellation.. but I should stop dreaming now, haha.
     
    Last edited: Mar 26, 2022
  18. MK1_Dev

    MK1_Dev

    Joined:
    Sep 7, 2018
    Posts:
    104
    Unity 2021.3.0f1
    Android (for Oculus Quest 2)

    I have updated my project from 2020.3 (which works fine) but when building the project I get the following error message. I have reimported the asset but still get the same message.

    Shader error in 'OmniShade/Standard URP': undeclared identifier 'Luminance' at Assets/OmniShade/Shaders/OmniShadeCore.cginc(958) (on gles3)

    Compiling Subshader: 0, Pass: Pass 3, Vertex program with BASE_SATURATION STEREO_MULTIVIEW_ON _DETAILBLEND_MULTIPLY _DETAILUV_UV1 _HEIGHTCOLORSBLEND_ALPHA_BLEND _LAYER1BLEND_ALPHA_BLEND _LAYER2BLEND_ALPHA_BLEND _LAYER3BLEND_ALPHA_BLEND _MATCAPBLEND_MULTIPLY
    Platform defines: SHADER_API_GLES30 SHADER_API_MOBILE UNITY_ENABLE_REFLECTION_BUFFERS UNITY_FRAMEBUFFER_FETCH_AVAILABLE UNITY_LIGHTMAP_DLDR_ENCODING UNITY_NO_CUBEMAP_ARRAY UNITY_NO_DXT5nm UNITY_NO_FULL_STANDARD_SHADER UNITY_NO_RGBM UNITY_NO_SCREENSPACE_SHADOWS UNITY_PASS_META UNITY_PBS_USE_BRDF3
    Disabled keywords: BASE_CONTRAST CUTOUT DETAIL DETAIL_CONTRAST DETAIL_LIGHTING DETAIL_VERTEX_COLORS EMISSIVE_MAP HEIGHT_COLORS HEIGHT_COLORS_TEX INSTANCING_ON LAYER1 LAYER2 LAYER3 MATCAP MATCAP_CONTRAST TRANSPARENCY_MASK TRANSPARENCY_MASK_CONTRAST UNITY_ASTC_NORMALMAP_ENCODING UNITY_COLORSPACE_GAMMA UNITY_ENABLE_DETAIL_NORMALMAP UNITY_ENABLE_NATIVE_SHADOW_LOOKUPS UNITY_HALF_PRECISION_FRAGMENT_SHADER_REGISTERS UNITY_HARDWARE_TIER1 UNITY_HARDWARE_TIER2 UNITY_HARDWARE_TIER3 UNITY_LIGHTMAP_FULL_HDR UNITY_LIGHTMAP_RGBM_ENCODING UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_METAL_SHADOWS_USE_POINT_FILTERING UNITY_PBS_USE_BRDF1 UNITY_PBS_USE_BRDF2 UNITY_PRETRANSFORM_TO_DISPLAY_ORIENTATION UNITY_SPECCUBE_BLENDING UNITY_SPECCUBE_BOX_PROJECTION UNITY_UNIFIED_SHADER_PRECISION_MODEL UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_VIRTUAL_TEXTURING VERTEX_COLORS VERTEX_COLORS_CONTRAST _DETAILBLEND_ADDITIVE _DETAILBLEND_ALPHA_BLEND _DETAILBLEND_MULTIPLY_LIGHTEN _DETAILUV_UV2 _HEIGHTCOLORSBLEND_ADDITIVE _HEIGHTCOLORSBLEND_LIT _LAYER1BLEND_ADDITIVE _LAYER1BLEND_MULTIPLY _LAYER1BLEND_MULTIPLY_LIGHTEN _LAYER2BLEND_ADDITIVE _LAYER2BLEND_MULTIPLY _LAYER2BLEND_MULTIPLY_LIGHTEN _LAYER3BLEND_ADDITIVE _LAYER3BLEND_MULTIPLY _LAYER3BLEND_MULTIPLY_LIGHTEN _MATCAPBLEND_MULTIPLY_LIGHTEN
     
  19. OmniShader

    OmniShader

    Joined:
    Feb 12, 2022
    Posts:
    45
    mthawley, thanks for the report. I think I found the problem and am submitting a patch for it.

    If you rather not wati for the patch, you can fix it by simply deleting line 348 in OmniShade URP.shader
    Code (CSharp):
    1.             #pragma shader_feature BASE_SATURATION
     
  20. MK1_Dev

    MK1_Dev

    Joined:
    Sep 7, 2018
    Posts:
    104
    Excellent thanks!
     
  21. nastydiaper

    nastydiaper

    Joined:
    May 25, 2017
    Posts:
    491
    I have a MASSIVE scene I'm working with for a Windows/MacOS release and have done everything I can to optimize; texture atlasing, different types of batching, etc. all using the Standard Shader. I was going to move over and give the Standard Unlit or Mobile shaders a try but I was just wondering if OmniShade might give better results on a Desktop platform.
     
  22. OmniShader

    OmniShader

    Joined:
    Feb 12, 2022
    Posts:
    45
    jnbbender, yes absolutely OmniShade is much faster than Standard shader on PC, and has a lot more features than the Mobile shaders. It would definitely be worth a try if you need the performance. The main thing it lacks compared to Standard shader is PBR (physically based rendering), so your results would not look as realistic since you’d need to tune the diffuse/specular/reflection amounts manually. But if performance is prioritized over photorealism, then OmniShade would definitely offer more.
     
  23. Bwacky

    Bwacky

    Joined:
    Nov 2, 2016
    Posts:
    218
    Hey, small question again - does Omnishade support instanced indirect crossfade?
    It needs the LODDitheringTransition method to work with things like GPUInstancer, so I'm wondering before I bite the bullet and grab the shader.
     
  24. OmniShader

    OmniShader

    Joined:
    Feb 12, 2022
    Posts:
    45
    bwacky, I took a look into the GPUInstancer package, and it seems to require some modifications for custom shaders to work:
    https://wiki.gurbu.com/index.php?title=GPU_Instancer:FAQ#Vertex.2Ffragment_Shaders

    So, to answer your question, no it is not supported out of the box, although if you follow the above directions, it would not seem too difficult to setup (although I can only guess without having tried it myself).
     
  25. look001

    look001

    Joined:
    Mar 23, 2017
    Posts:
    111
    Hey there, is there any chance to get spotlights working with these shaders? Do you plan to add support for it any time soon? Besides that the shaders look very nice!
     
  26. OmniShader

    OmniShader

    Joined:
    Feb 12, 2022
    Posts:
    45
    Hi look001,

    Unfortunately OmniShade does not support spot lights due to performance reasons.

    As an alternative, I would recommend using OmniShade PBR on those materials that need spotlight support.
    If all you need is a very simple spotlight and you are on Built-In pipeline, you may also try Unity Projectors.
     
  27. MK1_Dev

    MK1_Dev

    Joined:
    Sep 7, 2018
    Posts:
    104
    Hi. Is there a way to activate/de-activate Enable Outline via script?
     
  28. sichimi1021

    sichimi1021

    Joined:
    Jan 31, 2021
    Posts:
    6
    Does it support Deferred rendering?
     
  29. OmniShader

    OmniShader

    Joined:
    Feb 12, 2022
    Posts:
    45
  30. sichimi1021

    sichimi1021

    Joined:
    Jan 31, 2021
    Posts:
    6
    Thanks.
    I will consider PBR.
    .
     
  31. Clariesu

    Clariesu

    Joined:
    Apr 2, 2021
    Posts:
    24
    Is this a character shader? I can't get the same result after unity bake GI.
     
    d1favero likes this.
  32. onemeta

    onemeta

    Joined:
    May 26, 2022
    Posts:
    5
      • I have a problem, the material ball encountered the following error
     

    Attached Files:

  33. onemeta

    onemeta

    Joined:
    May 26, 2022
    Posts:
    5
    • I have a problem the material ball encountered the following error
     
  34. OmniShader

    OmniShader

    Joined:
    Feb 12, 2022
    Posts:
    45
    Thanks for the tip, will have those warnings fixed. They are harmless to the actual operation of the shader.
     
  35. OmniShader

    OmniShader

    Joined:
    Feb 12, 2022
    Posts:
    45
    Hello,

    To change the layer texture via script, you can call
    Material.SetTexture("_Layer1Tex", newTexure)


    Also, as the shader variant for Layers are detected at build time, you'll also want to ensure there is a texture slotted in there (even if just a white dummy texture) if you are setting the texture at runtime to ensure the proper variant is built.

    Thank you!
     
  36. Jimaniki

    Jimaniki

    Joined:
    Nov 9, 2017
    Posts:
    20
    Hello,
    I'm making a mobile game that uses assets from the Asset Store, so I'm using URP, and SimpleLit Shaders that I'd like to tune/optimize.
    1. I would like to know if OmniShade allows this?
    2. Or does OmniShade just create Shaders?
    if so then will they be compatible with my assets? optimally, i.e. possibly maximum fps
    e which use
     
  37. OmniShader

    OmniShader

    Joined:
    Feb 12, 2022
    Posts:
    45
    Hi, OmniShade is a shader (compatible with Built-In and URP), and so is used by replacing your current shader.
    It has every feature that Simple Lit shader has, and a lot more. Performance should be on par or faster than SimpleLit, as OmniShade is maximally stripped at build time depending on the features you actually use.

    The main advantage in your use-case would likely be possibly improved FPS, and a lot more graphical features which you can enable as you see fit.
     
    lclemens and Jimaniki like this.
  38. trungdangleminh

    trungdangleminh

    Joined:
    Apr 12, 2022
    Posts:
    1
    Hi, i bought this shader, it's great but i need some help.

    In this shader, it use the same texture with URP,
    But in my project, they use the combine channel Texture, such as "ORME" (AO, Roughness, Metallic, Emmisive). So can you help me how to edit the shader node and then i can choose the correct channel to use (Red,Green,Alpha,...) ?

    Please help me with it, thank you.
     
  39. robrjames

    robrjames

    Joined:
    Dec 22, 2009
    Posts:
    4
    Can you use Triplanar with 3 masked layers?
     
  40. OmniShader

    OmniShader

    Joined:
    Feb 12, 2022
    Posts:
    45
    Yes. Triplanar supports almost all same features (including 3 layere) except some of those that require UVs
     
  41. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,568
    in forward+ on URP 14 unity 2022.3 I get flickering in the shader, any idea how to fix?
     
  42. erikchai1111

    erikchai1111

    Joined:
    Jan 17, 2022
    Posts:
    3
    When enable the reflection option, it does not use the default scene sky box ,just completely black until manually assign a cubemap. And can the reflection reflect from reflection probe?
     
  43. lclemens

    lclemens

    Joined:
    Feb 15, 2020
    Posts:
    785
    Did you get this fixed? I am considering purchasing Omnishade but I will be using forward+ and 2022.3 (DOTS).
     
  44. OmniShader

    OmniShader

    Joined:
    Feb 12, 2022
    Posts:
    45
    Hi, I responded to original poster in the Discord, but no unfortunately Forward+ does not appear to be working with custom shaders at this time. This has been reported to Unity. Their statement is that Forward+ does not support a stable interface yet and changes from time to time, so it appears to still be in developmental stage.
    https://issuetracker.unity3d.com/is...nged-from-forward-or-deferred-to-forward-plus
     
    lclemens likes this.
  45. Pixelith

    Pixelith

    Joined:
    Jun 24, 2014
    Posts:
    588
    Is OmniShade compatible with Terrain?

    Sorry if this has been answered, currently at work and on mobile. Can't do a very in depth look but I'm really thinking about getting this while on sale.
     
  46. OmniShader

    OmniShader

    Joined:
    Feb 12, 2022
    Posts:
    45
    Hi, unfortunately no, OmniShade only supports regular meshes/sprites.
     
  47. LTHendrix

    LTHendrix

    Joined:
    Jul 29, 2013
    Posts:
    20
    The triplanar URP just suddenly stopped working for me. Every time I switch the shader to it, it show the error pink.

    Is there a way to fix it without uninstalling and reinstalling it?
     
    ina likes this.
  48. OmniShader

    OmniShader

    Joined:
    Feb 12, 2022
    Posts:
    45
    Hi, which Unity version are you on? Try re-importing the shader, and check if there are any errors output on the console. Thank you.
     
  49. Esfekia

    Esfekia

    Joined:
    Mar 28, 2022
    Posts:
    15
    Hello, will this shader work with Vulkan on a Meta Quest 2 device, or strictly OpenGL only?
     
  50. OmniShader

    OmniShader

    Joined:
    Feb 12, 2022
    Posts:
    45
    Yes, it should. I do not have a Quest 2 myself, but know others who have used it on a Quest 2. It also works the same on Vulkan.
     
    Esfekia likes this.