Search Unity

Shader Forge - A visual, node-based shader editor

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

  1. Studio_Akiba

    Studio_Akiba

    Joined:
    Mar 3, 2014
    Posts:
    1,421
    Hey guys.
    Got a bit of a problem with refraction and a water shader I am working on.
    Everything looks ok (would prefer a bit more color differentiation in the depth but it is fine for now) when looking at it front on, but when something is in the way between the camera and the water, it seems to get refracted as well, like the depth buffer is having no effect on it at all.

    What I need is to have the refraction only take place on objects you see through the water mesh, not on anything in the way.

    Looks Ok
    water1.png

    ?
    water2.png Notice the edges...

    How can I get rid of this? (shader attached)
     

    Attached Files:

  2. FractalCore

    FractalCore

    Joined:
    May 15, 2009
    Posts:
    151
    I'm trying to make a basic water shader. No normal maps, reflection, refraction. Really basic, but I'd like it lightmapped. Or maybe lit by dynamic lights. As long as it will go dark in dark parts of my level.

    The problem with just using the Standard Unity shader, it makes the water bright when it's switched to transparent.

    So with Shader Forge I'm almost there, but the best I can get has it becoming more transparent in the shadows, and when I shine my torch around it goes completely opaque. What am I missing? Is this even possible with shaders?

    In the picture you can see the bricks under the water, but only in the shaded parts.
     

    Attached Files:

  3. o1o101

    o1o101

    Joined:
    Jan 19, 2014
    Posts:
    639
    Looking for a Shader Forge expert to make us up a quick mobile terrain shader, PM me for details.
     
  4. fengshuifever

    fengshuifever

    Joined:
    Nov 28, 2013
    Posts:
    15
    So an odd graphical glitch has been appearing with the character shader I've been tooling around with.
    If I position the camera certain way, a black plane obscures the view and it seems to come from the character itself.
    It's super clear to see when the camera is looking at the side and the character moves, as the black plane comes into front of the camera every now and then.

    I'll try to pause the game and capture a screenshot but here's my graph if anyone can see any wrong moves.
    (I tried searching around the forum outside of Shader Forge but couldn't find a mention of it)
     
  5. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,684
    I don't know how it could happen, but my first suspicion is that it somehow relates to the outline.
     
  6. Martin_H

    Martin_H

    Joined:
    Jul 11, 2015
    Posts:
    4,436
    @Acegikmo: I bought Shader Forge a few days ago. It's a really handy and fun tool, good job! Also the hotkeys to show the placement menu for nodes starting with that letter is brilliant. I've never seen that kind of workflow.

    I think I've encountered an issue with refractive shaders though. Basically the same as this user reported two years ago:
    https://shaderforge.userecho.com/topics/19-getting-refractive-particle/

    And I think what @Labyrith-Studios reports might also be related:

    So, about my own problem. With a setup like this:


    I get this when I put it on a particle system:



    A few hours of bashing my head against the wall later, and with @richardkettlewell nudging me in the right direction (thanks again!), I found out how to get this, which is what I wanted:


    To make that happen I had to manually change the final relevant line of the shader from:
    Code (csharp):
    1. return fixed4(lerp(sceneColor.rgb, finalColor,0.0),1);
    to this:
    Code (csharp):
    1. return fixed4(lerp(sceneColor.rgb, finalColor,0.0),_Mask_var.r);
    I am clueless on how I could have made Shader Forge do this from the node side. It feels to me like this would/should be basic functionality. Am I just overlooking something and it actually can be done, or is it just missing? Could this be hacked in with a code node or something like that? Will this get fixed/changed in the future?
     
    Rodolfo-Rubens likes this.
  7. Martin_H

    Martin_H

    Joined:
    Jul 11, 2015
    Posts:
    4,436
    Did anyone ever come up with an optimized solution for this? I thought about a shader that blends between normal and damaged materials on vehicle assets, but I fear that would need to be a fair bit more optimized to be feasible with a lot of enemies using the technique.
    Thanks a lot for sharing the code, even if I can't find a way to optimize it, I might still be able to use it on a single hero asset.
     
    daville likes this.
  8. Ga2Z

    Ga2Z

    Joined:
    Feb 16, 2012
    Posts:
    68
    I was wondering if this could be achieved using shader forge.

    I guess is possible but if someone can advice on how to begin this, that would be great.

     
    kebrus, Martin_H and daville like this.
  9. daville

    daville

    Joined:
    Aug 5, 2012
    Posts:
    303
    I also would like to do that, the only part I don't know how to do is getting the zDepht of the camera, I asked before about how to get it, and I still don't know how
     
    Martin_H likes this.
  10. bblakesley

    bblakesley

    Joined:
    Apr 7, 2012
    Posts:
    4
    Hi all,
    I'm new to SF and trying to create pbr shaders for mobile. Using an HDR camera and setting up a linear color space works fairly well, but I'm getting black silhouettes when I use a tone mapper. The Unity standard shader works fine so I'm obviously missing something.
    To try and fix it I've replicated one of the first examples Joachim showed using Skyshop and have replaced the sky shop images used in the Diffuse and Specular IBL with the probe image dynamically created by Enlighten. No luck.
    My questions are: Do I need to go through these steps of connecting nodes to Diffuse and Specular Ambient light ports on the SF shader? Is this something Unity's shaders are doing behind the scenes but still have to be manually set up in SF? Do I still need to use Skyshop since Unity has since implemented pbr lighting? Can anyone give me some more recent resources to look at for this?
     
  11. jtsmith1287

    jtsmith1287

    Joined:
    Aug 3, 2014
    Posts:
    787
    So, I'm just beginning my journey into anything art related. I picked up Substance Painter and I'm thinking about grabbing this. Will these two programs play nice together? Is there any major overlap in functionality? I want to make sure I'm going to get the best value by using them together.
     
  12. DaDarkDragon

    DaDarkDragon

    Joined:
    Jun 6, 2013
    Posts:
    115
    @jtsmith1287 They should work nicely as they would any other texture. However, the textures that SPainter produces are best suited for the standard shader or a modified-to-your-needs Lit(PBR) preset in SForge. i will encourage you though to pick SForge up anyway since it can do a bunch more than just working with SPainter, like post-processing(aka image effects), custom sky-boxes, particle shaders, pretty much any effect or look you can think of.

    it is a bit outdated right now though as @Acegikmo is working on a different project right now(Budgetcuts VR) and we don't know exactly when he is coming back to SF.
     
  13. Martin_H

    Martin_H

    Joined:
    Jul 11, 2015
    Posts:
    4,436
    They "play nice together" the same way Photoshop and Unity play nice together. Meaning they are different tools with basically no overlap between them, and both contribute their part to achieving your goal (hopefully). That said, if you have to ask the question you asked, I think it is unlikely that you'd get good value out of Shader Forge. It is a tool to help you make custom shaders. If you don't know what custom shaders are and why you'd want to make them, I don't think you'll get much out of Shader Forge. I suggest to download the free Lux Shader Framework from the assetstore and try out all the different shaders. Get a feel for how different shaders work and how they contribute to the visual representation of a 3D object. If you feel there's something specific that you can't achieve using Substance Painter and shaders available to you, you can investigate if Shaderforge would be able to help you make that shader (it can't make every shader you could write manually).

    My experience so far was different.


    P.S.: Budgetcuts looks super fun. I had watched a video somewhere a few days ago. I understand the (temporary?) shift in priorities.
     
  14. DaDarkDragon

    DaDarkDragon

    Joined:
    Jun 6, 2013
    Posts:
    115
    care to explain? im curious
     
  15. Martin_H

    Martin_H

    Joined:
    Jul 11, 2015
    Posts:
    4,436
    Heat haze shader I wrote about a few post above - can't be done without manually altering the generated shader apparently.

    No Man's Sky style scanner effect shader (see video below) - can't be done according to someone on the slack chat

    2 pass particle fire shader that I wrote manually (alpha blends particles first and then additively blends another pass over them) - can't be done as far as I know

    I would be highly surprised if something like the advance normal mapped particle shader could be done with it, I'm pretty sure it can't: http://forum.unity3d.com/threads/volumetric-smoke-shader.358315/


     
  16. Waz

    Waz

    Joined:
    May 1, 2010
    Posts:
    287
    Fails to start up with Unity 5.5.0beta1:

    Code (csharp):
    1.  
    2. Shader error in 'Shader Forge/Examples/LightWrapping': invalid subscript 'ndotl' at line 108 (on d3d11)
    3.  
    4. Compiling Vertex program with DIRECTIONAL LIGHTMAP_OFF DIRLIGHTMAP_OFF DYNAMICLIGHTMAP_OFF
    5. Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING SHADER_API_DESKTOP
    6. (Filename: Shader Forge/Examples/LightWrapping Line: 108)
    7.  
    8. Shader error in 'Shader Forge/Examples/Animated Vegetation': invalid subscript 'ndotl' at line 125 (on d3d11)
    9.  
    10. Compiling Vertex program with DIRECTIONAL LIGHTMAP_OFF DIRLIGHTMAP_OFF DYNAMICLIGHTMAP_OFF
    11. Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING SHADER_API_DESKTOP
    12. (Filename: Shader Forge/Examples/Animated Vegetation Line: 125)
    13.  
    14. Shader error in 'Shader Forge/Examples/Refraction': invalid subscript 'ndotl' at line 108 (on d3d11)
    15.  
    16. Compiling Vertex program with DIRECTIONAL
    17. Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING SHADER_API_DESKTOP
    18. (Filename: Shader Forge/Examples/Refraction Line: 108)
    19.  
    20. Shader error in 'Shader Forge/Examples/Vertex Animation': invalid subscript 'ndotl' at line 126 (on d3d11)
    21.  
    22. Compiling Vertex program with DIRECTIONAL LIGHTMAP_OFF DIRLIGHTMAP_OFF DYNAMICLIGHTMAP_OFF
    23. Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING SHADER_API_DESKTOP
    24. (Filename: Shader Forge/Examples/Vertex Animation Line: 126)
    25.  
    26. Shader error in 'Shader Forge/Examples/Tiles': invalid subscript 'ndotl' at line 114 (on d3d11)
    27.  
    28. Compiling Vertex program with DIRECTIONAL LIGHTMAP_OFF DIRLIGHTMAP_OFF DYNAMICLIGHTMAP_OFF
    29. Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING SHADER_API_DESKTOP
    30. (Filename: Shader Forge/Examples/Tiles Line: 114)
    31.  
    32. Shader error in 'Shader Forge/Examples/TessellationDisplacement': invalid subscript 'ndotl' at line 206 (on d3d11)
    33.  
    34. Compiling Vertex program with DIRECTIONAL LIGHTMAP_OFF DIRLIGHTMAP_OFF DYNAMICLIGHTMAP_OFF
    35. Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING SHADER_API_DESKTOP
    36. (Filename: Shader Forge/Examples/TessellationDisplacement Line: 206)
    37.  
    38. Shader error in 'Shader Forge/Examples/Parallax': invalid subscript 'ndotl' at line 117 (on d3d11)
    39.  
    40. Compiling Vertex program with DIRECTIONAL LIGHTMAP_OFF DIRLIGHTMAP_OFF DYNAMICLIGHTMAP_OFF
    41. Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING SHADER_API_DESKTOP
    42. (Filename: Shader Forge/Examples/Parallax Line: 117)
    43.  
    44. Refreshing native plugins compatible for Editor in 4.87 ms, found 0 plugins.
    45. Preloading 0 native plugins for Editor in 0.00 ms.
    46.  
    47. ----- Total AssetImport time: 41.603558s, AssetImport time: 40.161911s, Asset hashing: 0.657104s [14.9 MB, 22.711884 mb/s]
    48.  
    49. - Finished compile Library/ScriptAssemblies/Assembly-CSharp.dll
    50. WeaveUnetFromEditor Temp/Assembly-CSharp.dll
    51. Platform assembly: C:\Program Files\Unity\Editor\Data\Managed\Unity.UNetWeaver.dll (this message is harmless)
    52. Ignoring 'C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/GUISystem/Standalone/UnityEngine.UI.dll' because we're compiling for Editor
    53. Ignoring 'C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/Networking/Standalone/UnityEngine.Networking.dll' because we're compiling for Editor
    54. Ignoring 'C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/UnityHoloLens/Runtime/UnityEngine.HoloLens.dll' because we're compiling for Editor
    55. Ignoring 'C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/UnityVR/Runtime/UnityEngine.VR.dll' because we're compiling for Editor
    56. WeaveAssemblies unityPath= C:/Program Files/Unity/Editor/Data/Managed/UnityEngine.dll
    57. WeaveAssemblies unetPath= C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/Networking/UnityEngine.Networking.dll
    58. Platform assembly: C:\Program Files\Unity\Editor\Data\Managed\Mono.Cecil.Pdb.dll (this message is harmless)
    59. Platform assembly: C:\Program Files\Unity\Editor\Data\Managed\Mono.Cecil.Mdb.dll (this message is harmless)
    60. Symbols will be read from Temp/Assembly-CSharp.dll.mdb
    61. Script Module: Assembly-CSharp.dll
    62. Ignoring 'C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/GUISystem/Standalone/UnityEngine.UI.dll' because we're compiling for Editor
    63. Ignoring 'C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/Networking/Standalone/UnityEngine.Networking.dll' because we're compiling for Editor
    64. Ignoring 'C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/UnityHoloLens/Runtime/UnityEngine.HoloLens.dll' because we're compiling for Editor
    65. Ignoring 'C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/UnityVR/Runtime/UnityEngine.VR.dll' because we're compiling for Editor
    66. - starting compile Library/ScriptAssemblies/Assembly-CSharp-Editor.dll, for buildtarget 5
    67. - Finished compile Library/ScriptAssemblies/Assembly-CSharp-Editor.dll
    68. WeaveUnetFromEditor Temp/Assembly-CSharp-Editor.dll
    69. Ignoring 'C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/GUISystem/Standalone/UnityEngine.UI.dll' because we're compiling for Editor
    70. Ignoring 'C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/Networking/Standalone/UnityEngine.Networking.dll' because we're compiling for Editor
    71. Ignoring 'C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/UnityHoloLens/Runtime/UnityEngine.HoloLens.dll' because we're compiling for Editor
    72. Ignoring 'C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/UnityVR/Runtime/UnityEngine.VR.dll' because we're compiling for Editor
    73. WeaveAssemblies unityPath= C:/Program Files/Unity/Editor/Data/Managed/UnityEngine.dll
    74. WeaveAssemblies unetPath= C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/Networking/UnityEngine.Networking.dll
    75. Reloading assemblies after finishing script compilation.
    76. Begin MonoManager ReloadAssembly
    77. Platform assembly: C:\Program Files\Unity\Editor\Data\Managed\UnityEngine.dll (this message is harmless)
    78. Platform assembly: C:\Program Files\Unity\Editor\Data\Managed\UnityEditor.dll (this message is harmless)
    79. Platform assembly: C:\Program Files\Unity\Editor\Data\Managed\Unity.Locator.dll (this message is harmless)
    80. Platform assembly: C:\Program Files\Unity\Editor\Data\Mono\lib\mono\2.0\I18N.dll (this message is harmless)
    81. Platform assembly: C:\Program Files\Unity\Editor\Data\Mono\lib\mono\2.0\I18N.West.dll (this message is harmless)
    82. Registering custom dll's ...
    83. Register platform support module: C:\Program Files\Unity\Editor\Data\PlaybackEngines\windowsstandalonesupport/UnityEditor.WindowsStandalone.Extensions.dll
    84. Platform assembly: C:\Program Files\Unity\Editor\Data\Mono\lib\mono\2.0\System.Core.dll (this message is harmless)
    85. Registered in 0.091942 seconds.
    86. Non platform assembly: U:\Users\Warwick\Documents\Unity Projects\New Unity Project\Library\ScriptAssemblies\Assembly-CSharp.dll (this message is harmless)
    87. Loading U:\Users\Warwick\Documents\Unity Projects\New Unity Project\Library\ScriptAssemblies\Assembly-CSharp.dll into Unity Child Domain
    88. Non platform assembly: U:\Users\Warwick\Documents\Unity Projects\New Unity Project\Library\ScriptAssemblies\Assembly-CSharp-Editor.dll (this message is harmless)
    89. Loading U:\Users\Warwick\Documents\Unity Projects\New Unity Project\Library\ScriptAssemblies\Assembly-CSharp-Editor.dll into Unity Child Domain
    90. Platform assembly: C:\Program Files\Unity\Editor\Data\PackageManager\Unity\PackageManager\5.5.0\Unity.PackageManager.dll (this message is harmless)
    91. Loading C:\Program Files\Unity\Editor\Data\PackageManager\Unity\PackageManager\5.5.0\Unity.PackageManager.dll into Unity Child Domain
    92. Non platform assembly: C:\Program Files\Unity\Editor\Data\UnityExtensions\Unity\Advertisements\UnityEngine.Advertisements.dll (this message is harmless)
    93. Loading C:\Program Files\Unity\Editor\Data\UnityExtensions\Unity\Advertisements\UnityEngine.Advertisements.dll into Unity Child Domain
    94. Non platform assembly: C:\Program Files\Unity\Editor\Data\UnityExtensions\Unity\Advertisements\Editor\UnityEditor.Advertisements.dll (this message is harmless)
    95. Loading C:\Program Files\Unity\Editor\Data\UnityExtensions\Unity\Advertisements\Editor\UnityEditor.Advertisements.dll into Unity Child Domain
    96. Non platform assembly: C:\Program Files\Unity\Editor\Data\UnityExtensions\Unity\EditorTestsRunner\Editor\nunit.framework.dll (this message is harmless)
    97. Loading C:\Program Files\Unity\Editor\Data\UnityExtensions\Unity\EditorTestsRunner\Editor\nunit.framework.dll into Unity Child Domain
    98. Non platform assembly: C:\Program Files\Unity\Editor\Data\UnityExtensions\Unity\EditorTestsRunner\Editor\UnityEditor.EditorTestsRunner.dll (this message is harmless)
    99. Loading C:\Program Files\Unity\Editor\Data\UnityExtensions\Unity\EditorTestsRunner\Editor\UnityEditor.EditorTestsRunner.dll into Unity Child Domain
    100. Non platform assembly: C:\Program Files\Unity\Editor\Data\UnityExtensions\Unity\GUISystem\UnityEngine.UI.dll (this message is harmless)
    101. Loading C:\Program Files\Unity\Editor\Data\UnityExtensions\Unity\GUISystem\UnityEngine.UI.dll into Unity Child Domain
    102. Non platform assembly: C:\Program Files\Unity\Editor\Data\UnityExtensions\Unity\GUISystem\Editor\UnityEditor.UI.dll (this message is harmless)
    103. Loading C:\Program Files\Unity\Editor\Data\UnityExtensions\Unity\GUISystem\Editor\UnityEditor.UI.dll into Unity Child Domain
    104. Non platform assembly: C:\Program Files\Unity\Editor\Data\UnityExtensions\Unity\Networking\UnityEngine.Networking.dll (this message is harmless)
    105. Loading C:\Program Files\Unity\Editor\Data\UnityExtensions\Unity\Networking\UnityEngine.Networking.dll into Unity Child Domain
    106. Non platform assembly: C:\Program Files\Unity\Editor\Data\UnityExtensions\Unity\Networking\Editor\UnityEditor.Networking.dll (this message is harmless)
    107. Loading C:\Program Files\Unity\Editor\Data\UnityExtensions\Unity\Networking\Editor\UnityEditor.Networking.dll into Unity Child Domain
    108. Non platform assembly: C:\Program Files\Unity\Editor\Data\UnityExtensions\Unity\PlaymodeTestsRunner\Editor\UnityEditor.PlaymodeTestsRunner.dll (this message is harmless)
    109. Loading C:\Program Files\Unity\Editor\Data\UnityExtensions\Unity\PlaymodeTestsRunner\Editor\UnityEditor.PlaymodeTestsRunner.dll into Unity Child Domain
    110. Non platform assembly: C:\Program Files\Unity\Editor\Data\UnityExtensions\Unity\PlaymodeTestsRunner\UnityEngine.PlaymodeTestsRunner.dll (this message is harmless)
    111. Loading C:\Program Files\Unity\Editor\Data\UnityExtensions\Unity\PlaymodeTestsRunner\UnityEngine.PlaymodeTestsRunner.dll into Unity Child Domain
    112. Non platform assembly: C:\Program Files\Unity\Editor\Data\UnityExtensions\Unity\TreeEditor\Editor\UnityEditor.TreeEditor.dll (this message is harmless)
    113. Loading C:\Program Files\Unity\Editor\Data\UnityExtensions\Unity\TreeEditor\Editor\UnityEditor.TreeEditor.dll into Unity Child Domain
    114. Non platform assembly: C:\Program Files\Unity\Editor\Data\UnityExtensions\Unity\UnityAnalytics\UnityEngine.Analytics.dll (this message is harmless)
    115. Loading C:\Program Files\Unity\Editor\Data\UnityExtensions\Unity\UnityAnalytics\UnityEngine.Analytics.dll into Unity Child Domain
    116. Non platform assembly: C:\Program Files\Unity\Editor\Data\UnityExtensions\Unity\UnityAnalytics\Editor\UnityEditor.Analytics.dll (this message is harmless)
    117. Loading C:\Program Files\Unity\Editor\Data\UnityExtensions\Unity\UnityAnalytics\Editor\UnityEditor.Analytics.dll into Unity Child Domain
    118. Non platform assembly: C:\Program Files\Unity\Editor\Data\UnityExtensions\Unity\UnityHoloLens\Editor\UnityEditor.HoloLens.dll (this message is harmless)
    119. Loading C:\Program Files\Unity\Editor\Data\UnityExtensions\Unity\UnityHoloLens\Editor\UnityEditor.HoloLens.dll into Unity Child Domain
    120. Non platform assembly: C:\Program Files\Unity\Editor\Data\UnityExtensions\Unity\UnityHoloLens\RuntimeEditor\UnityEngine.HoloLens.dll (this message is harmless)
    121. Loading C:\Program Files\Unity\Editor\Data\UnityExtensions\Unity\UnityHoloLens\RuntimeEditor\UnityEngine.HoloLens.dll into Unity Child Domain
    122. Non platform assembly: C:\Program Files\Unity\Editor\Data\UnityExtensions\Unity\UnityPurchasing\UnityEngine.Purchasing.dll (this message is harmless)
    123. Loading C:\Program Files\Unity\Editor\Data\UnityExtensions\Unity\UnityPurchasing\UnityEngine.Purchasing.dll into Unity Child Domain
    124. Non platform assembly: C:\Program Files\Unity\Editor\Data\UnityExtensions\Unity\UnityVR\Editor\UnityEditor.VR.dll (this message is harmless)
    125. Loading C:\Program Files\Unity\Editor\Data\UnityExtensions\Unity\UnityVR\Editor\UnityEditor.VR.dll into Unity Child Domain
    126. Non platform assembly: C:\Program Files\Unity\Editor\Data\UnityExtensions\Unity\UnityVR\RuntimeEditor\UnityEngine.VR.dll (this message is harmless)
    127. Loading C:\Program Files\Unity\Editor\Data\UnityExtensions\Unity\UnityVR\RuntimeEditor\UnityEngine.VR.dll into Unity Child Domain
    128. Platform assembly: C:\Program Files\Unity\Editor\Data\Managed\UnityEditor.Graphs.dll (this message is harmless)
    129. Loading C:\Program Files\Unity\Editor\Data\Managed\UnityEditor.Graphs.dll into Unity Child Domain
    130. Platform assembly: C:\Program Files\Unity\Editor\Data\PlaybackEngines\windowsstandalonesupport\UnityEditor.WindowsStandalone.Extensions.dll (this message is harmless)
    131. Loading C:\Program Files\Unity\Editor\Data\PlaybackEngines\windowsstandalonesupport\UnityEditor.WindowsStandalone.Extensions.dll into Unity Child Domain
    132. Non platform assembly: C:\Program Files (x86)\Microsoft Visual Studio Tools for Unity\2015\Editor\SyntaxTree.VisualStudio.Unity.Bridge.dll (this message is harmless)
    133. Loading C:\Program Files (x86)\Microsoft Visual Studio Tools for Unity\2015\Editor\SyntaxTree.VisualStudio.Unity.Bridge.dll into Unity Child Domain
    134. Non platform assembly: U:\Users\Warwick\Documents\Unity Projects\New Unity Project\Assets\ShaderForge\Editor\ShaderForge.dll (this message is harmless)
    135. Loading U:\Users\Warwick\Documents\Unity Projects\New Unity Project\Assets\ShaderForge\Editor\ShaderForge.dll into Unity Child Domain
    136. Platform assembly: C:\Program Files\Unity\Editor\Data\Managed\nunit.core.interfaces.dll (this message is harmless)
    137. Refreshing native plugins compatible for Editor in 0.28 ms, found 0 plugins.
    138. Preloading 0 native plugins for Editor in 0.00 ms.
    139. Platform assembly: C:\Program Files\Unity\Editor\Data\Managed\Mono.Cecil.dll (this message is harmless)
    140. Platform assembly: C:\Program Files\Unity\Editor\Data\Managed\Unity.SerializationLogic.dll (this message is harmless)
    141. Platform assembly: C:\Program Files\Unity\Editor\Data\Managed\Unity.DataContract.dll (this message is harmless)
    142. Platform assembly: C:\Program Files\Unity\Editor\Data\Mono\lib\mono\2.0\UnityScript.dll (this message is harmless)
    143. Platform assembly: C:\Program Files\Unity\Editor\Data\Managed\ICSharpCode.NRefactory.dll (this message is harmless)
    144. Platform assembly: C:\Program Files\Unity\Editor\Data\Mono\lib\mono\2.0\System.Xml.Linq.dll (this message is harmless)
    145. Platform assembly: C:\Program Files\Unity\Editor\Data\Managed\Unity.IvyParser.dll (this message is harmless)
    146. Platform assembly: C:\Program Files\Unity\Editor\Data\Managed\nunit.core.dll (this message is harmless)
    147. Non platform assembly: C:\Program Files (x86)\Microsoft Visual Studio Tools for Unity\2015\Editor\SyntaxTree.VisualStudio.Unity.Messaging.dll (this message is harmless)
    148. Mono: successfully reloaded assembly
    149. Refreshing native plugins compatible for Editor in 0.24 ms, found 0 plugins.
    150. Preloading 0 native plugins for Editor in 0.00 ms.
    151.  
    152. ----- Total AssetImport time: 0.052981s, AssetImport time: 0.000000s, Asset hashing: 0.000000s [0 B, 0.000000 mb/s]
    153.  
    154. - Completed reload, in  1.461 seconds
    155. Initializing Unity.PackageManager (PackageManager) v5.5.0 for Unity v5.5.0b1
    156. Setting StandaloneWindows v5.5.0 for Unity v5.5.0b1 to C:\Program Files\Unity\Editor\Data\PlaybackEngines\windowsstandalonesupport
    157. Setting Advertisements v5.5.0 for Unity v5.5.0b1 to C:\Program Files\Unity\Editor\Data\UnityExtensions\Unity\Advertisements
    158.  UnityEngine.Advertisements.dll (Extension) GUID: 739bbd9f364b4268874f9fd86ab3beef
    159.  Editor/UnityEditor.Advertisements.dll (Extension) GUID: 97decbdab0634cdd991f8d23ddf0dead
    160. Setting EditorTestsRunner v5.5.0 for Unity v5.5.0b1 to C:\Program Files\Unity\Editor\Data\UnityExtensions\Unity\EditorTestsRunner
    161.  Editor/nunit.framework.dll (Extension) GUID: 7cbab2be89b54486bbd23a6fe637d30e
    162.  Editor/UnityEditor.EditorTestsRunner.dll (Extension) GUID: 3c0ad459c1534645b5d603b7cc258f97
    163. Setting GUISystem v5.5.0 for Unity v5.5.0b1 to C:\Program Files\Unity\Editor\Data\UnityExtensions\Unity\GUISystem
    164.  UnityEngine.UI.dll (Extension) GUID: f5f67c52d1564df4a8936ccd202a3bd8
    165.  Standalone/UnityEngine.UI.dll (Extension) GUID: f70555f144d8491a825f0804e09c671c
    166.  Editor/UnityEditor.UI.dll (Extension) GUID: 80a3616ca19596e4da0f10f14d241e9f
    167. Setting UNetHLAPI v5.5.0 for Unity v5.5.0b1 to C:\Program Files\Unity\Editor\Data\UnityExtensions\Unity\Networking
    168.  UnityEngine.Networking.dll (Extension) GUID: 870353891bb340e2b2a9c8707e7419ba
    169.  Standalone/UnityEngine.Networking.dll (Extension) GUID: dc443db3e92b4983b9738c1131f555cb
    170.  Editor/UnityEditor.Networking.dll (Extension) GUID: 5f32cd94baa94578a686d4b9d6b660f7
    171. Setting PlaymodeTestsRunner v5.5.0 for Unity v5.5.0b1 to C:\Program Files\Unity\Editor\Data\UnityExtensions\Unity\PlaymodeTestsRunner
    172.  Editor/UnityEditor.PlaymodeTestsRunner.dll (Extension) GUID: 4113173d5e95493ab8765d7b08371de4
    173.  UnityEngine.PlaymodeTestsRunner.dll (Extension) GUID: 53ebcfaa2e1e4e2dbc85882cd5a73fa1
    174. Setting TreeEditor v5.5.0 for Unity v5.5.0b1 to C:\Program Files\Unity\Editor\Data\UnityExtensions\Unity\TreeEditor
    175.  Editor/UnityEditor.TreeEditor.dll (Extension) GUID: adebbd281f1a4ef3a30be7f21937e02f
    176. Setting UnityAnalytics v5.5.0 for Unity v5.5.0b1 to C:\Program Files\Unity\Editor\Data\UnityExtensions\Unity\UnityAnalytics
    177.  UnityEngine.Analytics.dll (Extension) GUID: 852E56802EB941638ACBB491814497B0
    178.  Editor/UnityEditor.Analytics.dll (Extension) GUID: 86f4de9468454445ac2f39e207fafa3a
    179. Setting UnityHoloLens v5.5.0 for Unity v5.5.0b1 to C:\Program Files\Unity\Editor\Data\UnityExtensions\Unity\UnityHoloLens
    180.  Editor/UnityEditor.HoloLens.dll (Extension) GUID: 12fd8a0055b84bb59e84c9835a37e333
    181.  Runtime/UnityEngine.HoloLens.dll (Extension) GUID: f7b54ff4a43d4fcf81b4538b678e0bcc
    182.  RuntimeEditor/UnityEngine.HoloLens.dll (Extension) GUID: 1c6d1fbb51834b64847b1b73a75bfc77
    183. Setting UnityPurchasing v5.5.0 for Unity v5.5.0b1 to C:\Program Files\Unity\Editor\Data\UnityExtensions\Unity\UnityPurchasing
    184.  UnityEngine.Purchasing.dll (Extension) GUID: 8E0CD8ED44D4412CBE0642067ABC9E44
    185. Setting UnityVR v5.5.0 for Unity v5.5.0b1 to C:\Program Files\Unity\Editor\Data\UnityExtensions\Unity\UnityVR
    186.  Editor/UnityEditor.VR.dll (Extension) GUID: 4ba2329b63d54f0187bcaa12486b1b0f
    187.  Runtime/UnityEngine.VR.dll (Extension) GUID: 6cdf1e5c78d14720aaadccd4C792df96
    188.  RuntimeEditor/UnityEngine.VR.dll (Extension) GUID: 307433eba81a469ab1e2084d52d1a5a2
    189. Registering platform support modules:
    190. Platform assembly: C:\Program Files\Unity\Editor\Data\Mono\lib\mono\2.0\Boo.Lang.Compiler.dll (this message is harmless)
    191. Platform assembly: C:\Program Files\Unity\Editor\Data\Mono\lib\mono\2.0\Boo.Lang.dll (this message is harmless)
    192. Platform assembly: C:\Program Files\Unity\Editor\Data\Mono\lib\mono\2.0\Boo.Lang.Parser.dll (this message is harmless)
    193. Platform assembly: C:\Program Files\Unity\Editor\Data\Mono\lib\mono\2.0\UnityScript.Lang.dll (this message is harmless)
    194. Registered platform support modules in: 0.1185578s.
    195. Native extension for WindowsStandalone target not found
    196. AmbiguousMatchException: Ambiguous matching in method resolution
    197.  at System.Reflection.Binder.FindMostDerivedMatch (System.Reflection.MethodBase[] match) [0x0002a] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/Binder.cs:106
    198.  at System.MonoType.GetMethodImpl (System.String name, BindingFlags bindingAttr, System.Reflection.Binder binder, CallingConventions callConvention, System.Type[] types, System.Reflection.ParameterModifier[] modifiers) [0x000f8] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System/MonoType.cs:245
    199.  at System.Type.GetMethod (System.String name, BindingFlags bindingAttr) [0x00011] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System/Type.cs:787
    200.  at ShaderForge.SF_PreviewWindow.SetupPreview () [0x00000] in <filename unknown>:0
    201.  at ShaderForge.SF_PreviewWindow..ctor (ShaderForge.SF_Editor editor) [0x00000] in <filename unknown>:0
    202.  at ShaderForge.SF_Editor.InitializeInstance (UnityEngine.Shader initShader) [0x00000] in <filename unknown>:0
    203.  at ShaderForge.SF_Editor.Init (UnityEngine.Shader initShader) [0x00000] in <filename unknown>:0
    204.  at UnityEditor.ShaderForgeInspector.OnInspectorGUI () [0x0005a] in U:\Users\Warwick\Documents\Unity Projects\New Unity Project\Assets\ShaderForge\Editor\InternalResources\Inspectors\ShaderForgeInspector.cs:172
    205.  at UnityEditor.InspectorWindow.DrawEditor (UnityEditor.Editor editor, Int32 editorIndex, Boolean rebuildOptimizedGUIBlock, System.Boolean& showImportedObjectBarNext, UnityEngine.Rect& importedObjectBarRect) [0x003af] in C:\buildslave\unity\build\Editor\Mono\Inspector\InspectorWindow.cs:1233
    206. UnityEngine.DebugLogHandler:Internal_LogException(Exception, Object)
    207. UnityEngine.DebugLogHandler:LogException(Exception, Object)
    208. UnityEngine.Logger:LogException(Exception, Object)
    209. UnityEngine.Debug:LogException(Exception)
    210. UnityEditor.InspectorWindow:DrawEditor(Editor, Int32, Boolean, Boolean&, Rect&) (at C:\buildslave\unity\build\Editor\Mono\Inspector\InspectorWindow.cs:1240)
    211. UnityEditor.InspectorWindow:DrawEditors(Editor[]) (at C:\buildslave\unity\build\Editor\Mono\Inspector\InspectorWindow.cs:1028)
    212. UnityEditor.InspectorWindow:OnGUI() (at C:\buildslave\unity\build\Editor\Mono\Inspector\InspectorWindow.cs:353)
    213. System.Reflection.MonoMethod:InternalInvoke(Object, Object[], Exception&)
    214. System.Reflection.MonoMethod:Invoke(Object, BindingFlags, Binder, Object[], CultureInfo) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
    215. System.Reflection.MethodBase:Invoke(Object, Object[]) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115)
    216. UnityEditor.HostView:Invoke(String, Object) (at C:\buildslave\unity\build\Editor\Mono\HostView.cs:250)
    217. UnityEditor.HostView:Invoke(String) (at C:\buildslave\unity\build\Editor\Mono\HostView.cs:243)
    218. UnityEditor.HostView:InvokeOnGUI(Rect) (at C:\buildslave\unity\build\Editor\Mono\HostView.cs:213)
    219. UnityEditor.DockArea:OnGUI() (at C:\buildslave\unity\build\Editor\Mono\GUI\DockArea.cs:341)
    220. (Filename: /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/Binder.cs Line: 106)
    221.  
    222. NullReferenceException: Object reference not set to an instance of an object
    223.  at ShaderForge.SF_Editor.Update () [0x00000] in <filename unknown>:0
    224.  at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception&)
    225.  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x000d0] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222
    226. Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
    227.  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x000eb] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:232
    228.  at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115
    229.  at UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) [0x00013] in C:\buildslave\unity\build\Editor\Mono\HostView.cs:250
    230.  at UnityEditor.HostView.Invoke (System.String methodName) [0x00009] in C:\buildslave\unity\build\Editor\Mono\HostView.cs:243
    231.  at UnityEditor.HostView.SendUpdate () [0x00007] in C:\buildslave\unity\build\Editor\Mono\HostView.cs:308
    232.  at (wrapper delegate-invoke) UnityEditor.EditorApplication/CallbackFunction:invoke_void__this__ ()
    233.  at UnityEditor.EditorApplication.Internal_CallUpdateFunctions () [0x00010] in C:\buildslave\unity\build\artifacts\generated\common\editor\EditorApplicationBindings.gen.cs:197
    234. (Filename: /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs Line: 222)
    235.  
    236. NullReferenceException: Object reference not set to an instance of an object
    237.  at ShaderForge.SF_Editor.OnDestroy () [0x00000] in <filename unknown>:0
    238. UnityEngine.Object:DestroyImmediate(Object, Boolean)
    239. UnityEditor.EditorWindow:Close() (at C:\buildslave\unity\build\Editor\Mono\EditorWindow.cs:689)
    240. ShaderForge.SF_Editor:Update()
    241. System.Reflection.MonoMethod:InternalInvoke(Object, Object[], Exception&)
    242. System.Reflection.MonoMethod:Invoke(Object, BindingFlags, Binder, Object[], CultureInfo) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
    243. System.Reflection.MethodBase:Invoke(Object, Object[]) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115)
    244. UnityEditor.HostView:Invoke(String, Object) (at C:\buildslave\unity\build\Editor\Mono\HostView.cs:250)
    245. UnityEditor.HostView:Invoke(String) (at C:\buildslave\unity\build\Editor\Mono\HostView.cs:243)
    246. UnityEditor.HostView:SendUpdate() (at C:\buildslave\unity\build\Editor\Mono\HostView.cs:308)
    247. UnityEditor.EditorApplication:Internal_CallUpdateFunctions() (at C:\buildslave\unity\build\artifacts\generated\common\editor\EditorApplicationBindings.gen.cs:197)
    248. (Filename:  Line: -1)
     
  17. Mark_T

    Mark_T

    Joined:
    Apr 25, 2011
    Posts:
    303
    Does the latest Shader Forge version supports the new Unity 5.4 instancing features? Thanks.
     
  18. jtsmith1287

    jtsmith1287

    Joined:
    Aug 3, 2014
    Posts:
    787
    I know what custom shaders are, but I didn't know if the substance tools utilize/make them. I haven't done much with either tool, but I've been trying to pick them up on sale as I intend to eventually learn to use them. I just didn't know if I'd ever use shader forge. Looking into it more, it does look like I could take advantage of it at some point and it's almost half off right now. :) *slowly reaches for wallet*
     
  19. kdm3d

    kdm3d

    Joined:
    Jul 20, 2012
    Posts:
    15
    Here's how I made this one. Not quite two passes, that you cant do in SF atm. but this one worked well for me:)

    http://neatcorporation.com/forums/viewtopic.php?f=4&t=1953
     
  20. Martin_H

    Martin_H

    Joined:
    Jul 11, 2015
    Posts:
    4,436
  21. lparker

    lparker

    Joined:
    Apr 8, 2013
    Posts:
    30
    So whilst trying to make a new shader I seem to be coming into a few issues. The first of which I've seen about on the userecho which as the following:
    ErrorCap1.PNG
    I'm not to sure if they are both related or not...
    Another one seems to be with how the objects are rendered (All of which was fine before adding the Comp Mask)
    ErrorCap2.PNG
    As you can see from the top view the floor object is being rendered over the other two, and the bottom shows the positions in which they are.

    And to add clarity these are the nodes for the shader itself.
    ErrorCap3.PNG
    Anyway this is an awesome asset and thanks for making and continuing to work on it.
     
  22. Smokas

    Smokas

    Joined:
    Mar 7, 2016
    Posts:
    114
    Bought Shader Forge. No Node Browser Panel in editor. MacBook Retina Unity 5.4.
    It seems that is typical bug for many assets - IMO wrong screen coordinates calculation.
    Usually I fix that kind of problem by myself but Shader Forge comes without source code.
     
    Martin_H likes this.
  23. lparker

    lparker

    Joined:
    Apr 8, 2013
    Posts:
    30
    An update on this one, the errors shown in the first image have now been cleared in the latest update (1.28).

    I'm going to rewrite the shader from scratch to see where the issue pops up this afternoon.
     
  24. lparker

    lparker

    Joined:
    Apr 8, 2013
    Posts:
    30
    So I rewrote the shader and this seems to arise when I have linked up the Component Mask, or the Slider to the opacity. As far as I can see there isn't anything from the nodes that could be affecting it.

    I've attached some images of what I've found with the settings shown in the hopes that this might help with fixing the issue (if it is one in the code) or pointing me in the right direction.
     

    Attached Files:

  25. mangax

    mangax

    Joined:
    Jul 17, 2013
    Posts:
    336
    yes indeed , latest release shader forge doesn't open and shows errors, i hope it gets patched soon

     
  26. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,684
    I wouldn't expect Shader Forge to get patched for Unity 5.5 so long as it is in beta. The normal pattern for plugins is to wait for an official release of a Unity update, and then make the patch.
     
  27. Seith

    Seith

    Joined:
    Nov 3, 2012
    Posts:
    755
    Hi, does anyone know if it is possible in Shader Forge to identify UVs that are on the outer edge of a mesh UV shell?
     
  28. Acegikmo

    Acegikmo

    Joined:
    Jun 23, 2011
    Posts:
    1,294
    No, it's not really possible in any vert/frag shaders, possibly not even in any shaders.
    You'll have to add that data some other way, using vertex colors or similar
     
    Martin_H likes this.
  29. Seith

    Seith

    Joined:
    Nov 3, 2012
    Posts:
    755
    I see. Thanks! Can Shader Forge deal with multiple vertex color sets? Or just a unique one?
     
  30. Acegikmo

    Acegikmo

    Joined:
    Jun 23, 2011
    Posts:
    1,294
    Just one, though you can use data from UV0/UV1/UV2/UV3 as well
     
    Seith likes this.
  31. Mark_T

    Mark_T

    Joined:
    Apr 25, 2011
    Posts:
    303
    Does the latest Shader Forge version supports the new Unity 5.4 instancing features?
    Thanks.
     
  32. synapsemassage

    synapsemassage

    Joined:
    Jul 27, 2009
    Posts:
    334
    Minor bug that irritated me and made me download again: Shader forge window shows wrong version number in Unity, still shows 1.18 after updating to 1.28
     
  33. pahe

    pahe

    Joined:
    May 10, 2011
    Posts:
    543
    Hi.

    I'm playing around with some shader effects and I got now a problem where I don't know how it could work:

    Pics tell more than thousand words so here is my graph:

    AddNode_to_Vector2_to_UV.png

    I'm trying to get custom UVs into my texture sampler (in CG I would do:

    Code (CSharp):
    1.  
    2. float2 customUVs;
    3. customUVs.u = ...;
    4. customUVs.v = ...;
    5. float4 color = sampler2D(myTexture, customUVs);
    6.  
    As the vector2 node has no input channels, I'm not sure how I can build this with in SF. Am I missing something or can anyone tell me how to achieve that?

    Many thanks,
    Patrick


    PS: btw, SF is a pretty neat tool. Learned some much by just toying around with it.
     
  34. Acegikmo

    Acegikmo

    Joined:
    Jun 23, 2011
    Posts:
    1,294
    You're looking for the Append node
     
    pahe likes this.
  35. Acegikmo

    Acegikmo

    Joined:
    Jun 23, 2011
    Posts:
    1,294
  36. pahe

    pahe

    Joined:
    May 10, 2011
    Posts:
    543
    Wow, that was fast and works like a charm! Thank you!
     
  37. NAVAZA

    NAVAZA

    Joined:
    Feb 20, 2016
    Posts:
    7
    I'm trying to create a cartoony fog shader that emphasizes silhouettes.
    The idea is to color the world differently based on distance to the camera, but still keep high contrast between one layer and the next, instead of a soft gradient. Also, the change from one layer to another should not happen on an object's surface, since that would break its silhouette, but rather "around it" (I tried using ObjectPosition instead of WorldPosition for this, but I'm having no luck so far)

    Here are some examples:
    https://gyazo.com/9b1daa4a78936e083d9ac7599300acf6
    (Here, on the left, you can notice the high contrast between the different layers of buildings (I don't know how they did it). While on the right, it looks more like your common fog effect, which makes everything look flat and the same colour)

    https://gyazo.com/08f084d8f2e560bd756a9075654b0844
    (This one is 2D, but it shows what I'm trying to achieve in 3D. As you can see, each layer is a solid colour, instead of a gradient, and the objects are always on one layer or another, never in between)

    Any ideas on how to approach this?
     
  38. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    6,493
    The building is either lighting carefully placed or "fog" plane (billboard).

    Though maybe if you add a fog color per object distance to screen, maybe with a y bias that blend with the normal fog, and keep the terrain shader normally fog.

    something like (pseudo code):
    YBlend = distance(ObjectWorldPos.y, FragWorldPos.y)
    distFlatFog = distance(CamWorldPos, ObjectWorldPos)
    finalColor = c + Lerp(distFlatFog, fog, Yblend)
     
  39. MR_Fancy_Pants

    MR_Fancy_Pants

    Joined:
    Aug 21, 2014
    Posts:
    19
    Heya Joachim (or anyone else listening in) , just bought shaderforge (long overdue!) and I'm looking forward to explore shader creation YAY!

    Unfortunately I came across a problem with my first shader project. I'm working on an unlit shader that uses the lighting information as an opacity map. If a light shines on an object, the lit parts should be opaque and the shadowed parts transparent. Or at least that's what it's supposed to do. It works with a direct light, but with a point light it's completely transparent. Hope someone can give me some pointers! Thanks!





     
  40. kdm3d

    kdm3d

    Joined:
    Jul 20, 2012
    Posts:
    15
    Only thing I can think of is maybe multi-light is not set up in your shader settings?
     
  41. MR_Fancy_Pants

    MR_Fancy_Pants

    Joined:
    Aug 21, 2014
    Posts:
    19
    Hmm any idea what I should connect there?
     
  42. deab

    deab

    Joined:
    Aug 11, 2013
    Posts:
    93
    Is it possible to use [PerRendererData] in Shader Forge? Or would I need to compile the shader then add the tag manually to the generated code, and remember to add every time its compiled?
     
  43. kdm3d

    kdm3d

    Joined:
    Jul 20, 2012
    Posts:
    15
    Under light count, make sure Multi-light is selected. Not guaranteeing this will solve your problem, but only thing I can think of off the top of my head.

    LightingSettings.PNG
     
  44. MR_Fancy_Pants

    MR_Fancy_Pants

    Joined:
    Aug 21, 2014
    Posts:
    19
    Many thanks for the help. But unfortunately it was already selected :,(
     
  45. kdm3d

    kdm3d

    Joined:
    Jul 20, 2012
    Posts:
    15
    Does it have the same behavior in both forward and deferred rendering? Set those in your project settings to see if one works.

    Actually lets take this into the shader forge forum. so it has a dedicated thread. See you there!
     
    MR_Fancy_Pants likes this.
  46. Ga2Z

    Ga2Z

    Joined:
    Feb 16, 2012
    Posts:
    68
    That happened a few pages behind, this is the answer from Acegikmo: "Make sure you enable multiple lights under the shader's lighting settings, and make sure your project supports multiple pixel lights under the quality settings"

    You have the first part, meybe is the second that you have to check out :)
     
  47. JoelA

    JoelA

    Joined:
    Sep 16, 2016
    Posts:
    1
    Hey,
    So we are getting a NullReferenceException error on one of our shaders, It still works, we just can't open it in shader forge any longer, just opens to a blank window.

    Here's the error;


    upload_2016-9-16_17-42-33.png

    Other shaders are opening fine, we've not had a problem with shader forge except lately when we upgraded to 1.28.
     
  48. docsavage

    docsavage

    Joined:
    Jun 20, 2014
    Posts:
    1,021
    Hi @Acegikmo,

    Wonder if you can help me. I bought another asset off the store that is a really nice city scene. In it's construction they used shaderforge to make the materials. The user can change the colours to suit and get different looks. Only problem is the scene has a massive amount of draw calls now as all items have multiple materials on them. Even up to 16 a model.

    I've had shaderforge a while but not needed it for this game so have not had time to study it yet. I was wondering if there is a way of selecting those multiple materials and mapping and using shadorforge to combine them or at least reduce them. Basically creating a shader that takes these as its input and brings the draw calls down to decent levels.

    Sorry if this is an impossibilty. Shaders are totaly new to me and have been avoiding learning them for this first game.

    Thanks

    doc
     
  49. Jesus

    Jesus

    Joined:
    Jul 12, 2010
    Posts:
    502
    If all the materials are the same, or if some materials are shared across several buildings, you might be able to use Static Batching.
     
  50. GWiebe

    GWiebe

    Joined:
    Feb 25, 2015
    Posts:
    3
    With the new 5.5 beta and the feature of particles being able to send custom vertex data. Will you be adding the ability for us to access that data in shaderforge?