Search Unity

  1. Improved Prefab workflow (includes Nested Prefabs!), 2D isometric Tilemap and more! Get the 2018.3 Beta now.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. Let us know a bit about your interests, and if you'd like to become more directly involved. Take our survey!
    Dismiss Notice
  4. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice
  5. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

[RELEASED] ShaderOne - One Shader to Rule them ALL

Discussion in 'Assets and Asset Store' started by echologin, Sep 8, 2018.

  1. VermilionGames

    VermilionGames

    Joined:
    Jun 12, 2015
    Posts:
    5
    Thanks, but my question was more in depth, are you using Unity's standard Disney diffuse, GGX and BDRF, or have you implemented the shading models yourself? I am asking because there is another shader package on the asset store, which claims to look better than Unity's standard shader, yet it is using Blinn-Phong, which is a total joke (but of course this way, it is way faster than the standard shader)

    How additional lights information are passed to the shader?
     
    echologin likes this.
  2. echologin

    echologin

    Joined:
    Apr 11, 2010
    Posts:
    885
    Its kinda hard to explain there is no one set way
    You have 4 quality settings for specular and 3 for Fresnel

    Specular Modes = Off, Fastest, Fast, Normal and HQ
    Fresnel Modes = Off, Fast, Normal and HQ

    Some use GGX and some settings use Disney its a mix of a lot of methods I read about

    Specular on Fastest and Fresnel on Fast would use the unity specular texture

    Specular on Fast and Fresnel on normal would basically be Blinn-Phong

    Specular on Normal and Fresnel on Normal would look like the Standard Shader

    Specular and Fresnel on HQ would look like UE4 which i think is the GGX method

    and there is also a Fresnel power slider on each material so you can tone it down
    ( I found somethings look odd with fresnel on full power )


    If you choose the ShaderOne lighting it can have up to 4 Dir lights, 16 point lights and 16 spotlights in one
    shader pass which is all calculated and sent to shader from my ShaderManager
    ( u can still choose to use unity forward lighting but that is slower )
     
    twobob likes this.
  3. VermilionGames

    VermilionGames

    Joined:
    Jun 12, 2015
    Posts:
    5
    Thanks. I am not sure if you know, but Unity's standard shader, the one on the built-in rendering pipeline uses actually 3 different shading models, depending on the target device, it is a quite similar work to what you are trying too achieve (makes me wonder how your shader is faster).

    1. The HQ version uses Disney Diffuse, GGX and Schlick Fresnel
    2. The mid-range uses Simplified Cook Torrance and 1/LdotH Fresnel
    3. The LQ uses Blinn-Phong with a BRDF LUT and no Fresnel

    That's why it would be great if you could prepare a demo, with 2 settings at least - Unity's standard and your shader, with a FPS counter. Especially for mobiles.

    It is going to be a frag/vert shader or surface?

    So thru shader global variables, right? No lights LUT voodoo?
     
    echologin likes this.
  4. echologin

    echologin

    Joined:
    Apr 11, 2010
    Posts:
    885
    * yeah I been through all the standard shader code over the years

    * I will make a comparison video like that eventually.. its fast now but there are still a lot of optimizations I can do

    * it is a vert/frag shader

    *And yes thru shader variables and I don't use a LUT for lighting attenuation ( so that's one less texture read per light )
    Unless you are using forward rendering it uses the unity attenuation macros
     
  5. echologin

    echologin

    Joined:
    Apr 11, 2010
    Posts:
    885
    Had to Re-Submit to asset store Unity found a few little issues I had to fix

    But now it has all the bug fixes i found in last month and has Curved World Support
     
    EvilGremlin, DrOcto and Mark_01 like this.
  6. echologin

    echologin

    Joined:
    Apr 11, 2010
    Posts:
    885
    Unity accepted it finally .. will release it as soon as I get into work
     
  7. echologin

    echologin

    Joined:
    Apr 11, 2010
    Posts:
    885
    Released !!!

    Remember its a BETA any issue message me

    ShaderOne
     
  8. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    4,400
    This is so strange ... I have been clicking to refresh the asset store often, several times a day, looking for this ... and what I'm finding this morning is that it simply isn't listed in the old asset store, which is what I use.

    It IS showing up in the new asset store though. Maybe there's just a little time delay, or something.

    Anyway ... congrats to echologin on the birth of his new "baby!" :)
     
    Last edited: Oct 5, 2018
  9. echologin

    echologin

    Joined:
    Apr 11, 2010
    Posts:
    885

    Thanks !! Yeah i just published it like 30 min ago .. took it a while to show up on asset store

    probably be on old one soon
     
  10. Mark_01

    Mark_01

    Joined:
    Mar 31, 2016
    Posts:
    331
    Last edited: Oct 5, 2018
    twobob, chelnok and hopeful like this.
  11. echologin

    echologin

    Joined:
    Apr 11, 2010
    Posts:
    885
    Thanks ... cool let the sales come in ! :)
     
    Last edited: Oct 5, 2018
    Mark_01 likes this.
  12. Mark_01

    Mark_01

    Joined:
    Mar 31, 2016
    Posts:
    331
    I'll be getting this in a few days as soon as i can clear it by the wife.. :p
    But i had said I was going to get this when you posted the first thread.
    I like the SRP stuff, but it looks like a lot of coding again so, with your road map,
    I would far rather just have one system like this. :)

    I am very sure you will end up doing very well with ShaderOne ...
     
    Last edited: Oct 5, 2018
    echologin likes this.
  13. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    23,328
    Congrats on release, seems like a seriously fast shader for mobile and VR for builtin, something that has been lacking for a while now for a lot of people.
     
  14. echologin

    echologin

    Joined:
    Apr 11, 2010
    Posts:
    885
    Thanks ... im gonna start on my own srp soon . been dying to do this for ages
     
  15. echologin

    echologin

    Joined:
    Apr 11, 2010
    Posts:
    885
    Thanks !
     
  16. zKici

    zKici

    Joined:
    Feb 12, 2014
    Posts:
    185
    It has already made a drastic difference in my game,

    Enjoying it already. Well done
     
    echologin and hopeful like this.
  17. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    4,400
    If you can, show some before and after pics. :)
     
    hippocoder and echologin like this.
  18. echologin

    echologin

    Joined:
    Apr 11, 2010
    Posts:
    885
    Here is a quick Comparison ...

    only thing i changed is the shader .. lighting is same for both

    Unity fog for Standard and my volumetric 3d fog for ShaderOne


     
    Last edited: Oct 5, 2018
  19. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    23,328
    One of the biggest limitations on VR and mobile is that post effects become really expensive so having texture noise based 3D volume fog built in that is not a post effect, but at the shader level is clever and interesting.

    If I'm not mistaken you include the capability for people to define their own 3D noise?
     
  20. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    4,400
    Why the color difference? The central bot is gray in the top one and red in the bottom. Is there a color post effect being applied in the second?
     
  21. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    23,328
    One of them has volumetric fog, don't know how much difference that makes.
     
  22. echologin

    echologin

    Joined:
    Apr 11, 2010
    Posts:
    885
    There is a 3D Fog texture designer in this
    But to use it you need to purchase this asset called FAST NOISE ( only 4 dollars )

    FastNoise on AssetStore
     
    hopeful likes this.
  23. echologin

    echologin

    Joined:
    Apr 11, 2010
    Posts:
    885

    All the lights are the same for both . didnt touch anything other then pick standard shader

    I would just guess Standard is doing lighting way different ( never liked how standard shader looked )
     
  24. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    4,400
    Possibly Unity fog affects light color?
     
  25. echologin

    echologin

    Joined:
    Apr 11, 2010
    Posts:
    885
    its not Fog .... just seems standard shader is not picking up much from a white point light in scene

    Standard shader looks like plastic too... see the odd speculars on things

     
    hopeful and hippocoder like this.
  26. echologin

    echologin

    Joined:
    Apr 11, 2010
    Posts:
    885
    My lighting is better faster and stronger just like Steve Austin the Bionic man
     
    EvilGremlin likes this.
  27. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    4,400
    Bionic sound FX:
     
    EvilGremlin and echologin like this.
  28. echologin

    echologin

    Joined:
    Apr 11, 2010
    Posts:
    885
    Uploading an update tonight to fix a few bugs

    *FIXED* Crash when building app fixed
    *FIXED* Crash when main camera is not tagged as "MainCamera"
    *FIXED* Better support for particles
    *FIXED* Vertex colors where not always working in unlit mode

    if anyone had any other bugs/issues post them here or message me
     
    hippocoder and EvilGremlin like this.
  29. EvilGremlin

    EvilGremlin

    Joined:
    Aug 12, 2016
    Posts:
    188
    I wondered what was up with the vertex colors. Glad it wasn't me.
     
    echologin likes this.
  30. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    23,328
    At least he fixes bugs faster than Unity does.
     
  31. EvilGremlin

    EvilGremlin

    Joined:
    Aug 12, 2016
    Posts:
    188
    Yeah no worries. It's in beta. I get it. I'm just glad it wasn't just me doing something wrong, like it usually is.
     
    hopeful and echologin like this.
  32. echologin

    echologin

    Joined:
    Apr 11, 2010
    Posts:
    885
    I wonder which is better

    1) having a default settings shader in package you buy.. then it works w/o having to run generator out of the box

    2) Leaving the generated files out so current users do not have to regenerate shader after each update from store. But a new user could have to run generator once to make it work


    Right now you should save your generator settings to be safe.. and run the shaderOne Generator right away when you install a new version.

    Submitting update in a bit
     
  33. echologin

    echologin

    Joined:
    Apr 11, 2010
    Posts:
    885
    update with fixes submitted
     
  34. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    23,328
    Anyone tested the 3D fog in VR yet?
     
  35. echologin

    echologin

    Joined:
    Apr 11, 2010
    Posts:
    885
    Update with bug fixes is LIVE

    When updating … make sure you save SETTINGS from generator just in case

    Then import update and run ShaderOneGenerator right away

    I haven't myself but people have told me It looks good like u can touch it
     
    Last edited: Oct 9, 2018
    hippocoder likes this.
  36. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    23,328
    Real 3D fog in VR is quite difficult to pull off, and you're basically saying this is possible for something like mobile VR as the shader supports mobile, right?
     
  37. echologin

    echologin

    Joined:
    Apr 11, 2010
    Posts:
    885

    3D Volumetric fog will run on modern mobile devices and you can lower the ray cast count to make it faster
     
    Last edited: Oct 10, 2018
  38. atomicjoe

    atomicjoe

    Joined:
    Apr 10, 2013
    Posts:
    138
    Ok, this is really interesting.
    I was searching for a shader system to render several lights in a single pass.
    However, I'm currently using custom shaders with multiple render targets, stencil operations, some custom depth clipping and fancy stuff with vertex colors.
    You said the generated shaders are not surface shaders but vert/frag. This makes further modification of the generated shaders a nightmare to implement custom stuff.

    The simplest and most flexible solution would be to make your lighting pipeline available for custom surface shaders, either through macros or shader includes (cginc)
    Maybe you could implement a custom lighting model that could be easily assigned to a custom surface shader?

    Also, this would make 3rd party shaders way easier to integrate with ShaderOne.
    I know it would not have all the extra features, but it's perfect and I would gladly pay just for that.

    This is only a suggestion and I'm well aware it's a complicated matter. :p
     
    Last edited: Oct 10, 2018
  39. echologin

    echologin

    Joined:
    Apr 11, 2010
    Posts:
    885
    Adding custom code is on my to do list

    Just want to find out how people use it and finalize the workflow 1st

    Even with the DLL u can modify the shader... and look at the ShaderOneGen.shader to see all the uniforms I use

    For now you could just insert an include "yourcode.cginc" in the ShaderOneFrag.cginc and ShaderOneVert.cginc where needed then u dont have to rewrite my shader for each update
     
  40. atomicjoe

    atomicjoe

    Joined:
    Apr 10, 2013
    Posts:
    138
    So a custom lighting model for surface shaders is not going to happen?
     
  41. echologin

    echologin

    Joined:
    Apr 11, 2010
    Posts:
    885

    not for surface shaders, those build vert/frag shaders from simpler code
    there is no easy way to support that ...

    but if you have custom code for surface shaders it would not be hard to
    convert to have it work with mine
     
  42. lightwaterjohn

    lightwaterjohn

    Joined:
    Nov 29, 2017
    Posts:
    9
    Can I suggest you link this forum post under the Support link and at the bottom of the description on the asset store. I think this helps potential buyers assess the support level (which seems great BTW!).
     
    echologin and atomicjoe like this.
  43. atomicjoe

    atomicjoe

    Joined:
    Apr 10, 2013
    Posts:
    138
    Ok, I understand.
     
  44. echologin

    echologin

    Joined:
    Apr 11, 2010
    Posts:
    885
    Yeah and i have an echologin email just locked out atm

    can also goto the discord channel in my main post

    or add "echoLogin" on Skype

    or email echoLogin AT hotmail.com
     
    Last edited: Oct 12, 2018
    lightwaterjohn likes this.
  45. echologin

    echologin

    Joined:
    Apr 11, 2010
    Posts:
    885
    submitting another small update tonight

    *fixed error when building shader with all settings on LOW/FASTEST settings
    *fixed another vertex color bug
     
    EvilGremlin and hopeful like this.
  46. echologin

    echologin

    Joined:
    Apr 11, 2010
    Posts:
    885
    Just submitted v0.17
    *Fixed: slowdown in MaterialEditor GUI
    *Fixed: Error when building shader with certain settings
    *Fixed: Vertex color and vertex lighting bug
    *Fixed: Instancing bug for unity 2017 and 2018
    *Change: Light Probes are on by default now
     
    Last edited: Oct 13, 2018
  47. grimmgames

    grimmgames

    Joined:
    Jan 11, 2011
    Posts:
    44
    Has the new version been approved? Still no update button for me...
     
  48. echologin

    echologin

    Joined:
    Apr 11, 2010
    Posts:
    885

    Was not approved yet ( last time it went thru in less than 12 hours )
    Guess it will be monday

    if anyone needs latest, PM me your invoice # and i can send link
     
  49. echologin

    echologin

    Joined:
    Apr 11, 2010
    Posts:
    885
    v 0.17 is live on store


    *Fixed: slowdown in MaterialEditor GUI
    *Fixed: Error when building shader with certain settings
    *Fixed: Vertex color and vertex lighting bug
    *Fixed: Instancing bug for unity 2017 and 2018
    *Change: Light Probes are on by default now
     
    twobob and Mark_01 like this.
  50. echologin

    echologin

    Joined:
    Apr 11, 2010
    Posts:
    885
    v0.19 is out
    *fixed: Crash if you pressed cancel when saving settings
    *fixed: Generate would not re-import shader if ShaderOne folder was moved
    *fixed: Somethings would not update on material when Generating shader
    *added: UV World Mapping ( kind of like tri-planar mapping but fast )
    *added: Display version # in Generator

    Found a few bugs in FORWARD Pipeline .. fixing that right now

    So it best to use SHADERONE lighting for now and it looks better and its faster
     
    Last edited: Oct 18, 2018 at 6:22 PM
    twobob likes this.