Search Unity

[Best Tool Asset Store Award] Amplify Shader Editor - Node-based Shader Creation Tool

Discussion in 'Assets and Asset Store' started by Amplify_Ricardo, Sep 13, 2016.

  1. TheTalkingBoot

    TheTalkingBoot

    Joined:
    Nov 24, 2017
    Posts:
    36
    Thanks for your answer.

    I looked at the example, but the effect is planar like the clipping plane.
    I'm looking for something spherical, like the grass culling system.
    I try with distance blending but it didn't work, I can't control the start and stop point.
     
  2. FeastSC2

    FeastSC2

    Joined:
    Sep 30, 2016
    Posts:
    978
    Ah too bad. I'm very curious as to how distortion effects like in the video below would be tackled in Amplify. Is there a plan to create such a sample in the future?


    The mesh/trails left behind the sword to distort the background. I believe it's done with refraction but in the current samples there's just the bubble soap sample where you plug in a float in the refraction and that's it so I don't know how to recreate this and refraction only works if the plane doesn't completely face the camera I see, so maybe what I'm looking for is not refraction idk. (My game is 2D). Also modifying the refraction with a mask like a texture does nothing, what's going on with refraction!? ;)

    Any help on this is most welcome.
     
  3. Amplify_Borba

    Amplify_Borba

    Joined:
    Jul 24, 2017
    Posts:
    538
    We do have a SphereMask function included in the package that might help, but unfortunately I'm not entirely sure on what to suggest as I'm having trouble picturing the effect you wish to achieve.

    Could you provide further details on it, perhaps with the help of a screenshot or video, so that I may best help you?


    We have a few samples that can serve as a good starting point for the refraction effect, as you don't really need to make use of the refraction port to achieve it.

    The simplest way of doing so is using the Grab Screen Position and Grab Screen Color nodes as seen in the SimpleRefraction sample, but you can also check out the RefractedShadows sample as well for a slightly different setup.
     
  4. FeastSC2

    FeastSC2

    Joined:
    Sep 30, 2016
    Posts:
    978
    Thanks it's what I was looking for :) Glorious.
     
  5. jordantotty

    jordantotty

    Joined:
    Dec 15, 2011
    Posts:
    77
    Is there currently any way to create a terrain shader compatible with the HD Render Pipeline?
     
  6. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,389
    Not at the moment but it's definitely something we intend to tackle based on what Unity implements.
     
  7. julian-moschuering

    julian-moschuering

    Joined:
    Apr 15, 2014
    Posts:
    529
    Great tool with awesome extensibility!

    Do you plan to have full SamplerState/TextureXX support in the future?

    Features I'm interested in:
    * Defining a SamplerState and use it for sampling in shader. Have it as an additional optional input into the SampleTexture node. Unity's ShaderGraph does this pretty well.
    * Allow sampling methods of TextureXX objects, eg Gather & Cmp functions
     
  8. Amplify_Borba

    Amplify_Borba

    Joined:
    Jul 24, 2017
    Posts:
    538
    Hey Julian, thank you for the kind words, we're happy to know you're enjoying your time with ASE!

    Regarding your question, SamplerState / TextureXX is definitely something that's in our roadmap and that we hope to support in the future, so stay tuned!
     
    julian-moschuering likes this.
  9. TheTalkingBoot

    TheTalkingBoot

    Joined:
    Nov 24, 2017
    Posts:
    36
    SphericalDither.png
    The SphereMask was a good idea, it may be lacking in optimization but it works.
    Now, how can I use this effect on an object that already has its own Alpha?
     
  10. Amplify_Borba

    Amplify_Borba

    Joined:
    Jul 24, 2017
    Posts:
    538
    Good to know it helped! Could you please elaborate on what you're expecting to happen to objects that are already using alpha?
     
  11. Amplify_RnD_Rick

    Amplify_RnD_Rick

    Joined:
    Feb 15, 2016
    Posts:
    528
    Hey guys,

    We've just uploaded a new build into our website.

    Here are the release notes:
    Release Notes v1.5.6 rev 01:
    • Fixes:
      • Fixed issue with global variables on Property type nodes being ignored by Auto-Register toggle
      • Fixed Native Directives capture issue over templates
        • Fixed issues on adding duplicate directives if they are already natively on the template
      • Fixed compilation errors from Gamma/Linear nodes on SRP templates
      • Fixed ArgumentOutOfRangeException over file path on new shader creation
      • Fixed issues over Motion Vector pass on HD PBR template
      • Fixed issue on 'Light Color' node with HD templates
      • Fixed issue on 'World Space Light Dir' node with HD templates
      • Fixed issue on 'Object Space Light Dir' node with HD templates
    • Improvements:
      • Added support for Variable Mode over Texture Objects type nodes
      • Adding UI Widget helper for setting Render Type and Queue for templates
        • On SubShader Tags group, Value UI changes as soon as user writes RenderType or Queue on the Name textfield

    @ArchVizPRO is it possible for you to try this build out and check if the issues you reported over the HD template are fixed on your end.

    Happy shader creations!
     
  12. TheTalkingBoot

    TheTalkingBoot

    Joined:
    Nov 24, 2017
    Posts:
    36
    I finally found the solution, I had completely forgotten the existence of the node "Blend Operation"...
    just put it in "Darken" and it works!

    Thanks for taking the time to answer me, here is the result

    SphericalDitherAlphaBlend.png
     
  13. Amplify_Borba

    Amplify_Borba

    Joined:
    Jul 24, 2017
    Posts:
    538
    No problem, glad I was able to help, and thank you for letting us know that you were able to achieve the desired results!

    Keep up the good work!
     
  14. Gray_Master

    Gray_Master

    Joined:
    Jun 20, 2010
    Posts:
    152
  15. ifayad

    ifayad

    Joined:
    Jun 15, 2017
    Posts:
    24
    Hello
    @Amplify_RnD_Rick
    , Was the Parallax Offset node fixed for the HDRP ?

    Thanks in advance
     
  16. Amplify_Borba

    Amplify_Borba

    Joined:
    Jul 24, 2017
    Posts:
    538
    Hello, thank you for reporting these issues! Could you please send us a sample with the issue present, including the shader function asset and the cginc, so that we can debug it on our side? You can share it privately through support@amplify.pt.
     
  17. Amplify_RnD_Rick

    Amplify_RnD_Rick

    Joined:
    Feb 15, 2016
    Posts:
    528
    Hey ifayad,

    Unfortunately no. This node makes use of an internal Unity function (ParallaxOffset) which doesn't exist over the SRP libs, thus is throwing that error. We most likely will need to port that function over the new pipelines.

    Nevertheless this issue was registered and we will fix as soon as we can.

    Apologies for the inconvenience.
     
  18. ifayad

    ifayad

    Joined:
    Jun 15, 2017
    Posts:
    24
    Thank you for the prompt reply. Yes I thought so since it is in Unity's UnityCG.cginc.
     
  19. julian-moschuering

    julian-moschuering

    Joined:
    Apr 15, 2014
    Posts:
    529
    Could you please replace usage of unity_WorldToObject with UNITY_MATRIX_I_M and unity_ObjectToWorld with UNITY_MATRIX_M to make instancing work correctly with SRP?
     
  20. Amplify_Borba

    Amplify_Borba

    Joined:
    Jul 24, 2017
    Posts:
    538
    Hello, I'll be sure to pass this information to the developer for further consideration, thank you!


    Thanks, we'll look into it as soon as possible!
     
    brisingre likes this.
  21. julian-moschuering

    julian-moschuering

    Joined:
    Apr 15, 2014
    Posts:
    529
    Thank you! Do you prefer getting bug reports / feature request through a different channel?
     
  22. Amplify_Borba

    Amplify_Borba

    Joined:
    Jul 24, 2017
    Posts:
    538
    You may do so through our Forums or via this thread, however, we usually recommend getting in touch through email using support@amplify.pt, since you'll benefit from slightly faster response times and the possibility to share any projects or samples privately.

    Ultimately, its up to your preference, as we'll do our best to reach out to you as soon as possible!
     
  23. EscalatorSafe

    EscalatorSafe

    Joined:
    Apr 12, 2018
    Posts:
    21
    Hello!
    There appears to be a bug with the copy and paste functionality. When I select nodes and do Ctrl-C it just does a comment around those nodes. And when I Ctrl-V it pastes that comment, without the nodes inside. It appears to have happened after we updated to Unity 2018.3.0b2. I have just updated my amplify to the latest version and it still seems to do it.
    Thanks!
     
    brisingre likes this.
  24. Amplify_Borba

    Amplify_Borba

    Joined:
    Jul 24, 2017
    Posts:
    538
    Hello, apologies for the inconvenience but we are unable to officially support Unity Beta releases as some of their features are still in development, meaning that certain issues that occur are likely to be Unity related, so we recommend that you only use ASE with any of the official releases.

    That being said, we still appreciate the heads up, and I've taken this opportunity to test the reported issue on the latest official Unity release - 2018.2.9f1, with the latest ASE version - 1.5.6r2, but it seems to be working as expected.

    We'll be sure to keep an eye out for any similar issues for the next official releases.
     
  25. Amplify_RnD_Rick

    Amplify_RnD_Rick

    Joined:
    Feb 15, 2016
    Posts:
    528
    Hey guys,

    We've just uploaded a new build into our website.

    Here are the release notes.

    Release Notes v1.5.6 rev 03:
    • Fixes:
      • Fixed several shader functions issues
        • Fixed Undo issue when using directives textfields
        • Fixed issue of null references being set on directives list when loaded
        • Fixed directives not being correctly written on shader
        • Fixed incorrect Refraction port activation issue on Standard Surface Custom Lighting
        • Fixed issue on Property nodes with Auto-Register toggled on not being registered
      • Fixed cascaded shadows issue on HD PBR template
    • Improvements:
      • Minor update on 'Smoothstep' node ports behavior
      • Added preview to 'Swizzle' node

    Happy shader creations!
     
  26. Suzuka91

    Suzuka91

    Joined:
    May 7, 2014
    Posts:
    39
    Hi guys
    There is a little bug/weird thing I've never comented here but I always find very annoying.

    I'm only using one monitor, so I'm always "hiding" the canvas outside screen when I need to change something in the inspector or whatever (I preffer hiding it than close and open again all the shaders/materials I had opened).
    But, if you have one node selected when "hiding" the canvas, it moves according the distance you moved the canvas off screen.
    So I'm always rearranging the nodes when I forget to deselect them when hiding the canvas.

    I'm using the last version on the asset store

    I made a gif to show the behaviour, in case I am not explaining correctly


    Link: https://imgur.com/a/ommaLrr

    Thanks for all your hard work guys!
     
  27. Kevin-VFX

    Kevin-VFX

    Joined:
    Apr 17, 2016
    Posts:
    54
    I don't know if this has been fixed already, but in the LWRP I noticed that single pass stereo instancing wasn't rendering correctly. It's a simple fix of adding UNITY_VERTEX_OUTPUT_STEREO to the end of the GraphVertexOutput struct in the LightWeightSRPPBR template.
     
  28. dj_Ruska

    dj_Ruska

    Joined:
    Oct 23, 2015
    Posts:
    6
    I`m trying to make blend mesh with terrain shader. Several times I tried, but nothing. And finally it happened!

    What do you think about this? Now it is raw, but I would like to finish it. Make support for a standard terrain. Maybe it's better to do functions for ASE, so that you can blend any shader with terrain?
     
    Gray_Master likes this.
  29. Amplify_Borba

    Amplify_Borba

    Joined:
    Jul 24, 2017
    Posts:
    538
    Hello!

    This is a tricky issue that we've been aware of for a while and, unfortunately, we believe that there's not much that can be done in regards to it since it seems to be Unity related but we'll look into possible workarounds and will let you know if we come up with a viable fix. Thank you for taking the time to report it!


    Hey, thank you for the feedback! I'll pass this information along to the developer for further consideration!


    Hello and congratulations, the effect seems to be working very well!

    In regards to your question, I'm having trouble understanding what you mean, could you please elaborate?
    Do you want to create shader functions for your shader and to make it support Unity's standard terrain?
    Please note that shader functions allow you to setup a reusable function for your shader, so its up to users to decide whether they want to use them or not as they're an optional feature and not necessary for any sort of implementation.
     
  30. riba78

    riba78

    Joined:
    Feb 16, 2018
    Posts:
    33
    Well done. I really like it.
    I've a question about the part of the video related to Blender.
    How is Blender involved on the shader?
     
  31. dj_Ruska

    dj_Ruska

    Joined:
    Oct 23, 2015
    Posts:
    6
    Does not participate. I'm modeled all in blender. The shader now only works with meshes. Terrain is not supported.
     
  32. dj_Ruska

    dj_Ruska

    Joined:
    Oct 23, 2015
    Posts:
    6
    Sorry for my bad english - it`s google translator. To work the shader, additional pre-calculation are needed, and they do not work with the standard terrain. Not yet working. The shader is also quite complex, and if I give it to someone, hardly anyone will understand it. Therefore, I think to make functions that will be easy to use and with which my code will work. Maybe in the future I will post it on the asset store. Or to the ASE Community Nodes
     
  33. Amplify_Borba

    Amplify_Borba

    Joined:
    Jul 24, 2017
    Posts:
    538
    No problem, thank you for elaborating!

    In that sense, functions will be a great choice to help you organize your shaders and make them easier to interpret.
    You may also use the Register Local Var and Get Local Var nodes to help organize your node networks, together with commentary nodes, which you can create by pressing the 'C' key when having several nodes selected.

    We really appreciate that you're considering sharing your effect with the community, it would definitely help alot of other users! To do so, feel free to use our Contribution Form or, if you prefer, just reach us out through email at info@amplify.pt, thanks!
     
  34. CampbellFletcher

    CampbellFletcher

    Joined:
    Sep 28, 2017
    Posts:
    2
    Hello!

    I'm having a strange issue, I have unchecked the "cast shadows" box in the general tab of the output node, but the shader states in the inspector that it does cast shadows, and materials using this shader are indeed casting shadows. It's otherwise a default shader with a single color node plugged into albedo. changing the shader to other blend modes doesn't seem to make a difference.

    is this a bug or am i missing something? The shader is definitely updating changes correctly. I'm using unity 2018.2.

    EDIT: it looks like turning off "cast shadows" only works if you also turn off "receive shadows". is it possible to receive without casting?
     
    Last edited: Sep 29, 2018
  35. marcatore

    marcatore

    Joined:
    May 22, 2015
    Posts:
    160
    Hi guys,
    I'm trying to "convert" this Shadertoy shader https://www.shadertoy.com/view/MdfBRX following the video tutorials he did.
    In particural, I'm interested in the generation and animation of the rain drops.
    The video is here


    First of all I'd like to know if it's possible to always convert an hand written shader in an ASE shader because one thing I'm finding difficult to "translate" is the use of the variables.
    For example, I'm not able to create the rectangules with dots inside. I'm able to make just the dots but not more over...
    If you go to 9'38"
    you can see what I'd like to achieve as first steps.

    Custom expression node could be an useful node for this kind of complexity?

    Thanks in advance for any suggestion you can give me
     
    Bartolomeus755 likes this.
  36. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,389
    Hello,

    That's expected, if you want it to receive shadows without casting you can disable Cast Shadows in the actual Mesh Renderer parameters.

    Hello,

    Looks like an interesting tutorial, thank you for sharing it. Not being familiar with this specific example, I'm not sure that I can best advise you on the specific requirements, what exactly have you built so far? Please do elaborate on what specific calculations or values you're having trouble translating.

    Custom expression nodes are perfect to reduce network complexity when using advanced expressions, we recommend it.

    Most shaders can be converted to ASE, engine/platform specific features excluded. Some shaders may require additional scripting beyond the scope of our editor, this is common when the original shader uses built in features specific to the engine used.(e.g. Unique Custom Unreal nodes)

    Let me know if you have any additional questions, we would be happy to elaborate.
     
  37. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,389
    Hey there, you can do loops with a custom expression node.
     
  38. CampbellFletcher

    CampbellFletcher

    Joined:
    Sep 28, 2017
    Posts:
    2
    oh okay, thank you! :)
     
  39. ZaZy

    ZaZy

    Joined:
    Jan 14, 2015
    Posts:
    20
    Hi Amplify_Ricardo,

    On the topic of the custom expression node, I would like to report a few issues with the node that I have been too lazy to report until now:
    1. The Out qualifier is currently identical to the InOut qualifier in that it creates both an In port and an Out port
    2. Both the Out and InOut qualifiers don't rename the ports properly when changing the port name, only the In port name is changed
    3. When generating code, the node substitutes words in function names if those words match a port name, e.g MyEdgeLengthTessFunction() will be replaced with MyEdgeLength365Tess365Function() if ports are named 'EdgeLength' and 'Tess'
    4. The 'custom' type functionality for ports doesn't appear to work, the code generated only has a space where the type should be
    They can be worked around but are a bit of nuisance, hopefully the dev team can fix for a smoother experience with my favourite node.

    While I am at it I suppose I should request a feature I have been hoping to see for a while:
    • Re-sizable preview dropdown for the custom expression node that shows the code (like ShaderForge did)
    Thanks for your time and as always keep up the good work.
     
  40. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,389
    Hello,

    Thank you for your feedback, we really appreciate it. We're actually tackling a few related Custom Expression issues, I'll pass it on to our devs ASAP.

    We'll get back to you as soon as we have any relevant updates or comments.

    Thanks!
     
  41. lambofett

    lambofett

    Joined:
    Oct 29, 2015
    Posts:
    4
    Hey everyone!
    Over the past year and a half, I've been working on a new game that's using vertex offset and tesselation. We've been pretty successful with getting a really nice distance based tesselation for some snow in our game, but as all artists fear we're heading into the optimization phase of our game.

    So currently the tesselation is rendering on the lower end platforms, and id like to either do one of two things. ( please, feel free to point out a better way or call me crazy..but) Id like to either disable tesselation on lower end devices through a shader LOD, or tell the shader at runtime if it's on a platform that is junk, to disable the tesselation. I've noticed that tesselation is not necessarily a property that can be routed through a switch, but is multiple lines that are added in the code once enabled. I'm assuming that's because it's not easy to just disable and enable it. Does anyone know how we can either turn it off in a shader LOD, or have it be based around a bool, or create a fallback that is a dupe of the origonal shader but with it disabled..

    I've tried the shader LOD function in the properties section of the editor and It basically just changes the number. I had stupidly assumed that it has different iterations of the nodes based on the LOD, but that is definitely not how it works currently. Any help would be greatly apprecieated!
     
  42. marcatore

    marcatore

    Joined:
    May 22, 2015
    Posts:
    160
    At the moment I was able to go further and now I have this
    Animation Preview

    File Shader where I'm now

    I'd like to have a suggestion how to make this
    sin (time + sin(time +sin (time)*0.5))
    At moment I did like this but I'm not sure is correct. Do you confirm is correct?
    If I multiply by 0.5 the output of Time node is the same that use "scale" at 0.5?
     
    Last edited: Oct 2, 2018
  43. EscalatorSafe

    EscalatorSafe

    Joined:
    Apr 12, 2018
    Posts:
    21
    Hello!
    I know you're not officially supporting the betas, but just a heads up.
    I installed the 2018.3.0 b3 beta and I am on the latest version of amplify. When I open one shader or function it opens fine, then when I open a second shader or function it fails to open and then all shaders after fail to open, until I reset unity or my layout.

    Also looks like you have fixed the copy and paste problem I was having :)
    Thanks!
     
  44. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,389
    Hey there,

    Your best choice is to use a Fallback shader. Use the Shader LOD to force your application to fallback to the defined alternative.(defined in your shader under Fallback, you can select it by pressing the two arrows on the right)

    How you detect the lower end platforms is entirely up to you, it really depends on what you intend to target.

    I think you'll have to make a few adjustments, multiplying the output does not produce the same result has setting the Scale to 0.5. (referring to multiplying the actual sin output)




    Based on what we've gathered, we're going to have to eventually add a new type to allow for this type of functionality. For now we strongly recommend taking advantage of Custom Expressions as much as possible.

    Thanks for the heads up!

    We are aware of the issues, they should be corrected soon.
     
    Last edited: Oct 8, 2018
    brisingre likes this.
  45. TheTalkingBoot

    TheTalkingBoot

    Joined:
    Nov 24, 2017
    Posts:
    36
    Hello!
    I wanted to know if anyone knows how to do Stencil Buffer in Deferred rendering.
    With a hand-coded shader I know how to do it, but with AmplifyShader it doesn't work..
    Thanks!
     
  46. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,389
    Hey there,

    We could really use some additional information. Since Unity uses Stencil Buffers internally, this can be a bit problematic with Deferred. Are you using the Standard Surface shader type? What exactly do you do differently manually?

    Thanks!
     
  47. TheTalkingBoot

    TheTalkingBoot

    Joined:
    Nov 24, 2017
    Posts:
    36
    Yes I use the Standard shader type, manually I follow this instructions:
    https://docs.unity3d.com/Manual/SL-Stencil.html

    I'm trying to do a cross section shader.
     
  48. Deleted User

    Deleted User

    Guest

    I've run into a bit of an obstacle. I'm trying to grab the normal information stored in _CameraDepthTexture (before anyone asks, I modified the depthTextureMode to "DepthNormals" in a c# behavior to make sure they would be encoded). It looks like UnityCG.cginc has a function that would get me the normal I'm looking for called "DecodeDepthNormal", so based on how we're already sampling depth, I think it could be as simple as:
    Code (CSharp):
    1. float3 screenNormal = DecodeDepthNormal (_CameraDepthTexture,UNITY_PROJ_COORD(screenPos));
    That being said, I'm barely learning to write shaders and would hate to spend the time building my own custom node if someone else has already done it.

    So I guess I'm asking: am I re-inventing the wheel here, or would this be useful to anyone else?
     
  49. Amplify_Paulo

    Amplify_Paulo

    Joined:
    Jul 13, 2017
    Posts:
    297
    Custom expression node has changed quite a bit since the last time we tried looping through stuff, maybe some of the cases where it breaks are fixable, can you send me a case(s) where it behaves badly? Maybe we can improve that experience and make more digestible.

    I know the ideal case would be being able to generate the body of the loop inside the editor and not with a custom expression but that's a lot harder to solve and our focus isn't there yet. However, I'm here thinking to my buttons if it would be possible to create a loopable node with shader functions... they pretty much solve most of the input/output issues and then we would only need a special node to control the flow of the body. And that isn't too different to what we do with function switches. I dunno, just throwing ideas around, maybe I'm dreaming too high.
     
  50. TheTalkingBoot

    TheTalkingBoot

    Joined:
    Nov 24, 2017
    Posts:
    36
    I practically found the solution.
    Set Light Model to Custom Lighting and disable cast and receive shadows and it works.

    That it doesn't cast shadows dont' bother me but s there a trick to receive shadows?
    Maybe in Post processing?