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. Cactus_on_Fire

    Cactus_on_Fire

    Joined:
    Aug 12, 2014
    Posts:
    675
    Heya.

    How can I make the shader use the flipbook frame blending feature of the particle system? It doesn't soft transition between the frames by default like the normal unity particle material does.
     
  2. Kevin-VFX

    Kevin-VFX

    Joined:
    Apr 17, 2016
    Posts:
    54
    I would say that it's an oversight rather than out of the scope. Every other premutation of it is available. I managed to do it manually by editing the editor. Thanks though.
     
  3. Amplify_Support

    Amplify_Support

    Joined:
    Jul 19, 2013
    Posts:
    121
    Hey, thanks for using it!
    Ultimately, the complexity of the operations is the deciding factor; we don't have a set of "mobile shaders" we can direct you to. However, you are free to create your own shader template if needed.
    Do you have any specific in mind? Target platform is also a factor, you wont be able to use Tessellation on older devices for example, this is really specific to Unity and not our editor.
    But please do elaborate.


    What exactly are you using as a reference?

    Depends on how you're using this; is it something provided by Shader Graph? Please do elaborate, we're always on the lookout for additions to the editor.

    If you can, please reach out to support@amplify.pt with details on how exactly you're using it, or what you changed, and one of our developers will examine it directly. (pretty much first line support here, best take it to the devs)

    Also be sure to specific

    Thanks!
     
  4. Cactus_on_Fire

    Cactus_on_Fire

    Joined:
    Aug 12, 2014
    Posts:
    675
    I'm not sure what you mean. I have a texture I'm using with an ASE material that I'd like to work like the Unity's smooth transitioning flipbook animation material.
     
    Last edited: Apr 12, 2022
  5. JohnnyFactor

    JohnnyFactor

    Joined:
    May 18, 2018
    Posts:
    343
    Simple question I hope. Is there a way to change the order of nodes in the inspector without editing the shader file directly? I have a set of consecutive floats but they are all jumbled up in the inspector.
     
  6. l19920910

    l19920910

    Joined:
    Jan 4, 2020
    Posts:
    5
    How can I put screenPos calculation to the bottom of Vert part?
    There's some vertex offset after it and makes artifact for dither after.
     

    Attached Files:

  7. forgestudiosdevelopment

    forgestudiosdevelopment

    Joined:
    Nov 5, 2015
    Posts:
    1
    Hi all,
    I wanted to ask whether or not it's possible to sample the light textures generated by the 2d renderer.

    This has been possible with Shader Graph since URP 12 as they introduced a 2d light texture node.
    This is perfect for creating emissive shaders which wasn't possible before this in a simple way.
    Perhaps I am overlooking something, but I can't find a node that allows me to do this in ASE.

    Hope you can help out,
    Thanks!
     
  8. l19920910

    l19920910

    Joined:
    Jan 4, 2020
    Posts:
    5
    upload_2022-4-15_17-22-28.png

    And it does matrix transform twice
     
  9. Amplify_Support

    Amplify_Support

    Joined:
    Jul 19, 2013
    Posts:
    121
    Sorry, can you point me to that flipbook material/shader? Not really sure what you're referring to but would be happy to check it out.

    Depends, you can order it in the editor but ultimately this depends on the Shader GUI script used. (Will vary depending on shader and renderer used)

    Example: https://i.imgur.com/ld9MDou.gif

    It's accessible with a Texture Object node set to "Global" (_ShapeLightTexture0-3). Set your own UV's such as with the Grab Screen Position node.
    image(3).png

    The Vertex To Fragment node allows data to be calculated on the vertex function and transferred to the surface/fragment via interpolators. http://wiki.amplify.pt/index.php?title=Unity_Products:Amplify_Shader_Editor/Vertex_To_Fragment
     
  10. Cactus_on_Fire

    Cactus_on_Fire

    Joined:
    Aug 12, 2014
    Posts:
    675
    Particle > Standard Unlit
    There is an option you enable called flip-book frame blending that lerps from one frame to another so the flipbook animation transition looks smooth no matter how slow it is instead of looking choppy.
    upload_2022-4-15_16-19-1.png
     
  11. Bop4yH

    Bop4yH

    Joined:
    Dec 6, 2020
    Posts:
    1
    Hey, I download and open assets Shader Editor and Shader Pack. Next I open BaseScene and looked some errors. How can you see on screenshot. What can I do resolve this problem? Thanks
    Unity 2020.3.28.f1
    Shader Editor 1.8.9.035
    Shader Pack 1.0.3
    URP 10.8.1
     

    Attached Files:

  12. zeux-n00b

    zeux-n00b

    Joined:
    Nov 4, 2017
    Posts:
    73
    Hello!
    I need help to make background shader. Especially on rotating UV map along X Y Z axis or just elevating and heading.
    I made it in URP Shader Graph but i dont understand how to make it in Amplify Shader. Ill put a zipped file in URP Shader Graph here for compensate ti easier.
     

    Attached Files:

  13. Amplify_Support

    Amplify_Support

    Joined:
    Jul 19, 2013
    Posts:
    121
    Ah, I see. I don't have an example for that specifically(would require examining that code) but perhaps this cool tutorial from the great PolyToots can help. (similar effect on the shader side)
    Just to clarify, that does follow under custom features available on the Unity shader, our template does not provide it out of the box.



    That's odd, is it just that particular URP material or does this happen on all URP samples?
    (we'll check it out on our side as well)

    Hey, what exactly are you having difficulty translating to ASE?
    Perhaps we can help over Discord: https://discord.gg/zVdqVSp
     
  14. Cactus_on_Fire

    Cactus_on_Fire

    Joined:
    Aug 12, 2014
    Posts:
    675
    That's pretty helpful thanks.
     
    Amplify_Support likes this.
  15. Foor1o

    Foor1o

    Joined:
    Jan 5, 2017
    Posts:
    5
    Hi,
    I wanted to ask how to stream position, and center from particle system to shader? Like in this simple example I want to offset vertices along some value, but instead of scaling object independently, a whole particle system is scaling up. There are plenty of examples how to add custom attributes, but neither is about position.
    upload_2022-4-25_13-43-41.png
     

    Attached Files:

  16. Amplify_Support

    Amplify_Support

    Joined:
    Jul 19, 2013
    Posts:
    121

    I saw via email that you found a solution, let's try to not duplicate questions in different places. Discord is the best place to ask the community, for actual editor tech support you can always ping us at support@amplify.pt.
     
    Foor1o likes this.
  17. EGNIGAR

    EGNIGAR

    Joined:
    Feb 3, 2014
    Posts:
    1

    Has anyone found a solution for this? I am having the same issue.
     
  18. plippuner

    plippuner

    Joined:
    May 16, 2018
    Posts:
    6
    I posted this question on the Amplify Discord last week but was then on other jobs.

    We have a project we recently updated to Unity 2021.3.1 LTS with the Universal Renderpipeline. The Project had Amplify installed for some time now, and everything works fine. Since the update, we can't work on the shaders anymore, because Amplify can't find the shader templates anymore.

    Screenshot:
    upload_2022-5-4_10-25-38.png


    We tried the following
    • Updating Amplify to the most recent version
    • Deinstalling Amplify and reinstalling it via package manager. Reimporting the URP Samples
    • Deinstalling Amplify and reinstalling it via the unity package on the Amplify website
    I also created a new and empty project. Here everything works fine.

    We get the following error:
    Code (CSharp):
    1. NullReferenceException: Object reference not set to an instance of an object
    2. AmplifyShaderEditor.TemplateMultiPassMasterNode.CheckLegacyCustomInspectors () (at Assets/AmplifyShaderEditor/Plugins/Editor/Templates/TemplateMultiPassMasterNode.cs:3233)
    3. AmplifyShaderEditor.TemplateMultiPassMasterNode.ReadFromString (System.String[]& nodeParams) (at Assets/AmplifyShaderEditor/Plugins/Editor/Templates/TemplateMultiPassMasterNode.cs:3227)
    4. AmplifyShaderEditor.AmplifyShaderEditorWindow.LoadFromDisk (System.String pathname, AmplifyShaderFunction shaderFunction) (at Assets/AmplifyShaderEditor/Plugins/Editor/Menu/AmplifyShaderEditorWindow.cs:4459)
    5. UnityEngine.Debug:LogException(Exception, Object)
    6. AmplifyShaderEditor.AmplifyShaderEditorWindow:LoadFromDisk(String, AmplifyShaderFunction) (at Assets/AmplifyShaderEditor/Plugins/Editor/Menu/AmplifyShaderEditorWindow.cs:4473)
    7. AmplifyShaderEditor.AmplifyShaderEditorWindow:LoadDroppedObject(Boolean, Shader, Material, AmplifyShaderFunction) (at Assets/AmplifyShaderEditor/Plugins/Editor/Menu/AmplifyShaderEditorWindow.cs:3030)
    8. AmplifyShaderEditor.AmplifyShaderEditorWindow:LoadObject(Object) (at Assets/AmplifyShaderEditor/Plugins/Editor/Menu/AmplifyShaderEditorWindow.cs:1470)
    9. AmplifyShaderEditor.AmplifyShaderEditorWindow:OnEmptyGraphDetected(ParentGraph) (at Assets/AmplifyShaderEditor/Plugins/Editor/Menu/AmplifyShaderEditorWindow.cs:5768)
    10. AmplifyShaderEditor.ParentGraph:Draw(DrawInfo) (at Assets/AmplifyShaderEditor/Plugins/Editor/Graphs/ParentGraph.cs:1120)
    11. AmplifyShaderEditor.AmplifyShaderEditorWindow:OnGUI() (at Assets/AmplifyShaderEditor/Plugins/Editor/Menu/AmplifyShaderEditorWindow.cs:5043)
    12. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
     
  19. plippuner

    plippuner

    Joined:
    May 16, 2018
    Posts:
    6
    The above mentioned issue is resolved - I had to manually reinstall the URP Templates
     
  20. Amplify_Support

    Amplify_Support

    Joined:
    Jul 19, 2013
    Posts:
    121
    Depends, do you not see the same result with a Shader Graph Unlit shader?
    What's the current Unity version?



    Disable the SRP Template Auto Import(we need to correct this for the latest version) and import the templates manually.
    upload_2022-5-7_12-8-31.png
    upload_2022-5-7_12-10-51.png
     
  21. ethanicus

    ethanicus

    Joined:
    Aug 24, 2015
    Posts:
    40
    Hey, so I have an issue.

    When using the inverse-hull method to create an outline effect, you have to have smooth shaded vertex normals or else you'll get gaps in the outline mesh. The only real ways around this are to either use the scale method (which doesn't really work for many situations), or to use smooth shading on the model.

    The thing is that for some objects I obviously don't want smooth shading, such as cubes or the tops of cylinders. I'm wondering if there's some way to either:
    • Smooth the normals in ASE
    • Un-smooth the normals in ASE
    I'm aware there's some method involving baking the smoothed normals into the vertex colors, but I actually want to use the vertex colors for the purposes of selectively enabling and disabling the outline effect. Is there any solution to this, like some ability to average out the vertex normals, or am I just going to have to find another way?
     
  22. ratking

    ratking

    Joined:
    Feb 24, 2010
    Posts:
    350
    There is also UV2, UV3, and so on, you might want to use that.
     
  23. ethanicus

    ethanicus

    Joined:
    Aug 24, 2015
    Posts:
    40
    Can ASE access different vertex color UVs? I saw no such options from my searching.
     
  24. ratking

    ratking

    Joined:
    Feb 24, 2010
    Posts:
    350
    Vertex colors and UV sets are different things. Usually UVs are float2 while vertex colors are float3. Both are interpolated.

    Screenshot_2.jpg

    So you could use UV3.x for enabling/disabling info, instead of the vertex colors.
     
  25. ethanicus

    ethanicus

    Joined:
    Aug 24, 2015
    Posts:
    40
    I think I misspoke, I read somewhere that you can have multiple vertex colors through UV sets, but ASE can't seem to choose between them. That info could be incorrect though.

    Can you explain this process? Are you suggesting to use a texture on UV set 3? I feel like I'm uninformed about some of these technical details.

    Or are you actually suggesting I somehow use the literal UV coordinates from UV3 as data? If so I'm not sure how I'd accomplish that from Blender or however I should do that.

    EDIT: Using the script from here, I've managed to bake smoothed normals into the vertex colors right from within Unity. This still leaves the issue of figuring out selective outlining, but at least now I can shade how I like and still have clean, connected outlines.
     
    Last edited: May 13, 2022
  26. EmeralLotus

    EmeralLotus

    Joined:
    Aug 10, 2012
    Posts:
    1,462
  27. o1o101

    o1o101

    Joined:
    Jan 19, 2014
    Posts:
    639
    Hey, anyway to grab the light cookie texture / transformation in URP Unlit / custom lighting?

    Edit: Got it working, for anyone in the future looking for this, do this in a custom function, and add the include file, float3 out, multiply it by your light. "#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/LightCookie/LightCookie.hlsl"
    Code (CSharp):
    1.  SampleMainLightCookie(positionWS);
    2. return SampleMainLightCookie(positionWS);
     
    Last edited: May 22, 2022
  28. TheGonzoGamer

    TheGonzoGamer

    Joined:
    Apr 24, 2019
    Posts:
    35
    I need assistance in adding alpha cutoff to the albedo texture in my shader.
    I created my own shader using the online docs for ASE and it works beautifully. Now I need to add the ability to adjust where (between full black and full white) transparency kicks in.

    I apologize in advance if I'm describing it incorrectly or if this is a simple task. I'm not very good at shaders. Thank you in advance!
     
  29. SuperDanOsbourne

    SuperDanOsbourne

    Joined:
    Oct 3, 2017
    Posts:
    46
    Hi, I'm kind of new to the Shader Editor and I'm wondering if there is a DDXY node. I just can't seem to find it if it's there. Any help with this would really be appreciated. Thanks!

    Edit: I guess FWidth works the same?
     
    Last edited: May 22, 2022
  30. TheGonzoGamer

    TheGonzoGamer

    Joined:
    Apr 24, 2019
    Posts:
    35
    Is ASE abandoned?
     
  31. SunnySunshine

    SunnySunshine

    Joined:
    May 18, 2009
    Posts:
    976
    @Amplify_Support

    Hi there,

    I'm wondering how you're supposed to write your own motion vectors in an ASE shader. When enabling the motion vector option and precomputed velocity, there is no output for velocity. Compared to Shader Graph, when adding custom motion vectors you get a specific output for it in the vertex shader.

    All the best.
     
  32. cajphrase

    cajphrase

    Joined:
    Apr 24, 2021
    Posts:
    12
    Hi, it looks like I've discovered an issue with ASE. I need to get an InstanceID with the 'SV semantic' turned on in the vertex shader stage, but when this is connected it doesn't compile with the following error message:

    Shader error in 'InstanceIDTest': 'VertexFunction': no matching 1 parameter function at line 433 (on d3d11)

    Connecting the InstanceID node in the vertex stage with 'SV semantic' off works fine, and when connecting the node in the fragment stage with it can be toggled on and off with no issues.
     

    Attached Files:

  33. SunnySunshine

    SunnySunshine

    Joined:
    May 18, 2009
    Posts:
    976
    Hi,

    I have this very strange problem with ASE shader:

    d9dea07643cdab7e185d5ff13d6dcd99.gif

    Here, the cube is rendered with default HDRP/Lit material. Sphere is rendered with completely blank HD/Lit ASE shader. AO is from HBAO asset. When changing the material on sphere to blank Shader graph shader, the problem goes away.
     
  34. Amplify_Support

    Amplify_Support

    Joined:
    Jul 19, 2013
    Posts:
    121
    Sorry, this is not specific to ASE so there aren't many solutions we can provide here. Consider using a Image Effect based solution.


    Anything baked into UV channels must be accessed with the Vertex or Texture Coord node; this is not specific to ASE.
    https://wiki.amplify.pt/index.php?title=Unity_Products:Amplify_Shader_Editor/Vertex_TexCoord
    https://wiki.amplify.pt/index.php?title=Unity_Products:Amplify_Shader_Editor/Texture_Coordinates


    Please don't be "that person" just because you didn't get an immediate reply to what you asked.

    To answer your question, please post an example shot of the shader you're using; we need details before recommending anything.

    For quicker questions/chatting, use our Discord server: https://discord.gg/zVdqVSp

    DDX and DDY nodes are available; you can can always use a Custom Expression if that's not what you're looking for.

    Depends, can you show us what you're referring to on the Shader Graph side?

    Thanks!

    We'll double check this as it was a recent addition. (we'll get back yo you)


    That's odd! I'm assuming you're using an ASE opaque material, we'll have to test it.

    Please let us know what's your current Unity and ASE version.

    Thanks!
     
    SunnySunshine likes this.
  35. SunnySunshine

    SunnySunshine

    Joined:
    May 18, 2009
    Posts:
    976
    b251ed41c5981089be1e28860c1d4967.png

    Yes, it's an opaque ASE material with default settings for a HD/Lit shader.

    Unity 2021.3.3f1.180
    ASE 1.8.9r35

    Thank you for looking into this!
     
  36. SunnySunshine

    SunnySunshine

    Joined:
    May 18, 2009
    Posts:
    976
    I also have a feature request - being able to set the normal space for the normals! I think right now it always assumes tangent space.
     
  37. SunnySunshine

    SunnySunshine

    Joined:
    May 18, 2009
    Posts:
    976
    Found a bug with Depth Offset.

    b5cb906d504bb083d7dc10c50ca21c77.png

    Unity 2021.3.3f1.180
    ASE 1.8.9r35

    All the best.
     
  38. zackblack

    zackblack

    Joined:
    May 17, 2015
    Posts:
    76
    Hello,
    I have a simple sprite shader that is ignoring white pixels using the Compare node. Problem is, it ignores other colors that are "close to" white. Is there some way to adjust the precision or achieve the required results a different way? Thanks in advance!
     
  39. SunnySunshine

    SunnySunshine

    Joined:
    May 18, 2009
    Posts:
    976
    Was the POM decal issue ever fixed? I'm having trouble getting it to work:

    de0cfb3462d6ba704fc7597f726d054c.gif

    This is the graph (does not work):

    065b05e63800d77c44c55770da2e7d92.png

    Equivalent shader graph (works):

    6a342b83aae94ce3189e22e0aaa80903.png
     
  40. Amplify_Support

    Amplify_Support

    Joined:
    Jul 19, 2013
    Posts:
    121
  41. SunnySunshine

    SunnySunshine

    Joined:
    May 18, 2009
    Posts:
    976
  42. knas01

    knas01

    Joined:
    Feb 24, 2018
    Posts:
    236
    I've looked at the skybox example and what I want to do is, instead of sampling a texture, I want to sample a specific realtime reflection probe. How can I do this in built in renderer?
     
  43. cybie

    cybie

    Joined:
    Sep 17, 2010
    Posts:
    91
    Hi, I am using Built-in Shaders. How can I have the shadow render differently to main shader? For example, I have a shader which use Dithering for transparency effect, but I want the shadow it casts to be solid, and not with holes.

    Thanks
     
  44. SunnySunshine

    SunnySunshine

    Joined:
    May 18, 2009
    Posts:
    976
    I might be wrong but I think I remember "Rendering Options > Use Default Shadow Caster" does this if you check it. Otherwise, you can always add a static switch for the "UNITY_PASS_SHADOWCASTER" #define and have it affect the dithering differently.
     
  45. SunnySunshine

    SunnySunshine

    Joined:
    May 18, 2009
    Posts:
    976
    Actually, I think you have to edit the resulting shader manually and remove the "addshadow" pragma if you use the first approach (use default shadow caster).
     
  46. cybie

    cybie

    Joined:
    Sep 17, 2010
    Posts:
    91
    Thanks, being new to Amplify, can you walk me through the detail a bit? With the second approach, I know how to add static switch, but the rest is not clear to me.
     
  47. crowmaster

    crowmaster

    Joined:
    Jul 6, 2012
    Posts:
    83
    I want to create Amplify shader from editor script. Is this possible?
     
  48. mjako64

    mjako64

    Joined:
    Feb 9, 2017
    Posts:
    9
    Hi there,

    I'm having an issue with normal map blending. I created a shader with a trim sheet normal map mapped to UV1 and a detail normal map on UV3, which works out great except that the swizzle of the detail normal seems to be affected by the UV1 coordinates

    Here are the broken normals:
    F40DkEn2uZ.png

    I checked and double-checked that the normal map is set up correctly, and then I discovered if I went and rotated this area in UV1 180 degrees, the normals were fixed:
    fmiKhE0rIz.png

    I'm a little confused by that because these are tangent-space normal maps and I thought the rotation of a UV shouldn't actually have any effect on the shading. Here's my node setup:
    kKJBz54utx.png

    And the UV1 mapping (mapped to an empty area on the trim sheet):

    blender_9n5UEJFvgs.png

    Appreciate any and all help. Thanks!
     
  49. SunnySunshine

    SunnySunshine

    Joined:
    May 18, 2009
    Posts:
    976
    88663adeec566a1fe945fb5a1d26351d.png

    @mjako64

    You can't rotate a tangent space map w/o affecting the lighting.

    I'm wondering if one of those maps has incorrect DirectX vs OpenGL normals? Have you tried multiplying the Y-channel with -1 before blending the normals? Or just invert the green channel with levels in photoshop.
     
  50. mjako64

    mjako64

    Joined:
    Feb 9, 2017
    Posts:
    9
    Thanks for replying. That was my first guess as well, but both maps are +Y so that can't be it.
    I should've specified, I didn't rotate the normal map, I rotated the UVs in UV1 and the normal map that uses UV1 is completely flat there.