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

    Anhorse

    Joined:
    Mar 23, 2020
    Posts:
    3
    Hi, I just wanted to ask if anyone else is experiencing the Grab Screen Color node flipping the image vertically when played on the Steam Deck? The node behaves as expected on PC and Mac.
     
  2. marcrem

    marcrem

    Joined:
    Oct 13, 2016
    Posts:
    340

    I fixed my issue. here:


    I changed the custom editor to UnityEditor.ShaderGraphLitGUI, and it works!
     
  3. Amplify_Support

    Amplify_Support

    Joined:
    Jul 19, 2013
    Posts:
    121
    Not something we've seen before. (We know of multiple projects working fine on the Steam Deck)
    Please feel free to send a sample to support@amplify.pt.
     
  4. jingato

    jingato

    Joined:
    Jun 23, 2010
    Posts:
    299
    Hi. I am using Amplify and it is an amazing tool, but I just have a few questions.

    1) is it possible to customize the keyboard button used for panning? Q is kind of awkward and coming from using shadergraph, I am used to using alt.

    2) Is it possible to make any shaders using a specific function rebuild whenever I save a shader function? I always have to manually open every shader using it and save them. If the tool doesn't support it, is it possible for me to query the shader from script to see if it uses a specific shader function?
     
  5. Amplify_Support

    Amplify_Support

    Joined:
    Jul 19, 2013
    Posts:
    121
    Hello, thanks for using it!

    1. No, you'd need to change the code. You're using a trackpad?
    2. Select the Shader Function file, there's an option on its inspector to Search for and Save All shaders that use it.
     
  6. jingato

    jingato

    Joined:
    Jun 23, 2010
    Posts:
    299
    Yeah, trackpad. Cool, I missed that button. That's super helpful! Thanks.
     
    Amplify_Support likes this.
  7. theinlein

    theinlein

    Joined:
    May 29, 2021
    Posts:
    4
    Very impressed with Amplify Shader Editor so far! One main thing is keeping me from using it, however: I'm developing for VR, and there doesn't seem to be an option in the Billboard node to toggle the billboard to face the camera position (instead of camera orientation). Having the billboards rotate when the user moves their head around while in the same location is definitely not a desirable outcome. Am I missing something, or is there no option to toggle between facing camera orientation and facing camera position? Or is there some other simple solution I'm missing. Thank you!
     
    Last edited: Sep 11, 2022
    tspk91 likes this.
  8. WayneJuckts

    WayneJuckts

    Joined:
    Feb 23, 2015
    Posts:
    2
    Hi, i have following issue:
    I am trying to bake shadows with an URP opaque shader that uses alpha clipping. Somehow, a shadow is rendered for my transparent areas - the alpha clip threshold is getting ignored for the shadow baking.
    The default unity URP shader doesn't have this issue.
    I've tried multiple settings, like setting the subshader rendertype to "transparent cutout", but nothing seems to work.
    Any idea how to fix this, or if this is even pssible with amplify?
    shaderShadow.png
     
  9. Amplify_Support

    Amplify_Support

    Joined:
    Jul 19, 2013
    Posts:
    121
    Thanks for using it!

    This one is trickier than it sound. You attempt to integrate your own system via Templates or Custom Expression nodes as we do not currently offer an option for this.

    Hey there, is this with the Unity light baker or third party?

    You may need to rename your albedo to _MainTex or enable "double sided GI" in your material.
     
  10. jingato

    jingato

    Joined:
    Jun 23, 2010
    Posts:
    299
    Hey, I was hoping you could help me out with a shader I am working on with your tool. The shader itself is complete, however, I get some really strange shimmering effect when viewed on the Oculus Quest 2 which I don't get in the editor. I found this document which suggests doing a multisample of the surrounding pixels in order to alleviate the issue. However, my shader does not use a texture. It uses the noise generation node which I multiply with a color and then also plug that into generating the normal map.

    The page suggests doing the following

    Code (CSharp):
    1. fixed4 tex2Dmultisample(sampler2D tex, float2 uv)
    2. {
    3.     float2 dx = ddx(uv) * 0.25;
    4.     float2 dy = ddy(uv) * 0.25;
    5.  
    6.     float4 sample0 = tex2D(tex, uv + dx + dy);
    7.     float4 sample1 = tex2D(tex, uv + dx - dy);
    8.     float4 sample2 = tex2D(tex, uv - dx + dy);
    9.     float4 sample3 = tex2D(tex, uv - dx - dy);
    10.      
    11.     return (sample0 + sample1 + sample2 + sample3) * 0.25;
    12. }
    Do you know if this can be done similarly in the Amplify tool and with the result of the noise generation node? I found a couple of nodes that looked like they had potential. There was the DDXand DDYnodes, but I'm not quite sure how I would use them. I also found the Bicubic Sample node, but that only seemed work with textures.

    As a last resort, if there is no option, I figured I might try rendering the result to a render texture and enabling mip maps on that.


    Any help would be appreciated!
     
  11. WayneJuckts

    WayneJuckts

    Joined:
    Feb 23, 2015
    Posts:
    2
    Hey there, is this with the Unity light baker or third party?

    You may need to rename your albedo to _MainTex or enable "double sided GI" in your material.[/QUOTE]

    Thank you! I was using the unity light baker. Renaming to "_MainTex" and setting the subshader rendertype to "transparent cutout" did the trick :)
     
    Amplify_Support likes this.
  12. Amplify_Support

    Amplify_Support

    Joined:
    Jul 19, 2013
    Posts:
    121
    Hello,

    Perhaps it's best to use a Custom Expression node in your case, custom noise and operations.
     
  13. caglarenes

    caglarenes

    Joined:
    Jul 9, 2015
    Posts:
    45
    Hello, sometimes amplify shader editor cause editor crashes.

    like:
    Code (CSharp):
    1. NullReferenceException: Object reference not set to an instance of an object
    2.   at AmplifyShaderEditor.AmplifyShaderEditorWindow.OnGUI () [0x00767] in C:\Users\Uur\Documents\ConquerorOfFantasy\Assets\AmplifyShaderEditor\Plugins\Editor\Menu\AmplifyShaderEditorWindow.cs:5032
    3.   at UnityEditor.HostView.InvokeOnGUI (UnityEngine.Rect onGUIPosition) [0x00054] in <a017e354f3154926a5617fbac3a64fcc>:0
    4.   at UnityEditor.DockArea.DrawView (UnityEngine.Rect dockAreaRect) [0x00001] in <a017e354f3154926a5617fbac3a64fcc>:0
    5.   at UnityEditor.DockArea.OldOnGUI () [0x0019a] in <a017e354f3154926a5617fbac3a64fcc>:0
    6.   at UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout, UnityEngine.Rect layoutSize, System.Action onGUIHandler, System.Boolean canAffectFocus) [0x0024f] in <22a7125907634f27b5049762847405c6>:0
    7.   at UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect, System.Action onGUIHandler, System.Boolean canAffectFocus) [0x000c4] in <22a7125907634f27b5049762847405c6>:0
    8.   at UnityEngine.UIElements.IMGUIContainer.DoIMGUIRepaint () [0x00068] in <22a7125907634f27b5049762847405c6>:0
    9.   at UnityEngine.UIElements.UIR.RenderChainCommand.ExecuteNonDrawMesh (UnityEngine.UIElements.UIR.DrawParams drawParams, System.Single pixelsPerPoint, System.Exception& immediateException) [0x000db] in <22a7125907634f27b5049762847405c6>:0
    10. Rethrow as ImmediateModeException
    11.   at UnityEngine.UIElements.UIR.RenderChain.Render () [0x0011f] in <22a7125907634f27b5049762847405c6>:0
    12.   at UnityEngine.UIElements.UIRRepaintUpdater.Update () [0x000c0] in <22a7125907634f27b5049762847405c6>:0
    13.   at UnityEngine.UIElements.VisualTreeUpdater.UpdateVisualTreePhase (UnityEngine.UIElements.VisualTreeUpdatePhase phase) [0x0001e] in <22a7125907634f27b5049762847405c6>:0
    14.   at UnityEngine.UIElements.Panel.UpdateForRepaint () [0x00035] in <22a7125907634f27b5049762847405c6>:0
    15.   at UnityEngine.UIElements.Panel.Repaint (UnityEngine.Event e) [0x00078] in <22a7125907634f27b5049762847405c6>:0
    16.   at UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) [0x00023] in <22a7125907634f27b5049762847405c6>:0
    17.   at UnityEngine.UIElements.UIElementsUtility.UnityEngine.UIElements.IUIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& eventHandled) [0x0003d] in <22a7125907634f27b5049762847405c6>:0
    18.   at UnityEngine.UIElements.UIEventRegistration.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) [0x0001a] in <22a7125907634f27b5049762847405c6>:0
    19.   at UnityEngine.UIElements.UIEventRegistration+<>c.<.cctor>b__1_2 (System.Int32 i, System.IntPtr ptr) [0x00001] in <22a7125907634f27b5049762847405c6>:0
    20.   at UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& result) [0x00010] in <956c3dba657b4ead8528be7fdbbfa2de>:0
    Code (CSharp):
    1. NullReferenceException: Object reference not set to an instance of an object
    2.   at AmplifyShaderEditor.AmplifyShaderEditorWindow.OnLostFocus () [0x00037] in C:\Users\Uur\Documents\ConquerorOfFantasy\Assets\AmplifyShaderEditor\Plugins\Editor\Menu\AmplifyShaderEditorWindow.cs:3639
    3.   at UnityEditor.HostView.DeregisterSelectedPane (System.Boolean clearActualView, System.Boolean sendEvents) [0x000f1] in <a017e354f3154926a5617fbac3a64fcc>:0
    4.   at UnityEditor.HostView.SetActualViewInternal (UnityEditor.EditorWindow value, System.Boolean sendEvents) [0x00013] in <a017e354f3154926a5617fbac3a64fcc>:0
    5.   at UnityEditor.HostView.set_actualView (UnityEditor.EditorWindow value) [0x00001] in <a017e354f3154926a5617fbac3a64fcc>:0
    6.   at UnityEditor.DockArea.OnDestroy () [0x00024] in <a017e354f3154926a5617fbac3a64fcc>:0
    7. UnityEngine.Object:DestroyImmediate(Object, Boolean)
    8. UnityEditor.View:OnDestroy()
    9. UnityEngine.Object:DestroyImmediate(Object, Boolean)
    10. UnityEditor.ContainerWindow:InternalCloseWindow()
    11. UnityEditor.ContainerWindow:InternalClose(ContainerWindow)
    12. UnityEditor.ContainerWindow:Close()
    13. UnityEditor.ContainerWindow:HandleWindowDecorationStart(Rect)
    14. UnityEditor.DockArea:DoWindowDecorationStart()
    15. UnityEditor.HostView:InvokeOnGUI(Rect)
    16. UnityEditor.DockArea:DrawView(Rect)
    17. UnityEditor.DockArea:OldOnGUI()
    18. UnityEngine.UIElements.IMGUIContainer:DoOnGUI(Event, Matrix4x4, Rect, Boolean, Rect, Action, Boolean)
    19. UnityEngine.UIElements.IMGUIContainer:HandleIMGUIEvent(Event, Matrix4x4, Rect, Action, Boolean)
    20. UnityEngine.UIElements.IMGUIContainer:HandleIMGUIEvent(Event, Action, Boolean)
    21. UnityEngine.UIElements.IMGUIContainer:HandleIMGUIEvent(Event, Boolean)
    22. UnityEngine.UIElements.IMGUIContainer:SendEventToIMGUIRaw(EventBase, Boolean, Boolean)
    23. UnityEngine.UIElements.IMGUIContainer:SendEventToIMGUI(EventBase, Boolean, Boolean)
    24. UnityEngine.UIElements.IMGUIContainer:HandleEvent(EventBase)
    25. UnityEngine.UIElements.CallbackEventHandler:HandleEventAtTargetPhase(EventBase)
    26. UnityEngine.UIElements.MouseCaptureDispatchingStrategy:DispatchEvent(EventBase, IPanel)
    27. UnityEngine.UIElements.EventDispatcher:ApplyDispatchingStrategies(EventBase, IPanel, Boolean)
    28. UnityEngine.UIElements.EventDispatcher:ProcessEvent(EventBase, IPanel)
    29. UnityEngine.UIElements.EventDispatcher:ProcessEventQueue()
    30. UnityEngine.UIElements.EventDispatcher:OpenGate()
    31. UnityEngine.UIElements.EventDispatcherGate:Dispose()
    32. UnityEngine.UIElements.EventDispatcher:ProcessEvent(EventBase, IPanel)
    33. UnityEngine.UIElements.EventDispatcher:Dispatch(EventBase, IPanel, DispatchMode)
    34. UnityEngine.UIElements.BaseVisualElementPanel:SendEvent(EventBase, DispatchMode)
    35. UnityEngine.UIElements.UIElementsUtility:DoDispatch(BaseVisualElementPanel)
    36. UnityEngine.UIElements.UIElementsUtility:UnityEngine.UIElements.IUIElementsUtility.ProcessEvent(Int32, IntPtr, Boolean&)
    37. UnityEngine.UIElements.UIEventRegistration:ProcessEvent(Int32, IntPtr)
    38. UnityEngine.UIElements.<>c:<.cctor>b__1_2(Int32, IntPtr)
    39. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)

    Thanks in advance.
     

    Attached Files:

  14. Michael-ClockStone

    Michael-ClockStone

    Joined:
    Jan 18, 2012
    Posts:
    90
    Bugreport: Dithering using the DitheringNode has issues when using a RenderScale != 1 in URP. Pixels are dithered inconsistently in between frames resulting in random flickering.
    Feature request: It would be nice to have a simple 2x2 checkerboard dithering in addition to the the more complex Bayer dithering variants.
     
    Last edited: Sep 21, 2022
  15. AllenAtFunplus

    AllenAtFunplus

    Joined:
    Dec 23, 2021
    Posts:
    1
    I have a problem in using ASE.
    I created a shader with lod 300 and lod 100. In lod 100, I removed some params (compare to lod 300). Then I found that in shader file, params in CBUFFER block in lod 300 are not the same as it in lod 100. It seems right because I used different params in different lods. But, it will make the UPR pipeline can not SRP Batch when switching from lod 300 to lod 100. Is there any way to let ASE keep the same CBUFFER block between different lods?
    Now I have to modify shader manually to keep CBUFFER same when after modified the shader by ASE. It is very inconvenience.
     
  16. davidbk

    davidbk

    Joined:
    May 16, 2018
    Posts:
    10
    I'm having some issues with Amplify shaders and Path Tracing. I'm working in a HDRP Unity project in 2021.2.17f1 with some raytracing features on a Global Volume. When I add a Path Tracing override to the volume, any HD/Lit shader in the scene made using Amplify appears all black in the viewport. Other shaders made using the default Shader Graph appear normal.

    Do Amplify shaders support Path Tracing? Or is there a check box that needs to be ticked somewhere in order for them to work? I could not find anything in the Amplify manual or forums regarding Amplify and Path Tracing.
     
  17. davidbk

    davidbk

    Joined:
    May 16, 2018
    Posts:
    10
    Is there a command to unlink comment boxes from the nodes within them? I would like to reposition a comment box without affecting the nodes inside of it.

    Here is an example of what I would like to do. Holding the SHIFT key in the UE material editor allows me to move the frame and not the content.
     
  18. Amplify_Support

    Amplify_Support

    Joined:
    Jul 19, 2013
    Posts:
    121
    Hi,

    It's going to be hard to determine the cause, is this something you can replicate on a new empty project? ASE crashes are not common, unless this is happening with a lot of Undo actions(there's a known problem there).


    Thanks for reporting the problem and solution, we'd be happy to examine it.

    Please avoid posting full ASE scripts, we can discuss this via support@amplify.pt. I must ask you to remove the code shared in your post. You can share relevant bits regarding changes if applicable.

    Please send a complete sample to support@amplify.pt along with details on Unity, URP, and ASE version used.


    Raytracing is not yet supported.

    I don't believe so.
     
  19. JDarknell

    JDarknell

    Joined:
    Dec 6, 2017
    Posts:
    1
    I'm a 3D artist and have been using Amplify for a while now. I'm up against an idea that is beyond my skills so I'm hoping someone can point me in the right direction. I want to apply a shader to a flat polygons that works like a 'window' of sorts to look into another world, what I would like to do is basically use a spherical projection image and display a portion of it on the surface of a flat polygon and have the direction/view change based on the viewers position so it actually looks like you are looking through a window. I played with the parallax functionality and its pretty close to what I want but I think the spherical projection would be much more convincing if it could be pulled off. Thank you for any help.
     
  20. Rensoburro_Taki

    Rensoburro_Taki

    Joined:
    Sep 2, 2011
    Posts:
    274
    Is there anywhere a full (1:1) built in standard shader clone template for Amplify Shader Editor, so I can learn from it for further usage? That is the only shader I understand, since I worked with the standard shader a good decade. I like to reverse engineer, so I can understand things my way. Every other shader example shoots me out of the concept.
     
  21. FloBeber

    FloBeber

    Joined:
    Jun 9, 2015
    Posts:
    166
    Hi there, I recently updated ASE to 1.9.0.1 and am now getting errors when I recompile my shaders (or save).

    Unity 2020.3.39
    URP 10.10.0

    Any feedback appreciated!

    Code (CSharp):
    1. Shader error in 'Hidden/Universal/2D Custom Lit': Couldn't open include file 'Packages/com.unity.render-pipelines.universal/Shaders/2D/Include/SurfaceData2D.hlsl'. at line 112
    2.  
    3. Compiling Fragment program
    4. Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_LIGHTMAP_DLDR_ENCODING UNITY_NO_CUBEMAP_ARRAY UNITY_NO_DXT5nm UNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF2
    5. Disabled keywords: SHADER_API_GLES30 UNITY_ASTC_NORMALMAP_ENCODING UNITY_COLORSPACE_GAMMA UNITY_ENABLE_DETAIL_NORMALMAP UNITY_ENABLE_NATIVE_SHADOW_LOOKUPS UNITY_HALF_PRECISION_FRAGMENT_SHADER_REGISTERS UNITY_HARDWARE_TIER1 UNITY_HARDWARE_TIER2 UNITY_HARDWARE_TIER3 UNITY_LIGHTMAP_FULL_HDR UNITY_LIGHTMAP_RGBM_ENCODING UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_METAL_SHADOWS_USE_POINT_FILTERING UNITY_NO_FULL_STANDARD_SHADER UNITY_PBS_USE_BRDF1 UNITY_PBS_USE_BRDF3 UNITY_PRETRANSFORM_TO_DISPLAY_ORIENTATION UNITY_SPECCUBE_BLENDING UNITY_SPECCUBE_BOX_PROJECTION UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_VIRTUAL_TEXTURING
    6.  
    upload_2022-10-6_14-30-39.png
     

    Attached Files:

  22. AmplifyCreations

    AmplifyCreations

    Joined:
    Aug 28, 2012
    Posts:
    32
    This is a hard one to tackle here. You should probably join our Discord and ask around for tips.

    Unfortunately, no. I'll add this request - a basic standard template - to our backlog.

    This template should not be available in 10.10 since we only support "2D Custom Lit" in 12.x. Maybe you tried back porting your project to an older Unity version? I would recommend deleting ASE and reinstalling. Please note that there's a bug in auto SRP package import, which is already fixed but will ship only in 1.9.0.2 - planned for tomorrow. To avoid the bug, make sure you delete ASE, install again, and create any shader, as opening the canvas will trigger the correct auto-import.
     
    FloBeber likes this.
  23. A3DAAN

    A3DAAN

    Joined:
    Nov 8, 2017
    Posts:
    7
    I am struggling with the following problem:

    In the simple example scene displayed in the screenshot a reflection probe and 2 planes with reflective/specular materials are used. On the left the standard urp lit shader and on the right an ASE universal pbr shader. This shader stops reflecting when it reached a certain distance from the camera, something the default urp lit shader has no issues with. I also noticed that when I use an ASE universal unlit shader it displays the cubemap/reflection just fine. Is there any way to adjust this range or prevent the ASE pbr shader from clipping the reflection?

    Unity 2021.2.9
    URP 12.1.4
     

    Attached Files:

  24. AmplifyCreations

    AmplifyCreations

    Joined:
    Aug 28, 2012
    Posts:
    32
    Is this with latest ASE v1.9.0 ? We've just release another update today - v1.9.0.2 - can you try that one out? Please make sure you uninstall ASE first, before importing the new package.
     
  25. A3DAAN

    A3DAAN

    Joined:
    Nov 8, 2017
    Posts:
    7
    Thanks for the reply, I have updated ASE to the latest version but the environment reflection on the upr lit shader still seems to clip at somewhat higher distances.
    Except the plane the scene is empty and the shader only consists of the master node.
     

    Attached Files:

    Last edited: Oct 11, 2022
  26. AmplifyCreations

    AmplifyCreations

    Joined:
    Aug 28, 2012
    Posts:
    32
    I can't seem to be able to replicate:



    Any chance you can share the shader so I can have a look?
    You can send it to support@amplify.pt

    BTW I'm running 2021.3.10f1 with URP 12.1.7
     
    A3DAAN likes this.
  27. A3DAAN

    A3DAAN

    Joined:
    Nov 8, 2017
    Posts:
    7
    Thank you for taking the time to respond and test a similar setup.
    Your answer indicates that the cause is very likely something else in my project or system, but I will send you the shader anyway.
    Forgot to mention Amplify Shader Editor is amazing! :D
     
  28. AmplifyCreations

    AmplifyCreations

    Joined:
    Aug 28, 2012
    Posts:
    32
    I'm still suspicious it could be something with ASE, even if just a shader options issue or something else. Having a look would certainly help, especially if you could repro this in a small sample project, in case just the shader doesn't show any anomaly on my end. In any case, I'll test whatever you send over.

    Thank you very much for your support!
     
  29. A3DAAN

    A3DAAN

    Joined:
    Nov 8, 2017
    Posts:
    7
    I found a rather recent post which describes the same effect happening under similar conditions, except for it being a shader graph shader:
    https://forum.unity.com/threads/why...f-environment-lighting-at-a-distance.1344242/
    He later mentiones that the problem was solved by updating to a newer version of Unity, the latest LTS.
    I just now also tried the latest LTS, Unity 2021.3.11f1 and that luckily seems to resolve it. So we will update our project to this version.

    In my still unsuccessful attempts to fix the environment reflection issue in Unity 2021.2.9 a couple of discoveries where made though:

    - The problem persists after updating the graphics driver and reinstalling Unity 2021.2.9
    - It happens with build target platform set to Android, when the target platform is set to windows\mac\linux the problem is gone.
    - It only occurs in the editor (both scene and game view), the build on a mobile device seems to be fine.
    - The issue is not present on my collegues computer who is running the exact same project and versions.

    Therefore I'm starting to believe it is something on my machine causing it and fear the glitch might be tricky to reproduce with the empty shader I emailed you yesterday. Same goes for a project file, but I will send one. Thanks again for looking into it!
     
  30. _DS_1

    _DS_1

    Joined:
    Sep 6, 2016
    Posts:
    17
    Hi!

    We are having a crash on PS5, others users find out that his crashes were because dither4x4 nodes, they remove it and says the crash is gone. But the problem is in our project we are not using Amplify, other assets we use are. How can I modify the shader to remove that node? Do I need Amplify Shader Editor?

    They said that the dither4x4 was "trying to access array out side of its bounds" if that help you understand what is happening.

    Also, it would be helpful if the shader can say with what version it was made :
    // Made with Amplify Shader Editor v.XXXX

    Thanks!
     
  31. IllTemperedTunas

    IllTemperedTunas

    Joined:
    Aug 31, 2012
    Posts:
    782
    Console is getting blown out with these messages:
    upload_2022-10-18_13-50-56.png
    I've gone through the material countless times trying to adjust every value and texture setting, none of the texture are set to _None but Unity still constantly pumps out these error messages and the thumbnail previews remain broken.
    upload_2022-10-18_13-52-10.png

    Probably some weird stuff on Unity's end, honestly I have no idea what's causing this. The project window materials are totally blowing out my project.

    EDIT: While making this post I think I figured it out, there's a render pipeline converter, figured I'd leave this here if anyone else had a similar issue...
    upload_2022-10-18_14-8-30.png
    Using the universal render pipeline is so friggin' frustrating lately (obviously not your guys' fault)


    Currently have shaders set to 3.0 and it seems to be working fine (only way to get web build to work)

    Final Edit: After converting to the new render pipeline a ton of materials went pink in the web build, some internal automated system was setting all the shaders to 4.5, once set to 3.0 it seems to have worked again.
     

    Attached Files:

    Last edited: Oct 19, 2022
  32. Defragmenter

    Defragmenter

    Joined:
    Sep 25, 2012
    Posts:
    11
    Hi!
    I need some help, please.
    I try to create tiles with random colors but using the same material.
    I found and followed this video with the same effect but using Shader Graph.
    Unfortunately, I cant find a replacement for the object node in Amplify Shader, and I can't make it work.
     
  33. ratking

    ratking

    Joined:
    Feb 24, 2010
    Posts:
    350
    Defragmenter likes this.
  34. Cactus_on_Fire

    Cactus_on_Fire

    Joined:
    Aug 12, 2014
    Posts:
    675
    Hey.

    The HDRP shaders seem to be causing a bug when used with "scene color node" where even though the shader is alpha blended with zwriting off, they seem to be overwriting the alpha of the other particles. The alpha blending alone doesn't cause this issue but using "scene color" for the emission output does. It looks like this;

    upload_2022-10-24_8-36-11.png
     
  35. IllTemperedTunas

    IllTemperedTunas

    Joined:
    Aug 31, 2012
    Posts:
    782
    EDIT: My mistake I jumped to a conclusion. I experienced a performance issue when pressing the screen in the web build, and all indicators pointed to it being an amplify issue, but after further testing it appears that ANY shader of any complexity is causing lag on button down and button up.
     
    Last edited: Oct 27, 2022
  36. ckohlmeyer

    ckohlmeyer

    Joined:
    Apr 17, 2021
    Posts:
    40
    Amplify Shader Editor has been absolutely essential for my team's Quest game! It's really allowed us to find ways of pushing the hardware beyond its limitations, and users are generally ecstatic over the results.

    So, thank you so much!

    There is 1 very large issue we've had though. Lightmaps will not display correctly on Quest or Quest 2, if the Lightmap node is upstream from a Static Switch. It works fine in editor and in PC builds.
    This has greatly limited how flexible our shaders can be, and I've had to create lots of redundant shaders whenever I need to make a minor variant. It would be so much better for us to be able to make an uber shader with lots of static switch options.

    The image below is a very simple example.

    Without that switch, either option would work fine.

    We're using Amplify 1.8.9.035
    Unity 2020.3.4f
    URP 10.4.0

    upload_2022-10-31_16-27-15.png
     
  37. m_hakozaki

    m_hakozaki

    Joined:
    May 15, 2014
    Posts:
    4
    Hi, I am creating an asset using _CameraNormalsTexture in URP.
    The problem is that the shaders created in ASE are not outputting the correct normals in the URP 10.9 to 11.0 environment.

    In URP 10.9, _CameraNormalsTexture has been changed to store normals of world space instead of view space.
    https://github.com/Unity-Technologies/.../v10.8.1/.../DepthNormalsPass.hlsl
    https://github.com/Unity-Technologies/.../v10.9.0/.../DepthNormalsPass.hlsl

    URP 12x Template is fine, but URP 10x needs to be modified.
    Could you please modify the frag (line 2452) of the DepthNormals pass in the Lit.shader of the URP 10x template as follows.

    Code (HLSL):
    1. #if VERSION_GREATER_EQUAL(10, 9)
    2.     return float4(PackNormalOctRectEncode(normalize(IN.worldNormal)), 0.0, 0.0);
    3. #else
    4.     return float4(PackNormalOctRectEncode(TransformWorldToViewDir(IN.worldNormal, true)), 0.0, 0.0);
    5. #endif
    ASE Version 1.9.0.2
    Thank you for such a great asset!
     
    Last edited: Nov 4, 2022
  38. DEEnvironment

    DEEnvironment

    Joined:
    Dec 30, 2018
    Posts:
    437

    its only changed from 10.9.0 thru 10.10.1


    Code (CSharp):
    1.              // 10.2.2 thru 10.8.1
    2.                return float4(PackNormalOctRectEncode(TransformWorldToViewDir(IN.worldNormal, true)), 0.0, 0.0);
    3.                // 10.9.0 thru 10.10.1
    4.                return float4(PackNormalOctRectEncode(normalize(input.normalWS)), 0.0, 0.0);
    5.  
    6.                // 11.0.0 thru 12.1.0
    7.                return float4(PackNormalOctRectEncode(TransformWorldToViewDir(input.normalWS, true)), 0.0, 0.0);
    8.  
    9.                //12.1.0 thru 14.0.3
    10.                #if defined(_GBUFFER_NORMALS_OCT)
    11.                float3 normalWS = normalize(input.normalWS);
    12.                float2 octNormalWS = PackNormalOctQuadEncode(normalWS);           // values between [-1, +1], must use fp32 on some platforms.
    13.                float2 remappedOctNormalWS = saturate(octNormalWS * 0.5 + 0.5);   // values between [ 0,  1]
    14.                half3 packedNormalWS = PackFloat2To888(remappedOctNormalWS);      // values between [ 0,  1]
    15.               return half4(packedNormalWS, 0.0);
    16.               #else
    17.               float3 normalWS = NormalizeNormalPerPixel(input.normalWS);
    18.               return half4(normalWS, 0.0);
    19.              #endif
    20.  
    21.                //14.0.3
    22.               #if defined(_GBUFFER_NORMALS_OCT)
    23.               float3 normalWS = normalize(input.normalWS);
    24.               float2 octNormalWS = PackNormalOctQuadEncode(normalWS);           // values between [-1, +1], must use fp32 on some platforms.
    25.                float2 remappedOctNormalWS = saturate(octNormalWS * 0.5 + 0.5);   // values between [ 0,  1]
    26.     half3 packedNormalWS = PackFloat2To888(remappedOctNormalWS);      // values between [ 0,  1]
    27.     outNormalWS = half4(packedNormalWS, 0.0);
    28.     #else
    29.     float3 normalWS = NormalizeNormalPerPixel(input.normalWS);
    30.     outNormalWS = half4(normalWS, 0.0);
    31.     #endif
    32.     #ifdef _WRITE_RENDERING_LAYERS
    33.         uint renderingLayers = GetMeshRenderingLayer();
    34.         outRenderingLayers = float4(EncodeMeshRenderingLayer(renderingLayers), 0, 0, 0);
    35.     #endif
     
    m_hakozaki likes this.
  39. Slaktus

    Slaktus

    Joined:
    Dec 5, 2012
    Posts:
    60
    Hey, I've got a problem with shaders made using Amplify Shader Editor in prefabs loaded using Addressables when building for Windows.

    Unity 2021.3.5f1
    Addressables 1.19.19
    URP 12.1.7
    Amplify 1.8.9r35
    • We are loading a prefab using Addressables.LoadAssetAsync, then instantiating it using Object.Instantiate
    • The prefab includes materials using shaders created using Amplify Shader Editor
    • The shaders use shader functions
    • When playing in editor, the object renders correctly
    • In build, the object is invisible
    The prefab instances still work, the material and the mesh is present, the scripts are executing, the colliders send events, but nothing gets rendered.

    When using the URP Lit shader instead of the Amplify shader, the objects are rendered.

    Please let me know if you need more details!
     
  40. enhawk

    enhawk

    Joined:
    Aug 22, 2013
    Posts:
    833
    Hi @Amplify_Support is there a way to blend replace color into emission?

    When I try to use multiply or add nodes, I get this error:

    Shader error in 'replace color': redefinition of 'temp_output_2_0_g3' at line 53 (on d3d11)

    Screen Shot 2022-11-08 at 21.33.50.png
     
  41. davidbk

    davidbk

    Joined:
    May 16, 2018
    Posts:
    10
    I have a number of Inspector layout questions having to do with shaders made in Amplify.
    1. How do I show a color value (ie. vector 4) on the same line as a map? For example, this might act as a tint for a Base Map.
    2. How do I hide a slider in the Inspector if a map is chosen and show the slider if no map is chosen? For example, if a Metallic Map is chosen, hide the Metallic slider. In addition, how do I set up my nodes to select the slider over the map if no map is chosen?
    3. How do I get multiple Texture Samplers to use a single set of UV Tiling and Offset values and have them show up as float 2s in the Inspector (not as float 1 or float 4).
    4. How do I group multiple variables under the same header? When I enable the Header attribute on a few variables and give them the same Header name, the header name seems to be listed multiple times in the Inspector (on top of each value), rather than having one header name and having all of the values listed under it.

     
  42. Cactus_on_Fire

    Cactus_on_Fire

    Joined:
    Aug 12, 2014
    Posts:
    675
    upload_2022-11-11_14-12-4.png
    Is there a way to adjust the slope settings for the triplanar node? It takes the normal angles automatically although I'd like the "top" texture to start from the green angle rather than the red.

    If it's not possible to do with the node alone, is there a node setup for the triplanar so that I can adjust the slopes myself? I tried to replicate it but I can't get the normals to look right.
     
    Last edited: Nov 11, 2022
  43. Luke-kaser

    Luke-kaser

    Joined:
    Apr 2, 2018
    Posts:
    19
    Hello
    When update ASE to version 1.9.1
    I got some error from Impostors.
    maybe need a patch to fix this bug with Impostors
    upload_2022-11-17_13-3-12.png
     
  44. Desertleaf

    Desertleaf

    Joined:
    Dec 15, 2013
    Posts:
    15
    Hey Amplify team, I got a problem here.

    Unity 2021.3.11f [ VertExmotion implementation].

    When i add the additional directive for Vertexmotion.cgnic, i get a redefinition error for _Time.

    I don’t know HLSL so i don’t know what to do.
    //EDIT - upgraded to 2021.3.13F - problem still exists.

    ///EDIT

    Shader error in 'VerExmotion/Basic_AmplifiedVersion_Converted': redefinition of '_Time' at 2019_4/2021.3.13f1/Editor/Data/CGIncludes/UnityShaderVariables.cginc(40) (on d3d11)
     
    Last edited: Nov 18, 2022
  45. AmplifyCreations

    AmplifyCreations

    Joined:
    Aug 28, 2012
    Posts:
    32
    I'm now working on Amplify Impostors. I'll issue a quick update ASAP today with a fix for this.

    I'll respond to the other posts as soon as I can.
     
    Luke-kaser likes this.
  46. marckv

    marckv

    Joined:
    Sep 19, 2013
    Posts:
    61
    Hi.

    I am using your galaxy shader in a game, and in the memory profiler it is saying that the shader is referencing a texture called LensDirt02 from the post processing unity package. Do you have any idea why this might be? We are not inputting that map into any of the texture slots, and I cant work it out. upload_2022-11-24_17-53-51.png
     
  47. Delforce

    Delforce

    Joined:
    Jun 3, 2015
    Posts:
    23
    Hi guys,
    Love the asset so far, watched all the tutorials.

    I'm currently trying to create a shader, I'm using HDRP, however I'm getting this error when I try.

    Shader error in 'ASESampleShaders/SRP HD Material Types/Subsurface Scattering': 'Frag': output parameter 'outSSSBuffer0' missing semantics at line 4076 (on d3d11)

    Compiling Subshader: 0, Pass: Forward, Fragment program with DECALS_OFF SHADOW_LOW USE_FPTL_LIGHTLIST
    Platform defines: SHADER_API_DESKTOP UNITY_ENABLE_DETAIL_NORMALMAP UNITY_ENABLE_REFLECTION_BUFFERS UNITY_LIGHTMAP_FULL_HDR UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BLENDING UNITY_SPECCUBE_BOX_PROJECTION UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS
    Disabled keywords: DEBUG_DISPLAY DECALS_3RT DECALS_4RT DIRLIGHTMAP_COMBINED DYNAMICLIGHTMAP_ON INSTANCING_ON LIGHTMAP_ON SHADER_API_GLES30 SHADOWS_SHADOWMASK SHADOW_HIGH SHADOW_MEDIUM UNITY_ASTC_NORMALMAP_ENCODING UNITY_COLORSPACE_GAMMA UNITY_ENABLE_NATIVE_SHADOW_LOOKUPS UNITY_FRAMEBUFFER_FETCH_AVAILABLE UNITY_HALF_PRECISION_FRAGMENT_SHADER_REGISTERS UNITY_HARDWARE_TIER1 UNITY_HARDWARE_TIER2 UNITY_HARDWARE_TIER3 UNITY_LIGHTMAP_DLDR_ENCODING UNITY_LIGHTMAP_RGBM_ENCODING UNITY_METAL_SHADOWS_USE_POINT_FILTERING UNITY_NO_DXT5nm UNITY_NO_FULL_STANDARD_SHADER UNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF2 UNITY_PBS_USE_BRDF3 UNITY_PRETRANSFORM_TO_DISPLAY_ORIENTATION UNITY_UNIFIED_SHADER_PRECISION_MODEL UNITY_VIRTUAL_TEXTURING USE_CLUSTERED_LIGHTLIST _ALPHATEST_ON _BLENDMODE_ADD _BLENDMODE_ALPHA _BLENDMODE_PRE_MULTIPLY _DOUBLESIDED_ON _ENABLE_FOG_ON_TRANSPARENT _SURFACE_TYPE_TRANSPARENT

    I've looked at the line of code at 4076 in the subsurface scatterer and it's saying below. Any ideas what could be happening?

    Code (CSharp):
    1. void Frag(PackedVaryingsMeshToPS packedInput,
    2.                     #ifdef OUTPUT_SPLIT_LIGHTING
    3.                         out float4 outColor : SV_Target0,
    4.                         out float4 outDiffuseLighting : SV_Target1,
    5.                         OUTPUT_SSSBUFFER(outSSSBuffer)
    6.                     #else
    7.                         out float4 outColor : SV_Target0
    8.                     #ifdef _WRITE_TRANSPARENT_MOTION_VECTOR
    9.                         , out float4 outMotionVec : SV_Target1
    10.                     #endif
    11.                     #endif
    12.                     #ifdef _DEPTHOFFSET_ON
    13.                         , out float outputDepth : SV_Depth
    14.                     #endif
    15.                    
    16.                         )
    Cheers
     
  48. yonson_chappers

    yonson_chappers

    Joined:
    Feb 6, 2017
    Posts:
    33
    Really enjoying this asset, however struggling with a really simple shader, I want a basic material which is just a colour, but

    a) has transparency
    b) is 'always on top' i.e. renders on top of any other asset.

    This is for a 'HUD' type display for a boating platform.
    I've set up this shader using HDRP / Unity 2020.3.26, can anyone give me any help? Many thanks!

    upload_2022-11-30_20-41-53.png
     
  49. VolantemMachina

    VolantemMachina

    Joined:
    Nov 12, 2014
    Posts:
    3
    Hey there
    I'm currently trying to create a template for an HDRP Sky shader. I followed the tutorial on the HDRP manual and it worked, so I'm trying to convert the shader there, without the cubemap, into a template. So far though, no luck, as I only see this.



    Is there anything I can do to make this work? Or is this simply not possible? here is the code I added so far.

    Code (CSharp):
    1. Shader /*ase_name*/"Hidden/Templates/New Sky Template"/*end*/
    2. {
    3.     HLSLINCLUDE
    4.  
    5.     #pragma vertex Vert
    6.  
    7.     #pragma editor_sync_compilation
    8.     #pragma target 4.5
    9.     #pragma only_renderers d3d11 playstation xboxone xboxseries vulkan metal switch
    10.  
    11.     #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl"
    12.     #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/CommonLighting.hlsl"
    13.     #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Sky/SkyUtils.hlsl"
    14.  
    15.     float4 _SkyParam; // x exposure, y multiplier, zw rotation (cosPhi and sinPhi)
    16.  
    17.     #define _Intensity          _SkyParam.x
    18.     #define _CosPhi             _SkyParam.z
    19.     #define _SinPhi             _SkyParam.w
    20.     #define _CosSinPhi          _SkyParam.zw
    21.     /*ase_props*/
    22.  
    23.  
    24.     struct Attributes
    25.     {
    26.         uint vertexID : SV_VertexID;
    27.         UNITY_VERTEX_INPUT_INSTANCE_ID
    28.     };
    29.  
    30.     struct Varyings
    31.     {
    32.         float4 positionCS : SV_POSITION;
    33.         /*ase_vdata:sp=sp.xyzw*/
    34.         UNITY_VERTEX_OUTPUT_STEREO
    35.     };
    36.  
    37.     Varyings Vert(Attributes input)
    38.     {
    39.         Varyings output;
    40.         UNITY_SETUP_INSTANCE_ID(input);
    41.         UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output);
    42.         output.positionCS = GetFullScreenTriangleVertexPosition(input.vertexID, UNITY_RAW_FAR_CLIP_VALUE);
    43.         return output;
    44.     }
    45.  
    46.     float4 RenderSky(Varyings input, float exposure)
    47.     {
    48.  
    49.         /*ase_frag_code:i=v2f*/
    50.         float4 color = /*ase_frag_out:Color;Float4;_Color*/float4(1,0,0,1)/*end*/ * _Intensity * exposure;
    51.  
    52.         return color;
    53.     }
    54.  
    55.     float4 FragBaking(Varyings input) : SV_Target
    56.     {
    57.         return RenderSky(input, 1.0);
    58.     }
    59.  
    60.     float4 FragRender(Varyings input) : SV_Target
    61.     {
    62.         UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(input);
    63.         return RenderSky(input, GetCurrentExposureMultiplier());
    64.     }
    65.  
    66.     ENDHLSL
    67.  
    68.     SubShader
    69.     {
    70.         // Regular New Sky
    71.         // For cubemap
    72.         Pass
    73.         {
    74.             ZWrite Off
    75.             ZTest Always
    76.             Blend Off
    77.             Cull Off
    78.  
    79.             Name "Fragment Bake"
    80.  
    81.             HLSLPROGRAM
    82.                 #pragma fragment FragBaking
    83.                 /*ase_pragma*/
    84.             ENDHLSL
    85.         }
    86.  
    87.         // For fullscreen Sky
    88.         Pass
    89.         {
    90.             /*ase_main_pass*/
    91.  
    92.             ZWrite Off
    93.             ZTest LEqual
    94.             Blend Off
    95.             Cull Off
    96.  
    97.             Name "Fragment Render"
    98.  
    99.             HLSLPROGRAM
    100.                 #pragma fragment FragRender
    101.                 /*ase_pragma*/
    102.             ENDHLSL
    103.         }
    104.         /*ase_pass_end*/
    105.     }
    106.     Fallback Off
     
    Last edited: Dec 3, 2022
  50. neomento

    neomento

    Joined:
    May 29, 2020
    Posts:
    2
    Hi there, I would like to create an transparent unlit shader that is multiplicative and just cant get it right.

    I would use it for a simple blob shadow on the floor. Thanks for any help!

    upload_2022-12-6_13-2-58.png