Search Unity

  1. Unity 2019.4 has been released.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice
  3. Ever participated in one our Game Jams? Want pointers on your project? Our Evangelists will be available on Friday to give feedback. Come share your games with us!
    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. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    2,862
    Alright so I guess the float 0 should be 1

    is this correct?
    upload_2020-6-30_19-16-1.png
    I'm getting no fade.
    http://paste.amplify.pt/view/raw/bedf4099

    oh wait, attaching it to the static switch then noodling with the settings i'm getting the same effect as before which is that it's doing a per pixel depth testing instead of a per object so I still see the inside of the object upload_2020-6-30_19-20-32.png
     
    Last edited: Jul 1, 2020 at 3:21 AM
  2. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    2,862
    bug: if you move the group box over other nodes, it'll capture the nodes.
    proper behavior should be move the node within the group box, the group box highlights denoting interaction and when dropped in the highlighted group box it now belongs to it
     
  3. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    1,681
    So you're referring to the actual darkness of the shadow, not the artifacts, got it. If you're using our default shader, there's a good chance that it's caused by something in your Lighting/Project settings, or scene configuration.

    I'll need a sample to examine the problem as I cannot debug it from our side.


    Don't know what else to recommend in this case, you can get the distance between the World Position and World Space Camera Position and use that to drive the Mask/Dither effect; it's not depth, it's actual distance, you have to adjust the properties depending on your objects or tweak the node network for what you actually want. Try Remapping the values.


    Does seem to be something happening there, I'll pass it on to our devs.

    Thanks!
     
    laurentlavigne likes this.
  4. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    1,681
    After examining the sample, it seems that the problem is related to the use of a light cookie. Light cookies work with Custom Lighting, we're not entirely sure what could this causing this issue. Notice that it's only areas in shadow that go full black when the cookie is set.

    One of our developers is going to debug it as soon as possible, thank you for the sample.
     
  5. illinar

    illinar

    Joined:
    Apr 6, 2011
    Posts:
    732
    Thank you. Sorry that the cookie didn't come to my mind immediately as a potential edge case and the cause of that issue.
     
  6. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    1,681
    No problem, it's an odd issue, our devs should be able to make sense of it.
     
  7. illinar

    illinar

    Joined:
    Apr 6, 2011
    Posts:
    732
    upload_2020-7-1_16-37-57.png

    I see that sharp shadows will still be an issue. The shadows on the custom lit B and C don't seem to mix with the object's lighting. On B the edge between self-cast shadow border and the dark side of the cube is very visible. So I tried to make the cube lighting gradient darker on C, but it doesn't help, it only makes the whole shadow way too dark, because, again it doesn't blend, it "adds" the cast shadow on top.

    Is it even possible to make the shadows to blend with custom shading?

    Best I could do is no bias:

    upload_2020-7-1_16-58-16.png

    But this adds more artifacts in the light area due to normal bias. And looks pretty bad still on the sphere.

    upload_2020-7-1_16-59-51.png

    I just want them to look like this:

    upload_2020-7-1_16-56-1.png

    (Received shadows disabled)
     
  8. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    1,681
    As I mentioned in one of my previous posts, the shadow quality is controlled in your project settings, or any of the shadow bias parameter; it's not specific to the shader. I would refer to the original post: https://forum.unity.com/threads/bes...er-creation-tool.430959/page-116#post-6038612

    However, Custom Lighing shaders will render those shadows differently, they are not using the the same technique as a regular PBR shader; use the Standard Surface Light node if you want to replicate that.
     
  9. Blanka

    Blanka

    Joined:
    Apr 15, 2013
    Posts:
    3
    Is there a way to do this in Amplify Shader?


    it's basically getting the distance to any other object. Sort of like a reverse Depth Fade Node.
     
  10. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    1,681
    Sure, there's even a Depth Fade node and Shield sample that does something along those lines.
     
  11. Amplify_Paulo

    Amplify_Paulo

    Joined:
    Jul 13, 2017
    Posts:
    295
    Hey all!

    New combined build uploaded to both our site ( http://amplify.pt/download/ ) and Unity Asset Store ( http://u3d.as/y3X )(should be up soon)
    Release Notes v1.8.2 rev 00 (since v1.8.1 rev 00)
    • New HDRP Template
      • Decal
    • New Shader Functions:
      • And
      • Or
      • Projection
      • Rejection
    • Improvements:
      • Added new port to 'Voronoi' node that outputs the UVs of the current voronoi cells
      • Added support for MRT for ColorMask, Blend and BlendOp in templates and template Options
      • AlphaToMask is now it's own separate module that can be activated independently and supports inline properties
      • Changed UV creation to support pre-calculated UVs in templates (ie: decals)
      • Improved URP and HDRP templates in order to minimize their CBUFFER contents
      • Updated libraries for SRP 7.3.1 and 7.4.1
      • Added more description text to custom expression node
      • Live update doesn't kick in when editing a field
      • Shader Functions options label size resize according to the panel width
      • Added AssemblyDefinition file and made it so nodes can be found in the main editor assembly besides ASE assembly
      • If you which to extend ASE with your own node and you already use your own assembly file you need to add ASE as a dependency
    • Fixes:
      • Fixed Texture Array Creator tool in order to properly allow signed and higher bit texture formats
      • Voronoi now properly creates UVs in all situations and preview was updated accordingly
      • Fixed issue with instance ID node not working correctly in URP due to templates not properly detecting the existing ones
      • Fixed issue with unused tessellation properties showing up in the shader inspector
      • Fixed issue with 'Reconstruct World Position From Depth' node that was preventing from compiling when used with 'Depth Fade' node
      • Fixed issue with 'Reconstruct World Position From Depth' node that wasn't working correctly in SRP 7.4.X and up
      • Fixed 'Texture Sample' node and 'Texel Size' node previews so that they update when it's referenced texture changes
      • Fixed issue with sampler states option not working if reference node was not compiled
      • Fixed issue with function nodes not saving their GUID correctly to the metadata
      • Fixed issue with function switch nodes not saving correctly when inputs were left unconnected
      • Fixed issue with reading options due to system cultural differences
      • Fixed issue where clipboard copy/pasting was not respecting system cultural differences
     
    syscrusher and Amplify_RnD_Rick like this.
  12. syscrusher

    syscrusher

    Joined:
    Jul 4, 2015
    Posts:
    1,037
    Hello, Amplify team

    I've been seeing the following editor console error when I open my project and occasionally other times (if I recall, entering and exiting play mode). The shader I'm working on has a custom template which may be causing the problem, but if you have any suggestions on where to look, I'd appreciate it. The key error alone doesn't tell me much because I don't know what key is failing.

    Code (csharp):
    1. KeyNotFoundException: The given key was not present in the dictionary.
    2. System.Collections.Generic.Dictionary`2[TKey,TValue].get_Item (TKey key) (at <fb001e01371b4adca20013e0ac763896>:0)
    3. AmplifyShaderEditor.TemplateHelperFunctions.CreateVertexDataList (System.String vertexData, System.String parametersBody) (at Assets/AmplifyShaderEditor/Plugins/Editor/Templates/TemplateHelperFunctions.cs:1845)
    4. AmplifyShaderEditor.TemplatePass.FetchVertexAndInterpData (AmplifyShaderEditor.TemplateMultiPass template, AmplifyShaderEditor.TemplateModulesData subShaderModule, System.Int32 offsetIdx, System.String body) (at Assets/AmplifyShaderEditor/Plugins/Editor/Templates/TemplatePass.cs:407)
    5. UnityEngine.Debug:LogException(Exception)
    6. AmplifyShaderEditor.TemplatePass:FetchVertexAndInterpData(TemplateMultiPass, TemplateModulesData, Int32, String) (at Assets/AmplifyShaderEditor/Plugins/Editor/Templates/TemplatePass.cs:413)
    7. AmplifyShaderEditor.TemplatePass:.ctor(TemplateMultiPass, TemplateSubShader, Int32, Int32, TemplateIdManager, String, Int32, TemplatePassInfo, Dictionary`2&) (at Assets/AmplifyShaderEditor/Plugins/Editor/Templates/TemplatePass.cs:134)
    8. AmplifyShaderEditor.TemplateSubShader:.ctor(TemplateMultiPass, Int32, TemplateIdManager, String, TemplateSubShaderInfo, Dictionary`2&) (at Assets/AmplifyShaderEditor/Plugins/Editor/Templates/TemplateSubShader.cs:90)
    9. AmplifyShaderEditor.TemplateMultiPass:LoadTemplateBody(String) (at Assets/AmplifyShaderEditor/Plugins/Editor/Templates/TemplateMultiPass.cs:260)
    10. AmplifyShaderEditor.TemplateMultiPass:Init(String, String, Boolean) (at Assets/AmplifyShaderEditor/Plugins/Editor/Templates/TemplateMultiPass.cs:90)
    11. AmplifyShaderEditor.TemplatesManager:CheckAndLoadTemplate(String) (at Assets/AmplifyShaderEditor/Plugins/Editor/Templates/TemplatesManager.cs:855)
    12. AmplifyShaderEditor.TemplatesManager:Init() (at Assets/AmplifyShaderEditor/Plugins/Editor/Templates/TemplatesManager.cs:639)
    13. AmplifyShaderEditor.TemplatesManager:OnEnable() (at Assets/AmplifyShaderEditor/Plugins/Editor/Templates/TemplatesManager.cs:871)
    14. UnityEngine.ScriptableObject:CreateInstance()
    15. AmplifyShaderEditor.TemplatePostProcessor:OnPostprocessAllAssets(String[], String[], String[], String[]) (at Assets/AmplifyShaderEditor/Plugins/Editor/Templates/TemplatePostProcessor.cs:35)
    16. UnityEditor.AssetPostprocessingInternal:PostprocessAllAssets(String[], String[], String[], String[], String[])
    My shader recompiles and works just fine. I get two repeats of this error plus another that's essentially the same thing except for the hexadecimal hash string in the exception log.

    Any suggestions what to look at, before I start inserting debug traces into ASE to see what key's being sought at that time?
     
  13. Blanka

    Blanka

    Joined:
    Apr 15, 2013
    Posts:
    3
    sure, but Depth Fade only works on the inside. I can't for example make an opaque sphere that does the same. It's almost like an Ambient Occlusion, or like how soft particles change transparency when near solid objects.
     
unityunity