Search Unity

Shader Forge - A visual, node-based shader editor

Discussion in 'Assets and Asset Store' started by Acegikmo, Jan 11, 2014.

  1. bourriquet

    bourriquet

    Joined:
    Jul 17, 2012
    Posts:
    181
    2018-04-17_1347.png
    Isn't there a bug here? Shouldn't the output of the If be a simple "Value" (float), like the A>B, A=B and A<B inputs, rather than a Vector3 like the A and B inputs?
     
  2. recon0303

    recon0303

    Joined:
    Apr 20, 2014
    Posts:
    1,634
    Hi I have not used Shader Forge in a long time, and back then you where not able to have instanced rendering Mode. Does Shader Forge have this now??? Thanks
     
  3. Acegikmo

    Acegikmo

    Joined:
    Jun 23, 2011
    Posts:
    1,294
    Hey!
    Apologies for not keeping up with this thread for, well, the last few years. I moved my support further and further back to the feedback page/support tickets and emails due to the sheer amount of requests.

    Like Mauri mentioned above - I'm dropping support for SF because I don't have the time to work on it anymore, and now that there are proper alternatives like Amplify Shader Editor, or Unity's Shader Graph, I'm ready to pass the torch!

    Thank you all so much for the feedback and support throughout this journey! It has been an honor to see all the awesome work and creativity you all put into your craft. It's humbling to think that I've been part of providing the tools you all used.

    If you're interested, you can grab the Shader Forge source code on GitHub!
     
  4. recon0303

    recon0303

    Joined:
    Apr 20, 2014
    Posts:
    1,634

    figures I bought this week one of it coming out...and now I go to use again and its gone haha. I own Amplify as well, so I will just keep using it, I will just update my old shaders to Amplify, thanks again for the awesome tool.
     
  5. yasirkula

    yasirkula

    Joined:
    Aug 1, 2011
    Posts:
    2,879
    Free? Wow, that was unexpected but not unwelcome. Thank you.
     
  6. HaddicusGames

    HaddicusGames

    Joined:
    May 28, 2014
    Posts:
    28
    @Acegikmo The readme still has required licensing verbiage contained within. Is this going to be updated?

    upload_2018-5-1_9-15-40.png
     
  7. Acegikmo

    Acegikmo

    Joined:
    Jun 23, 2011
    Posts:
    1,294
    Just updated it! Thanks for the heads-up
     
  8. RumataM

    RumataM

    Joined:
    Nov 6, 2016
    Posts:
    15
    Hello,
    I'm a complete beginner with the Sader Forge, I'm trying to create a very basic shader, but I have some strange problems with the nodes in the default shader setup:

    1. Texture2D and Color nodes which was created by default with the new shader controlls shader image and color even when disconnected. Newly created nodes doesn't change anything even though they are connected to the Base Color input.

    2. The Normal Map node doesn't affect anything after I choose the normal map image. When I click "Normal map" the image in the node becomes red.

    3. Sliders doesn't change shader look.



    I would be very grateful for help.
    Thank you very much in advance!
     
    konsic likes this.
  9. Wawruch2

    Wawruch2

    Joined:
    Oct 6, 2016
    Posts:
    68
    Hello everyone,
    so Unity 2018.1 is out and my whole project is pretty much based on shaders made in shader forge. I was able to repair shaders since 5.5.3 to 2017.4 to make them work properly. Unfortunetely there's a weird error in 2018.1 which makes pretty much no sense: "unexpected token ';' at line" after LIGHT_ATTENUATION. Did anyone solve that?

    Code (CSharp):
    1.                float attenuation = LIGHT_ATTENUATION(i);
    2.                float3 attenColor = attenuation * _LightColor0.xyz;
    3.                float Pi = 3.141592654;
    4.                float InvPi = 0.31830988618;
     
  10. MaxWitsch

    MaxWitsch

    Joined:
    Jul 6, 2015
    Posts:
    114
    Wawruch2 likes this.
  11. Baldinoboy

    Baldinoboy

    Joined:
    Apr 14, 2012
    Posts:
    1,526
    Hey Ace, Just no update for 2018.1 though? All my Shader Forge shaders are broken in 2018 and can not get SF to initiate to re-process them. Can not play with the source code.

    Usually when source code goes free no one publicly updates it so everything done with the system that I paid for is dead. If anyone does update it please let me know as I could really use it to just update my current shaders.
     
  12. ceebeee

    ceebeee

    Joined:
    Mar 7, 2017
    Posts:
    395
    sonnyb, Marked, henriqueranj and 4 others like this.
  13. Baldinoboy

    Baldinoboy

    Joined:
    Apr 14, 2012
    Posts:
    1,526
    Thank you so much! Thank you very much to the user who updated it also!
     
  14. MP-ul

    MP-ul

    Joined:
    Jan 25, 2014
    Posts:
    230
  15. Kolyasisan

    Kolyasisan

    Joined:
    Feb 2, 2015
    Posts:
    397
    I dunno, the PBS in Shader Forge is weird... Seems like a bug, but something tells me that it's me who can't get it to work properly. Basically, it doesn't receive any kind of ambient light in deferred rendering. I know about the Ambient Light node, but it doesn't seem to be the correct way to do it because:
    A. It works flawlessly in Forward rendering
    B. Ambient Light node doesn't return the proper ambient light (e.g. doesn't take the intensity and light probe sampling into account
    Realtime GI properly maps the ambient lighting onto the material if the object is static though.

    Soo... anyone had this?
     
  16. Wawruch2

    Wawruch2

    Joined:
    Oct 6, 2016
    Posts:
    68
    I managed to deal with it. So, make sure to add a line manually:
    Code (CSharp):
    1. indirectDiffuse += ShadeSH9(half4(normalDirection, 1.0));
    After declaration of indirect diffuse:
    Code (CSharp):
    1. /////// Diffuse:
    2.                 float3 indirectDiffuse = float3(0,0,0);
    It solves the ambient light issue with deferred shaders.

    And download this version: https://github.com/jackisgames/ShaderForge
    It repairs the UNITY_LIGHT_ATTENUATION problem, you can do it manually also if you feel confident with shaders: http://catlikecoding.com/unity/tutorials/rendering/part-17/
     
    Kolyasisan likes this.
  17. bugaj

    bugaj

    Joined:
    Jun 28, 2015
    Posts:
    58
    Im trying to edit sprite shader. When I open material inspector in Editor i have no slot for MainTex, thought it is clearly visible in shader forge editor, instead i have
    • stencil id
    • stencil read mask
    • stencil write mask
    • etc
    Sprite is still visible cause it was plug in in previous shader, so i know it works

    what could i do to see texture slots in inspector?
     
    NeatWolf likes this.
  18. MP-ul

    MP-ul

    Joined:
    Jan 25, 2014
    Posts:
    230
    did you save the shader or connect the node? to the main node?
     
  19. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,148
    Hi guys,

    i am having a weird issue with the water flow shader from the Shader Forge Wiki .

    http://acegikmo.com/shaderforge/wiki/index.php?title=Flowmap

    I am having it work correctly but only when Gamma space is selected !
    As soon as i switch to Linear space, it starts to move the whole image in some direction on top of the flow direction ! It's like the two motions are mixed !
    When a Gamma space is selected, the parts that should look static are not moving which is correct!

    Any ideas why this might be happening !?

    EDIT : the fix is pretty simple actually ! The flow map should be set to use linear color space in import settings !
     
    Last edited: May 17, 2018
    NeatWolf and hopeful like this.
  20. Fenix69

    Fenix69

    Joined:
    Mar 9, 2017
    Posts:
    2
    So, i tried the fix for the 2018 Version, and it works. However, as soon as i close the Shader Forge Tab it gives me some complie errors and i got this: upload_2018-5-20_18-26-26.png

    The Examples shaders are fine though. Does anyone know how to fix this ?
     
  21. Fenix69

    Fenix69

    Joined:
    Mar 9, 2017
    Posts:
    2
    Because of that i can't have access to my shader within Shader Forge. I can't even go to Windows and start Shader Forge. I have to get one of the Shader Examples to be able to reopen SF again.
     
  22. MP-ul

    MP-ul

    Joined:
    Jan 25, 2014
    Posts:
    230
    It means you did not do it right ;) for me works! do it again and be more carefull. For me it worked from the first try.
     
  23. Rich_A

    Rich_A

    Joined:
    Nov 22, 2016
    Posts:
    338
    Shader Forge removed from the store?

    I can understand it was going free and unsupported - but deprecated entirely?

    There are a lot of environmental packs out there which relied on Shader Forge. Now they are broken if users cannot access that asset :-/
     
  24. MP-ul

    MP-ul

    Joined:
    Jan 25, 2014
    Posts:
    230
    Go on Github and look for it!
     
    NeatWolf and ceebeee like this.
  25. Cascho01

    Cascho01

    Joined:
    Mar 19, 2010
    Posts:
    1,347
    Thanks Acegikmo for developing such a great tool (I used for years in almost every project) !!!
    Hope you´re now working on something even cooler? ;)
     
    Last edited: Jun 15, 2018
  26. duale_

    duale_

    Joined:
    Jan 15, 2018
    Posts:
    1
    I downloaded it from Github, how do I install Shader Forge from the source files I got from Github? I'm on Windows 10 and Unity 2017.3.1f1. Thank you.
     
  27. konsic

    konsic

    Joined:
    Oct 19, 2015
    Posts:
    995
    Go to you game directory and copy files from rar file into the directory. Then open that project in Unity.
     
  28. Kagyu

    Kagyu

    Joined:
    Mar 5, 2016
    Posts:
    96
    Hi all,
    It seems the real-time rendering is not working in my environment. Some of nodes filled with white and I cannot see any shading.
    I checked "Real-tme node rendering" checkbox on in the setting tab. What else do I need to make that work?
     

    Attached Files:

    Last edited: Jul 6, 2018
  29. MP-ul

    MP-ul

    Joined:
    Jan 25, 2014
    Posts:
    230
    disable the skybox :p
     
  30. MP-ul

    MP-ul

    Joined:
    Jan 25, 2014
    Posts:
    230
    Any idea how I can make that bit of code in ShaderForge?
     

    Attached Files:

  31. Kagyu

    Kagyu

    Joined:
    Mar 5, 2016
    Posts:
    96
    Wow! This is what I have been wanted so much! I kinda gave up and accepted it as my environment specific issue.
    Thank you so much, Fenixake!
     
  32. konsic

    konsic

    Joined:
    Oct 19, 2015
    Posts:
    995
    Why does it need to disable the skybox ?
     
  33. MP-ul

    MP-ul

    Joined:
    Jan 25, 2014
    Posts:
    230
    is a bug idk why but is a bug
     
  34. konsic

    konsic

    Joined:
    Oct 19, 2015
    Posts:
    995
    In which Unity version and how to fix this ?
     
  35. Kagyu

    Kagyu

    Joined:
    Mar 5, 2016
    Posts:
    96
    Does this setup still work in Unity 2018 and SF for 2018?
    I like to access to skybox LOD, so I mimicked the nodes and code but no luck. I just got a purple sphere...

    Code (CSharp):
    1. //Glossiness
    2. half mip = (1.0 - Glossiness) * UNITY_SPECCUBE_LOD_STEPS;
    3. // sample the default reflection cubemap, using the reflection vector
    4. half4 skyData = UNITY_SAMPLE_TEXCUBE_LOD(unity_SpecCube0,Dir,mip);
    5. // decode cubemap data into actual color
    6. half3 skyColor = DecodeHDR (skyData, unity_SpecCube0_HDR);
    7. return skyColor;
     
  36. MP-ul

    MP-ul

    Joined:
    Jan 25, 2014
    Posts:
    230
    in 2018 the code node is fcked up and it took me 10 hours to figure it out, only after i changed to 2017 and the non2018 sf version it worked


    EDIT: it seems that some codes work some not!. idk why but this works https://shaderforge.userecho.com/co...on-probes-and-their-box-projection-parameters
     
    Last edited: Jul 8, 2018
  37. Kagyu

    Kagyu

    Joined:
    Mar 5, 2016
    Posts:
    96
    Ah, I see. Then I should be careful about the SF version.
    Thank you for the useful link. Now I got it working on my unity 2018.

    By the way, I access skyData to add IBL & environment lighting effect to my custom light toon shader.
    I am not sure if my approach is appropriate. Since this is my first shader making, I cannot think of any other approach.

    If anyone have any suggestion for me to try to make a custom light toon shader which reacts skybox image light, I really like to hear some.

    [Edit]
    Though it needs a bit more of blending adjustment, by accessing ShadeSH9 method I have managed to apply the environment lighting to my custom light shader. Valuable information I learned here(Japanese).

    Now I am curious how different approaches hit the performance.
    Is there any way to know shaders' drawing cost?
     

    Attached Files:

    Last edited: Jul 9, 2018
    MP-ul likes this.
  38. Cactus_on_Fire

    Cactus_on_Fire

    Joined:
    Aug 12, 2014
    Posts:
    675
    Does anyone know an alternative for light direction and light attenuation nodes to work in deferred shader mode?
    When I switch from forward to deferred they get locked and I can't use them.
     
    konsic likes this.
  39. MP-ul

    MP-ul

    Joined:
    Jan 25, 2014
    Posts:
    230
    for some reason they are not there idk why!
     
  40. Cactus_on_Fire

    Cactus_on_Fire

    Joined:
    Aug 12, 2014
    Posts:
    675
    I'm sure there's a way to feed that information to the shader through code but it's ridiculous that deferred mode simply disables that very useful info.
     
  41. MonkeyYao

    MonkeyYao

    Joined:
    Jul 3, 2012
    Posts:
    22
    Can anyone help me?I created such a shader effect that converts a map into a pole map. But I hope that other countries are at the extreme.
    mapSmall.png
    sf_newshaderbackup_822018.png
     

    Attached Files:

    Last edited: Aug 7, 2018
    konsic likes this.
  42. Cactus_on_Fire

    Cactus_on_Fire

    Joined:
    Aug 12, 2014
    Posts:
    675
    I like that shader. What did you need help with?
     
  43. MonkeyYao

    MonkeyYao

    Joined:
    Jul 3, 2012
    Posts:
    22
    I want to transfer another country to the North Pole, such as putting the United States in the center of the circle.
     
  44. Cactus_on_Fire

    Cactus_on_Fire

    Joined:
    Aug 12, 2014
    Posts:
    675
    Playing with the UV offset in the inspector should do it actually
     
  45. MonkeyYao

    MonkeyYao

    Joined:
    Jul 3, 2012
    Posts:
    22
    In fact, I tried it. After the offset, the North Pole can't be a closed state.Limited by my understanding of uv, I did not achieve the effect I wanted.
     
  46. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    6,493
    That's a complex problem, uv map are a torus not a sphere, so you have to effectively close the pole FIRST, then figure out a way to slide the data in sphere space
     
  47. MonkeyYao

    MonkeyYao

    Joined:
    Jul 3, 2012
    Posts:
    22
    Yes, this is the part I didn't complete. Move uv in sphere space.

    this is the shader.Can you help me?
    https://forum.unity.com/attachments/mapriverbackup-shader.290582/
     
    Last edited: Aug 7, 2018
  48. sonnyb

    sonnyb

    Joined:
    Nov 5, 2013
    Posts:
    17
    I've been seeing a lot of posts that Shader Forge doesn't work with Unity 2018, particularly 2018.1.

    However, I just upgraded my project to Unity 2018.2 (2018.2.7f1) from Unity 2017.3, and Shader Forge (v1.38) seems to work fine.

    Is Shader Forge known to be broken with 2018.1, but working in 2018.2? What changed in 2018.2?
     
  49. ceebeee

    ceebeee

    Joined:
    Mar 7, 2017
    Posts:
    395
    It was the case when Shadeforge first went open source, but since them the community has updated it. so it works now. the old posts just aren't true anymore.
     
  50. recon0303

    recon0303

    Joined:
    Apr 20, 2014
    Posts:
    1,634

    Do you have a link to the update ? if its been posted, sorry.