Search Unity

  1. Looking for a job or to hire someone for a project? Check out the re-opened job forums.
    Dismiss Notice
  2. Unity 2020 LTS & Unity 2021.1 have been released.
    Dismiss Notice
  3. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Shader Forge - A visual, node-based shader editor

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

  1. Martin_H

    Martin_H

    Joined:
    Jul 11, 2015
    Posts:
    4,239
    Afaik that is correct. At least not officially and by the main dev, who knows what others will do now that it's open source. Don't count on it.
     
  2. synapsemassage

    synapsemassage

    Joined:
    Jul 27, 2009
    Posts:
    334
    For some time now Shader Forge is deprecated/not supported anymore. Alternatively you can use Amplify Shader Editor or Unity's own Shader Graph. Both are good choices although Shader Graph might be not mature enough in some situations but it is growing.
     
  3. Cactus_on_Fire

    Cactus_on_Fire

    Joined:
    Aug 12, 2014
    Posts:
    597
    its abandoned for over a year now
     
  4. Cactus_on_Fire

    Cactus_on_Fire

    Joined:
    Aug 12, 2014
    Posts:
    597
    Shader forge fans haven't gone anywhere though apparently :)
     
  5. Invertex

    Invertex

    Joined:
    Nov 7, 2013
    Posts:
    1,121
    ShaderForge has been frequently updated by people, all you have to do is look at the Network graph on the Git.

    https://github.com/FreyaHolmer/ShaderForge/network

    Few users have updated it to 2018.3 and even later.
     
    NeatWolf, Cactus_on_Fire and Martin_H like this.
  6. Martin_H

    Martin_H

    Joined:
    Jul 11, 2015
    Posts:
    4,239
    Don't think I classify as "fan", I just had notifications still activated for this thread, so I replied when a question came up.


    Good to know and props to them for keeping it alive! What I meant is you can't count on people keeping it compatible forever, so it would imho be unwise to rely on it.
     
  7. mangax

    mangax

    Joined:
    Jul 17, 2013
    Posts:
    319
    i think it may went as open source, i think your better off using alternative solutions.
     
  8. Cactus_on_Fire

    Cactus_on_Fire

    Joined:
    Aug 12, 2014
    Posts:
    597
    Unity shader graph is the same thing as SF anyway, even more capable. Better switch to that.
     
  9. Quatum1000

    Quatum1000

    Joined:
    Oct 5, 2014
    Posts:
    845
    Thanks, but is SF only for hdrp?
     
  10. Invertex

    Invertex

    Joined:
    Nov 7, 2013
    Posts:
    1,121
    If you mean ShaderGraph (not ShaderForge), Shadergraph only supports the new pipelines, LWRP/HDRP. For the regular old Unity shader pipeline then you want to use ShaderForge or Amplify from the asset store.
     
  11. Quatum1000

    Quatum1000

    Joined:
    Oct 5, 2014
    Posts:
    845
    Okay.. thank you all
     
  12. AcornBringer

    AcornBringer

    Joined:
    Mar 22, 2015
    Posts:
    70
    Could someone help me out with this shader I'm trying to make?



    I'd like to get this shader to keep the texture the same size despite the object's scale and rotation but I'm not sure what to do about this stretching that happens when I do a non-uniform scale.

    Here's the shader forge nodes:



    Any help would be appreciated :)
     
  13. SeveredScion

    SeveredScion

    Joined:
    Oct 16, 2012
    Posts:
    45
    The stretching is caused by the UV coordinates of the geometry, not by the shader. That is typical and standard behavior. In order for that not to happen, you'd have to compensate for UV distortion in the shader, by scaling the UVs on the same axis and to the same multiplier as the geometry to which it is applied. Not sure offhand exactly how to do that. Basically you would need a node or a bit of code that passed the UVs through a multiplier that was tied to the objects scale. But it would be pretty tricky for things like rotated objects, local v. global orientation, etc. I advise against trying to compensate in a shader for something that is standard 3D object behavior.
     
  14. AcornBringer

    AcornBringer

    Joined:
    Mar 22, 2015
    Posts:
    70
    Okay then. I better not continue that way. I'm trying the triplanar mapping method now from this thread:

    http://neatcorporation.com/forums/viewtopic.php?t=8

    The thread is missing a lot of content so I can't quite gather how they are avoiding distortion while rotating.



    Any idea?
     
  15. Marco-Sperling

    Marco-Sperling

    Joined:
    Mar 5, 2012
    Posts:
    598
    You'd have to do the triplanar mapping in object space instead of world space. That should help to get rid of the strange layering effect, I think.
     
  16. AcornBringer

    AcornBringer

    Joined:
    Mar 22, 2015
    Posts:
    70
    I tried replacing the World Pos. node with the Object Pos. node (I think that's what you mean) but the texture does not display properly. It just shows soled colors on any given face. Maybe there's another step to take?

    Edit: I just realized the transform node will do that I believe. Unfortunately, using a transform world to local node after the World Pos. node causes stretching when scaled and the textures are still overlapping when the object is rotated.
     
    Last edited: Aug 30, 2019
  17. SeveredScion

    SeveredScion

    Joined:
    Oct 16, 2012
    Posts:
    45
    Hm not sure offhand how to get it working and don't have time to dissect. But yes in general, for the effect you're looking for, the way to go is not UV-dependent textures but a "projected" texture based on object space (or world space sometimes but based on the reply above it sounds like that's not a good idea here).
     
  18. AcornBringer

    AcornBringer

    Joined:
    Mar 22, 2015
    Posts:
    70
    Someone on Twitter was gracious enough to help me through this and he came up with the solution. A material which tiles as the object is scaled any which way and maintains an object space texture projection when rotated or moved:



    It's essentially the triplanar shader from that thread I posted earlier but with world space being transformed into local space and multiplied with the object scale. The Normal Dir. is also transformed from world to local space and then normalized.

    Edit: Optionally you can remove the Object Pos. and the Subtract node at the beginning to keep the texture mapping locked to world space when translating the object.

    Thanks for your suggestions as well and take care!
     
    Last edited: Aug 31, 2019
  19. coslor

    coslor

    Joined:
    Jun 19, 2017
    Posts:
    3
    Folks, I know that SF is discontinued, and thus we no longer have any support, but...the Wiki is broken. Is this expected?

    If so, is there any way to export it to another location, so that knowledge isn't permanently lost?

    If not, is there a way to get hold of whoever is maintaining the Web site and Wiki? Is it still Acegikmo?

    Just in case The Powers that Be do see this, the error message is:

    [e2cec6db] /shaderforge/wiki/index.php?title=Main_Page Exception from line 212 of /customers/1/c/4/acegikmo.com/httpd.www/shaderforge/wiki/includes/Hooks.php: Detected bug in an extension! Hook efSyntaxHighlight_GeSHiSetup has invalid call signature; Parameter 1 to efSyntaxHighlight_GeSHiSetup() expected to be a reference, value given
     
    AcornBringer likes this.
  20. drakeduck911

    drakeduck911

    Joined:
    May 20, 2018
    Posts:
    1
    how to lerp two textures by diffrence normal direction?
     
  21. Cactus_on_Fire

    Cactus_on_Fire

    Joined:
    Aug 12, 2014
    Posts:
    597
    Would anyone know why using vertex offset for mobile games doesn't work?
     
  22. Dobalina

    Dobalina

    Joined:
    Sep 6, 2013
    Posts:
    75
    Hey everyone, I have a vertex painting question with shaderforge.

    Here's brief explanation of what I have. I'm currently using a shaderforge material on my terrain. As with any typical terrain setup, I've hand painted the different layers (ie, grass,dirt,rock etc...) That all works and is fine...

    Next, I have a vehicle that drives on this terrain. I want to find some way that the tires will vertex paint my terrain as it traverses. Here's a somewhat similar example, except this is mesh only and doesn't support terrain painting (
    )

    I know there are packages on the asset store that allow you to vertex paint on meshs via mouse clicks.... but I haven't seen much in the way of gameobject translation or collision painting the terrain.
     
    Last edited: Sep 29, 2019
  23. Adam-Bailey

    Adam-Bailey

    Joined:
    Feb 17, 2015
    Posts:
    232
    Does Unity terrain even support vertex colors?
     
  24. asqewfcq2egf

    asqewfcq2egf

    Joined:
    Nov 16, 2018
    Posts:
    9
    In Unity 2019.3.6, shaders ignore directional light if using a baked lightmap. Any fix for this?
     
    syscrusher likes this.
  25. unity_0EUPTA9vhgif5g

    unity_0EUPTA9vhgif5g

    Joined:
    Jun 4, 2020
    Posts:
    1
  26. J0hnC0nn0r

    J0hnC0nn0r

    Joined:
    Sep 14, 2020
    Posts:
    3
    It's sad that the community has to make a better shader for Unity because apparently they don't want to improve theirs anymore.What's even worse is that said shader's are sold for $100 when their main competitor offers a great one for free that you don't have to buy.
     
  27. Invertex

    Invertex

    Joined:
    Nov 7, 2013
    Posts:
    1,121
    Unity has already drastically improved their shaders. But it required a new render pipeline to do correctly. You can enable the universal (lightweight) or HD render pipeline from your package manager. HD render pipeline has cutting edge rendering techniques, including raytracing.
     
    pachermann likes this.
  28. AlcoleponeHome

    AlcoleponeHome

    Joined:
    Jun 9, 2018
    Posts:
    40
    Anyone else still using shader forge? I've updated to 2019.4.13f1, and shader forge still loads and compiles shaders, but adding nodes to a shader causes Unity to crash. Anyone else had the same issue?
     
  29. Invertex

    Invertex

    Joined:
    Nov 7, 2013
    Posts:
    1,121
    Haven't tested this one, but it's the most recently updated one on Github.
    https://github.com/RobertAcksel/ShaderForge

    You can see the active forks here, there's some with 2019.3(4) specific labels too:
    https://github.com/FreyaHolmer/ShaderForge/network
     
    AlcoleponeHome likes this.
  30. AlcoleponeHome

    AlcoleponeHome

    Joined:
    Jun 9, 2018
    Posts:
    40
    umm, tried all of those, and still get a crash... some of those crash just loading shader forge. cheers for the links though
     
  31. gearedgeek

    gearedgeek

    Joined:
    Jun 19, 2015
    Posts:
    211
  32. nikolang_unity

    nikolang_unity

    Joined:
    May 17, 2019
    Posts:
    1
    Can someone tell how to recreate a Skybox Shader with a texture? I can get the standard procedual skybox shader in the default shader forge shaders but I cant get the texture mapping to work. I guess I somehow have to set the view direction to the UV map of the texture but I cant get it to work correctly.
     
  33. Fenixake

    Fenixake

    Joined:
    Jan 25, 2014
    Posts:
    155
    Just use a cubemap man!. Same thing
     
unityunity