Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[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. JohnnyFactor

    JohnnyFactor

    Joined:
    May 18, 2018
    Posts:
    343
    In the image below, does it matter which node is attached to the albedo port if all I need is black? Is the node just cast to the proper format? Is there any advantage to using one over the other?

    nodes.jpg
     
  2. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,387
    Yes, ideally you want to avoid using a Color node(float4) for something you can define with a single float value. The color node(float4) is going to be cast to a float3 when you plug it into the Albedo input.

    You can see those casts directly in the wire. (CTRL W - W)

    upload_2021-6-18_11-7-59.png

    Int vlues are not so commonly used, go for float with most of your operations.
     
    Last edited: Jun 18, 2021
    JohnnyFactor likes this.
  3. drbatuira

    drbatuira

    Joined:
    May 4, 2020
    Posts:
    23
    Hello how are you?
    First, I loved the tool.
    I'm getting some warnings only when saving a simple shader did I do something wrong?

    (Unit 2021.1.11f + URP 11)
    upload_2021-6-19_20-51-24.png
     
  4. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,387

    Hey there, thanks for using it.

    Those warnings are mostly harmless, are you on a recent ASE version? If you extract our samples you'll need to save them in order to update them to your current URP version.
     
  5. castor76

    castor76

    Joined:
    Dec 5, 2011
    Posts:
    2,517
    I was just been wondering if there has been any progress on 2DRenderer URP 12 support? Unity 2021.2 just became beta, so I am eager to try it.
     
  6. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,387
    Hey there. Sorry, not yet. As you may know we don't support Alpha or Betas, once it's officially made available we'll make sure that it has parity with what Shader Graph provides.
     
  7. corjn

    corjn

    Joined:
    Feb 6, 2014
    Posts:
    168
    Hey there,
    I saw the Unity blog post for the release of Unity 2021.2 bêta, they just added a signed distance field baker tool, I tried it and it generates a sort of 3D texture, but is saved as a SDF.asset. Maybe it could be interesting to support it in amplify.
    Not a pro about signed distance fields here, but I guess it could help replicate the UE4 mesh distance field feature (very helpfull for mesh blending)
     
  8. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,387
    Hello!

    We don't support beta or alphas but, as soon as it's officially made available, we'll look into adding support for it as permitted by Unity.
     
    corjn likes this.
  9. drbatuira

    drbatuira

    Joined:
    May 4, 2020
    Posts:
    23
    Thanks for the feedback. It's complicated to be ignoring these alerts, despite being innocent, we created the habit of not paying attention, and later, having problems.
    It would be interesting to resolve or suppress them in the next update (I changed it locally, but it will be lost on the next climb)
     
  10. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,387
    But are they recurrent? If so then we could have a problem, what's your Unity and ASE version?

    No warnings should be present in normal ASE operation. The only warning you're likely keep seeing are the ones relating to the samples included; 2 options here, update them by saving or remove them from your project.
     
  11. drbatuira

    drbatuira

    Joined:
    May 4, 2020
    Posts:
    23
    Unity 2021.1.11f + URP 11.

    Whenever I save the shader, the error appears, I ended up not testing other functions like build, play, etc.
    As this is the Unity 2021 version, I will wait for your package to be updated to this version.

    Thanks.
     
  12. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,387
    That is not supposed to happen but, just to be clear, those are Warning not an Errors, none of this should prevent you from testing builds/play. Let's try to figure out why they keep appearing.

    Are you able to create new URP shaders? I'm wondering if something failed during the import process, removing the folder and re-importing could do it.
     
    Last edited: Jun 22, 2021
  13. drbatuira

    drbatuira

    Joined:
    May 4, 2020
    Posts:
    23
    Yes, they are just warnings, it is a peculiarity of me that I do not like warnings, good practices etc.

    I managed to create a basic shader, I didn't go too deep, the tool works correctly.

    Removed and inserted your package into a blank project, same "problem" (mere warnings, no real issues)

    For all who are reading: Worth the purchase, my comments are merely my annoyances, the tool works perfectly.
     
  14. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,387
    I think we can agree that excessive warnings are a problem but providing a warning when appropriate is a requirement, and a part of day to day development considered a good practice. I any case, let's not get too sidetracked here, I'm not advocating that you should ignore these warnings, I'm trying to understand what exactly is causing them to keep popping up on your end. At the same time I must be clear to other users reading this in assuring that if those warnings are specific to what I'm referring to, they should have no impact what so ever on the project, none of those files are included on actual builds.

    That said, and to get back to debugging the problem, there are expected warnings during import depending on version/renderer used, but they shouldn't keep being shown in normal operation. Since this question has been coming up recently, please allow me to elaborate not just for you but to anyone experiencing the same problem.

    Right off the bat, I'm seeing warnings during normal Unity shader use; this is before importing ASE.
    upload_2021-6-23_11-18-4.png

    upload_2021-6-23_11-19-37.png

    And so on.

    In your previous screenshot I see many of these warnings next to our own Template warnings. I'm going to clear this list and import ASE. I gave it a nice restart before importing, as expected Unity's own URP is still throwing warnings before ASE is imported.

    upload_2021-6-23_11-25-13.png

    After importing, I see the expected Template warnings; these templates are specific to the Built-in renderer. Gave it a restart and the warnings are gone, or just clear them; removing those templates is an option.

    upload_2021-6-23_11-28-54.png

    I imported the URP samples and as expected see a repeat of the template warnings above and warnings regarding the samples. SRP shaders must be compiled to your specific version, meaning that you will have to open and save them if you need to get rid of those specific sample warnings; the alternative being removing them from your project.

    After clearing the log, or restarting Unity, all related errors should be gone.

    upload_2021-6-23_11-35-24.png

    There is one event that could trigger our ASE and Unity's own warnings pop up again which is the SRP import process. The first time you open one of our URP samples, or trigger the URP Template import process by creating a new URP shader, Unity will reload and show the previous warnings; again, clearing this or restarting will get rid of them.

    In this specific setup, I'm seeing the Built-in Template Warnings along with Unity specific warnings when we create shaders. While we can't speak for the Unity specific warnings, we can look into possibly avoiding our own Template warnings.

    I'm going to pass this on to one of our developers for additional insight.

    To clarify, these Template warnings refer specifically to Legacy templates, they can be removed if you don't intend to use them. (Assets\AmplifyShaderEditor\Plugins\EditorResources\Templates\Legacy)

    And for additional clarification, you're still going to see warnings when you save but this is not specific to our editor.



    The same exact warnings would pop up when creating new empty Unity shaders without ASE on the project.



    While this will vary depending on Unity version and renderer used, it's important to examine each case in order to find the specific cause of the warnings. This is not an broad representation of the experience a user can have but it's important to keep it in mind when seeing these pop up.

    Ideally, we would of course also like to not see any warnings pop up; one of our developer will examine this specific Unity version further.
     
    drbatuira likes this.
  15. frozenmangotree

    frozenmangotree

    Joined:
    May 2, 2020
    Posts:
    14
    I bought amplify because I heard you can use it for 2d games as well sprites and ui images etc. But since I bought it, I've been have no luck in finding information and guides on how to get started with the 2D shaders or create anything 2D for that matter, can someone point me the right direction please?
     
  16. LaurynasLubys

    LaurynasLubys

    Joined:
    Mar 7, 2012
    Posts:
    80
    Hey, I want to do colour cut based on slider and local vertex position.

    Plan A:
    I need local vertex position, but Vertex Position returns values higher than 1. Is there a way to get normalized vertex positions for this purpose?

    Plan B:
    Other suggested method would be to use Remap node, but then user would need to set maximum length of object in order to know the scale for remapping. To avoid that, it would be nice to get the length of the object (e.g. between the lowest vert and the highest vert points), then input that to remap max input. Is there method for this?

    Thank you!
     
  17. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,387
    Hey there, thank you for your support.

    Unfortunately, there aren't many 2d specific resources to learn from; however, what you learn can be applied, for the most part, to 2d specific shaders. Renderer used is also a factor, we include a couple of shader types specific for 2d sprites but in URP you'll have to likely use the Experimental 2d shader type or any of the legacy compatible types.

    Check the following built-in renderer samples:
    UISpriteFX (multiple 2d effects)
    SimpleSprite
    SpriteMask
    MaskedUI
    SimpleUI



    Hey there!

    Check our built-in sample PositionCutoff, it does exactly what you're looking for.
     
  18. frozenmangotree

    frozenmangotree

    Joined:
    May 2, 2020
    Posts:
    14
    It's just very confusing because there's only one node for 2D, well two: the color and the offset node, most master nodes have like multiple nodes? So how do I make the adjustment?
     

    Attached Files:

    Last edited: Jun 25, 2021
  19. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,387
    Confusing in regards to any specific point? There aren't many 2d specific nodes because the regular nodes are also used to construct shaders for it, what's important is the shader type used so that you may access specific parameters using the Template Parameter node. Check the Built-in samples I recommended.


    Here's one of the samples I mentioned earlier, the Template Parameter node allows you to access the Sprite used directly and manipulate it in your shader. One less known fact, but Unity specific, is that the Tint value is accessed via Vertex Color; that's why you'll see that node quite a few times in our 2d shaders.

    upload_2021-6-25_10-40-52.png

    Did you perhaps expect other 2d related nodes? If so please elaborate on what exactly is your expectation there.

    Side question, why are you importing the LWRP Samples in that screenshot? LWRP has actually been discontinued by Unity.
     
  20. DGordon

    DGordon

    Joined:
    Dec 8, 2013
    Posts:
    648
    Any way to create a shader that uses POM (parallax occlusion map) for desktop / webgl and _no_ POM for mobile?

    I'm using BiRP.
     
  21. DGordon

    DGordon

    Joined:
    Dec 8, 2013
    Posts:
    648
    While I'm here ... what's the reason POM only takes a texture, and can't use anything generated from the shader? That would obviously be great for creating different weathering effects, etc.
     
  22. frozenmangotree

    frozenmangotree

    Joined:
    May 2, 2020
    Posts:
    14
    Yeah I imported that by accident. Lol. So I'm starting to get the hang of working with 2D but I'm wondering would you recommend me working with legacy when it comes to 2D sprites/UI etc or should I stick with the Universal(Experimental) 2D Lit and 2D Unlit? Because I see the samples you recommended I look at are all in legacy and I see they have nodes like Sprite Texture which automatically picks up the sprite texture for you, which I see isn't available in universal. Is legacy more catered towards 2D at this point in time? Lastly, most people say learning how to use Amplify with 3D will teach me the principles I need doing 2D with it, is this true, because my main focus is 2D here, but I'll learn 3D if it will help me improve? Thanks for all your help so far Ricardo.
     
  23. montyjack

    montyjack

    Joined:
    Jan 10, 2014
    Posts:
    43
    Hey I recently updated to the URP from Legacy. I switched the ForceShield shader to be a Universal / PBR shader and now it's stuck in the cyan "shader compiling" state - i.e. it's just blue and not finishing compiling. No errors to speak of. Any ideas?
     
    Last edited: Jun 27, 2021
  24. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,387
    Parallax Occlusion Mapping node, sample included. (SandPOM)

    Efficiency, that's how the technique is constructed, you can learn more about it on external sources: https://developer.nvidia.com/gpugem...pixel-displacement-mapping-distance-functions

    Got it, that button is a pain point, we need to make that clearer.

    I would definitely recommend the built-in renderer "legacy" shaders, it's a great way to get right into it without dealing with SRP quirks and configuration. Most samples are also currently specific to the built-in renderer; once you're ready, definitely jump to URP.

    Regarding the node not being available in URP, you can actually use the sprite/UI legacy shaders there; to a certain point, Unity has not updated those. However, you should definitely try the 2D Experimental shaders for additional effects.

    Side note on Experimental 2D Shaders, be sure that you name your textures according to Unity requirements; this is easily missed if you don't get a chance to check the URP Docs on this. upload_2021-6-28_10-35-35.png

    There are actually packages out there already using ASE for this kind of stuff: https://assetstore.unity.com/packages/vfx/shaders/sprite-shaders-ultimate-158988

    Yes, definitely "learn 3d", there's no specific distinction really, some differences here and there but the principle is the same.

    Hey,

    Sounds like something is causing Unity shader compilation to hang there, have you disabled asynchronous shader compilation? Is this a new project, any other cyan objects? (Project settings>editor>uncheck asynchronous shader compilation)

    Let us know!
     
  25. Medusa-Zenovka

    Medusa-Zenovka

    Joined:
    Oct 1, 2014
    Posts:
    29
    I am getting this error message repeatedly:
    Code (CSharp):
    1. Assertion failed on expression: 'didInsert'
    2. UnityEditor.EditorGUI:GradientField (UnityEngine.Rect,UnityEngine.Gradient)
    3. AmplifyShaderEditor.EditorGUIEx:GradientField (UnityEngine.Rect,UnityEngine.Gradient) (at Assets/_Plugins/AmplifyShaderEditor/Plugins/Editor/Nodes/Constants/GradientNode.cs:224)
    4. AmplifyShaderEditor.GradientNode:Draw (AmplifyShaderEditor.DrawInfo) (at Assets/_Plugins/AmplifyShaderEditor/Plugins/Editor/Nodes/Constants/GradientNode.cs:53)
    5. AmplifyShaderEditor.ParentGraph:Draw (AmplifyShaderEditor.DrawInfo) (at Assets/_Plugins/AmplifyShaderEditor/Plugins/Editor/Graphs/ParentGraph.cs:1421)
    6. AmplifyShaderEditor.AmplifyShaderEditorWindow:OnGUI () (at Assets/_Plugins/AmplifyShaderEditor/Plugins/Editor/Menu/AmplifyShaderEditorWindow.cs:4988)
    7. UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
    I use a gradient for my toon shader. Every time I save or the editor updates this message pops up. It doesn't seem to affect my project yet, but it is pretty annoying.
     
  26. ahnafnafee

    ahnafnafee

    Joined:
    May 18, 2020
    Posts:
    7
  27. Amplify_Ricardo

    Amplify_Ricardo

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

    From the description, it seems that there could be another script in your project conflicting with ASE; incorrect namespace usage related issues are usually to blame for this type of problems.

    -Can you replicate the error on a new project?
    -What else is on your console?


    I would recommend examining one of the basic Custom Lighting Shader Functions(double click to open), Blinn and Lambert. Shadow quality is a factor here, check your project and individual light parameters.
     
    ahnafnafee likes this.
  28. castor76

    castor76

    Joined:
    Dec 5, 2011
    Posts:
    2,517
    URP 12 2DRenderer Support would be appreciated.. :D (Nag, Nag)
     
  29. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,387
    Sorry, same reply as before, no alphas/betas/previews :p

    But yes, it would be cool, we're keeping an eye on it of course.
     
  30. ahnafnafee

    ahnafnafee

    Joined:
    May 18, 2020
    Posts:
    7
    So I tried the Blinn-Light node and hooked it to custom lighting. I still get the artifact but it's minimal now. Is there a way to completely blend them like regular lambert shading?

    Thank you!

    upload_2021-7-5_11-14-24.png
     
  31. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,387
    Glad to know it helps, be sure to examine the actual source if you have not as it can probably be adapted to your requirements.

    Have you tweaked the actual light and quality settings? This is a factor.

    PBR shaders handle light/shadows differently, hence why you don't have the same results with Custom Lighting. If you want to replicate that exact same smooth behavior you can try using the Standard Surface Light node; however this might limit your options depending on your requirements.

    http://wiki.amplify.pt/index.php?title=Unity_Products:Amplify_Shader_Editor/Standard_Surface_Light
     
    ahnafnafee likes this.
  32. ahnafnafee

    ahnafnafee

    Joined:
    May 18, 2020
    Posts:
    7
    The light settings are at default. I tried changing the bias but any kind of change was resulting in more jagged shadows. I'll try tweaking the base blinn-light node to see what else can be done, thank you!
     
  33. Medusa-Zenovka

    Medusa-Zenovka

    Joined:
    Oct 1, 2014
    Posts:
    29
    To reproduce the error:
    1. create a new project with ASE
    2. Open the canvas
    3. Create a Gradient node
     
  34. Cactus_on_Fire

    Cactus_on_Fire

    Joined:
    Aug 12, 2014
    Posts:
    675
    Is it possible to make a transparent shader that recieves shadows from other transparent objects? Transparent things cast shadows but I can't get them to recieve any shadows from other transparent meshes.
     
  35. Amplify_Ricardo

    Amplify_Ricardo

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

    From our tests, those steps alone do not result in the reported error.

    -Are you able to replicate it in a new project? If so, we would be happy to examine that project.
    -What else is on your console?



    Depends, if you're using Surface Shaders, our surface shader adds a custom shadow caster when on transparent blend mode which uses the alpha value on the shadow itself.In order for transparency not affect shadows, simply place a Static Switch using the UNITY_PASS_SHADOWCASTER keyword over the Opacity port and set its True port to 1. This way it forces always Alpha to 1 on the shadow caster pass.

     
    Last edited: Jul 8, 2021
  36. Cactus_on_Fire

    Cactus_on_Fire

    Joined:
    Aug 12, 2014
    Posts:
    675
    I tried those settings but I still don't get any shadows cast on the transparent particles. It only effects the transparent shadows on solid objects by making them fully opaque. Here's the oginial shader and with unity_pass_shadowcaster version.
    upload_2021-7-8_17-32-14.png
     
  37. Medusa-Zenovka

    Medusa-Zenovka

    Joined:
    Oct 1, 2014
    Posts:
    29
    How can I send you the project? I packed it into a zip file of about 180 mb. It would be just that project without any SRP etc. installed (unless URP on my main project is somehow affecting it) and only ASE as asset which is how I tested it.

    There were 2 errors, but both were pretty similar - almost identical at least to me. But just in case:

    Code (CSharp):
    1.  
    2. Assertion failed on expression: 'didInsert'
    3. UnityEditor.EditorGUILayout:GradientField (string,UnityEngine.Gradient,UnityEngine.GUILayoutOption[])
    4. AmplifyShaderEditor.EditorGUILayoutEx:GradientField (string,UnityEngine.Gradient,UnityEngine.GUILayoutOption[]) (at Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Constants/GradientNode.cs:209)
    5. AmplifyShaderEditor.GradientNode:DrawProperties () (at Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Constants/GradientNode.cs:43)
    6. AmplifyShaderEditor.NodeUtils:DrawPropertyGroup (bool&,string,AmplifyShaderEditor.NodeUtils/DrawPropertySection) (at Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/NodeUtils.cs:204)
    7. AmplifyShaderEditor.ParentNode:SafeDrawProperties () (at Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/ParentNode.cs:2236)
    8. AmplifyShaderEditor.NodeParametersWindow:Draw (UnityEngine.Rect,AmplifyShaderEditor.ParentNode,UnityEngine.Vector2,int,bool) (at Assets/AmplifyShaderEditor/Plugins/Editor/Menu/NodeParametersWindow.cs:148)
    9. AmplifyShaderEditor.AmplifyShaderEditorWindow:OnGUI () (at Assets/AmplifyShaderEditor/Plugins/Editor/Menu/AmplifyShaderEditorWindow.cs:5035)
    10. UnityEngine.GUIUtility:processEvent (int,intptr,bool&)
    11.  
    Code (CSharp):
    1.  
    2. Assertion failed on expression: 'didInsert'
    3. UnityEditor.EditorGUILayout:GradientField (string,UnityEngine.Gradient,UnityEngine.GUILayoutOption[])
    4. AmplifyShaderEditor.EditorGUILayoutEx:GradientField (string,UnityEngine.Gradient,UnityEngine.GUILayoutOption[]) (at Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Constants/GradientNode.cs:209)
    5. AmplifyShaderEditor.GradientNode:DrawProperties () (at Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Constants/GradientNode.cs:43)
    6. AmplifyShaderEditor.NodeUtils:DrawPropertyGroup (bool&,string,AmplifyShaderEditor.NodeUtils/DrawPropertySection) (at Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/NodeUtils.cs:204)
    7. AmplifyShaderEditor.ParentNode:SafeDrawProperties () (at Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/ParentNode.cs:2236)
    8. AmplifyShaderEditor.NodeParametersWindow:Draw (UnityEngine.Rect,AmplifyShaderEditor.ParentNode,UnityEngine.Vector2,int,bool) (at Assets/AmplifyShaderEditor/Plugins/Editor/Menu/NodeParametersWindow.cs:148)
    9. AmplifyShaderEditor.AmplifyShaderEditorWindow:OnGUI () (at Assets/AmplifyShaderEditor/Plugins/Editor/Menu/AmplifyShaderEditorWindow.cs:5035)
    10. UnityEngine.GUIUtility:processEvent (int,intptr,bool&)
    11.  
     
  38. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,387
    Hey there, please send the full new project, and please make sure the error is present before zipping.

    You can use something like WeTransfer, Google Drive or Or Dropbox, send it to support@amplify.pt

    Please do not post links to the project here.

    Thanks for preparing it.
     
  39. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,387
    Particles are a bit different, which Unity version are you using?

    I'm having some problems myself so I'll have to consult with the devs; not sure if this is specific to ASE.
     
  40. Cactus_on_Fire

    Cactus_on_Fire

    Joined:
    Aug 12, 2014
    Posts:
    675
    2019.1.5f1, standard 3D template.
     
  41. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,387
    Quick heads-up, we're seeing errors when accessing Unity's Gradient function, which we use on our own node, in Unity 2021.1.14. We have filed a bug report as this is not specific to our Editor, you can actually trigger it using Unity's own Trail component. https://i.imgur.com/i9HuqYZ.gif


    Code (CSharp):
    1. Assertion failed on expression: 'didInsert'
    2. UnityEditor.EditorGUILayout:GradientField (string,UnityEngine.Gradient,UnityEngine.GUILayoutOption[])
    3. AmplifyShaderEditor.EditorGUILayoutEx:GradientField (string,UnityEngine.Gradient,UnityEngine.GUILayoutOption[]) (at Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Constants/GradientNode.cs:209)
    4. AmplifyShaderEditor.GradientNode:DrawProperties () (at Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Constants/GradientNode.cs:43)
    5. AmplifyShaderEditor.NodeUtils:DrawPropertyGroup (bool&,string,AmplifyShaderEditor.NodeUtils/DrawPropertySection) (at Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/NodeUtils.cs:204)
    6. AmplifyShaderEditor.ParentNode:SafeDrawProperties () (at Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/ParentNode.cs:2236)
    7. AmplifyShaderEditor.NodeParametersWindow:Draw (UnityEngine.Rect,AmplifyShaderEditor.ParentNode,UnityEngine.Vector2,int,bool) (at Assets/AmplifyShaderEditor/Plugins/Editor/Menu/NodeParametersWindow.cs:148)
    8. AmplifyShaderEditor.AmplifyShaderEditorWindow:OnGUI () (at Assets/AmplifyShaderEditor/Plugins/Editor/Menu/AmplifyShaderEditorWindow.cs:5035)
    9. UnityEngine.GUIUtility:processEvent (int,intptr,bool&)
     
    Medusa-Zenovka and hopeful like this.
  42. moatdd

    moatdd

    Joined:
    Jan 13, 2013
    Posts:
    178
  43. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,387
    Likely just a preview difference, the result in the actual material should be exactly the same as this node accesses a specific Unity function. We'll double check on our end, what's connected to the Shader Graph input?

    Just to be clear, it's centered.
    upload_2021-7-12_10-23-21.png
     
  44. moatdd

    moatdd

    Joined:
    Jan 13, 2013
    Posts:
    178
    upload_2021-7-12_13-18-18.png
    whoa it's really drifting now. I have it hooked up to a normalmap texture node and am also using it for some baked GI stuff

    Maybe it has something to do with HDRI, or something to do with the fact I'm using this for a Linear color space project. I'm not really sure.
     
  45. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,387
    None of those should be a factor, please provide an example shader and we will compare it with SG but it's very unlikely that it's not working as expected on the actual material. The sooner we have additional details the faster one of our devs can check the preview for any issues.

    Can you please confirm what you were using here?

    upload_2021-7-12_18-30-32.png

    Thanks!
     
  46. moatdd

    moatdd

    Joined:
    Jan 13, 2013
    Posts:
    178
    Oh, sorry!
    Here you go!
    upload_2021-7-12_15-37-38.png
     
  47. moatdd

    moatdd

    Joined:
    Jan 13, 2013
    Posts:
    178
    The shader is working as expected ingame and in the scene views, and this is just a preview bug.

    Here's an orthographic screenshot of the shader.

    upload_2021-7-12_15-47-11.png
     
    Last edited: Jul 12, 2021
  48. moatdd

    moatdd

    Joined:
    Jan 13, 2013
    Posts:
    178
    here's a simple test shader
    upload_2021-7-12_15-45-15.png
     

    Attached Files:

  49. moatdd

    moatdd

    Joined:
    Jan 13, 2013
    Posts:
    178
    I don't know if this is a bug:

    upload_2021-7-12_18-51-58.png

    I'm using URP, created an SRP Additional Light and stuck it onto the output of an unlit shader, and then set up a cube with a point light to cast shadows aaaand....

    upload_2021-7-12_18-53-36.png

    The shadow map is acting really strangely, like the fragments are somehow reverse-shading.

    On closer, inspection, I get this:

    upload_2021-7-12_18-55-12.png

    Is the output of the SRP Additional light somehow encoded and I'm using it incorrectly? I can't find much information on how it works.

    My shadow depth and bias settings have an effect on the patterns that are being created, but when I look at the factory preset PBR shaders they don't have this issue, probably because they aren't using custom lighting.
     

    Attached Files:

    Last edited: Jul 13, 2021
  50. moatdd

    moatdd

    Joined:
    Jan 13, 2013
    Posts:
    178
    upload_2021-7-12_19-12-14.png
    actually never mind. even a blank PBR shader does this.

    upload_2021-7-12_19-12-43.png

    URP shadows are hot garbage when it comes to point lights