Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct here to familiarize yourself with the rules and how to post constructively.

  2. Unity 2022.1 is now available as the latest Tech release.
    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. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,387
    No problem!

    Default HDRP settings, new project(the usual for tests).

    Did you save the shader on the HDRP 10 project? You need to save to update it to your specific HDRP version.

    To confirm, did you import ASE or open the same HDRP 12 project on a previous Unity version?
     
  2. jnbbender

    jnbbender

    Joined:
    May 25, 2017
    Posts:
    438
    At this point I don't know what I did :( I'll work it out though. Thanks for your help
     
    Amplify_Ricardo likes this.
  3. MagicCancel

    MagicCancel

    Joined:
    Jul 30, 2015
    Posts:
    25
    My current issue has been solved, but upon booting up my game everything is pink! My shaders aren't working. Is this to be expected because of updating from 2019 unity to 2021, or should everything have ported over fine?
     
  4. Cactus_on_Fire

    Cactus_on_Fire

    Joined:
    Aug 12, 2014
    Posts:
    650
    Is it possible to create a shader that can apply to terrains in HDRP? I'm using a triplanar ASE material on the terrain but it gives the " Cant use Shader which needs tangent geometry on terrain "error.
    upload_2021-11-13_9-8-29.png

    I can't seem to get the normalmaps working right on a triplanar shader on terrain. some faces look flat like there is no normalmap at all
     
    Last edited: Nov 13, 2021
  5. supernamey923834

    supernamey923834

    Joined:
    Jul 27, 2017
    Posts:
    10
    Do you have any v2 plans to make Multi Passes visual in the editor and not as a template file editing?
    I am having a very frustrating time setting up a custom template. It either is perfect and works or something is broken and can crash unity. The process for editing in code editor, hopping back to unity and then having to change the template to something else then back to the working one is tiresome and prone to breaking.

    If not even needing multipass I still have to make a new template and edit it to say just change the cull settings and do the the same break and re-fix workflow for testing a change.

    Editing a script file was not what I had envisioned using this tool for. I have experience with making multi pass shaders by hand, was just hoping this tool would have alleviated that work flow.

    That said otherwise it a pretty nice tool, ive used a bunch of these for various other languages, it could use some grab tree nodes down and other selection and moving tools but aside from that its fun!
     
    Last edited: Nov 14, 2021
  6. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,387

    What shader type are you using in your existing files and which renderer do you have set in that 2021 project?
    Could also just be that you need to open and save the shaders to update them.


    Sorry, not at the moment, only URP and Built-in.

    We'd love to but it ultimately depends on the shader type, not actually possible with Surface Shaders for example.

    We do include a Multipass template, a Lit type for the built-in render, and URP supports an extra pass. It's tricky to find a solution that fits all requirements but we're open to specific requests. (support@amplify.pt)
     
  7. Luke-kaser

    Luke-kaser

    Joined:
    Apr 2, 2018
    Posts:
    9
    Hi Amplify
    I have a question abuout the ASE SRP additional light node.
    In my scene I use two direction light to lighting Wall and Floor.
    one direction light only light the wall layer.
    and another one only lighting the floor layer.


    int numLights = GetAdditionalLightsCount();
    for(int i = 0; i<numLights;i++)
    {
    Light light = GetAdditionalLight(i, WorldPosition);
    half3 AttLightColor = light.color *(light.distanceAttenuation * light.shadowAttenuation);
    Color +=(dot(light.direction, WorldNormal)*0.5+0.5 )* AttLightColor;

    }


    The rendering result shown, both direction lights will lighting both of floor and wall layer.
    The cullingMask seems to not work.

    any good way to solve this issue?
    SRPADDLight Floor Light Off.PNG SRPADDLight Light Off.PNG SRPADDLight WallLight Off.PNG SRPADDLight.PNG
     

    Attached Files:

    Last edited: Nov 17, 2021
  8. Amplify_Ricardo

    Amplify_Ricardo

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

    We used to be able to access the correct information with the built-in renderer given that Unity ran its Forward Base and Forward Add for each light.However, this is no longer the case in URP, lights are calculated in a single pass. As a result of this change, we have no practical/reliable way of accessing other lights; the World Space Light Dir node returns the light that Unity itself considers to be its main light.

    There seems there could be a way to access additional light sources, given the function "GetAdditionalLight(uint i, float3 positionWS)", but we don't have any way of knowing which index corresponds to each light. Doing so could result in even more problems, we're not actually sure how the light order is handled in some situations.

    We're not going to be able to provide support for that type of use given how URP works. We will keep this on our radar for possible future improvements/changes.
     
    Luke-kaser likes this.
  9. Luke-kaser

    Luke-kaser

    Joined:
    Apr 2, 2018
    Posts:
    9
    Thanks for the quick reply. I will keep trying another way to solve this issuse;)
     
    Amplify_Ricardo likes this.
  10. HiWill

    HiWill

    Joined:
    Jun 2, 2013
    Posts:
    18
    GetFileAssetRelativePath return error url! Debug info attached!
     

    Attached Files:

    • ref.png
      ref.png
      File size:
      119.2 KB
      Views:
      89
  11. DuvE

    DuvE

    Joined:
    May 22, 2016
    Posts:
    149
    What refraction model is used in Master Node (Built-in)? And how it can be recreated using nodes, so I can understand how it works.

    upload_2021-11-20_10-42-36.png
     
  12. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,387
    Hey, can you share additional details on where and when this happens?

    Thanks!

    Hey there, we don't have a node example for that specifically but you can examine the shader source for additional details. We recommend using WinMerge to check differences, with and without Refractions.

    upload_2021-11-22_10-42-41.png


    Water Refraction example: https://catlikecoding.com/unity/tutorials/flow/looking-through-water/
    Perhaps this tutorial might help get it started:
     
  13. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,387
    Quick follow up, we pinpointed the issue and fixed it on our end, Custom Expression File Asset mode was only expecting files from the Assets folder thus generating those invalid paths. But now it also takes files dragged from the Packages folder into account.

    We'll be uploading a build soon (most likely tomorrow) and this fix will already be on it.

    Thanks for reporting it!
     
    HiWill likes this.
  14. P3ndragonLLC

    P3ndragonLLC

    Joined:
    Sep 19, 2019
    Posts:
    87
    Hello,

    Are there any shaders in the Amplify shader pack for auto paint?

    Thanks!
     
  15. Amplify_Ricardo

    Amplify_Ricardo

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

    Just a small example that applies a gradient based on height, could be used to create other effects but requires some work with Amplify Shader Editor.

    An auto-paint terrain sample is definitely something to consider for future updates.
     
    P3ndragonLLC likes this.
  16. P3ndragonLLC

    P3ndragonLLC

    Joined:
    Sep 19, 2019
    Posts:
    87
    Thanks, I'll check it out.

    Yeah, that would be a great use for amplify :)
     
    Amplify_Ricardo likes this.
  17. ArcaneParadigm

    ArcaneParadigm

    Joined:
    Jan 8, 2014
    Posts:
    6
    just got this trying to load the shader pack and it crashed my project twice - what should i do to get it to work?
    thanks
     

    Attached Files:

  18. wechat_os_Qy00smRDz5wLDD6s_CsEfuIOc

    wechat_os_Qy00smRDz5wLDD6s_CsEfuIOc

    Joined:
    Aug 18, 2020
    Posts:
    6



    It's been a long time.
    With your help,After I read the paper and URP source code...I built a custom PBR node that started almost from scratch.In order to modify different parts of the lighting and greatly reduce the branches of compilation.Perhaps it's easier to do this. But I love ASE more!
     

    Attached Files:

  19. wechat_os_Qy00smRDz5wLDD6s_CsEfuIOc

    wechat_os_Qy00smRDz5wLDD6s_CsEfuIOc

    Joined:
    Aug 18, 2020
    Posts:
    6
    I found my friend to translate the correct English:It has been a long time since we contacted. With your assistance, i have finished reading some academic articles about the source code of URP RenderPipeline. From scratch, I finished building a custom Illumination node, in order to facilitate changing and replacing each illumination part of PBR, and to reduce the branch generated by compilation.Maybe using this type of program pure code is easier, but I prefer ASE.
     
  20. Francoimora

    Francoimora

    Joined:
    Aug 1, 2013
    Posts:
    35
    Hi !

    DepthNormals pass generated by Amplify URP PBR master node doesn't output the right values. I'm using Unity 2021.2.2f1. Repro steps :

    1. Setup two cubes in your scene

    upload_2021-11-26_11-27-34.png

    2. Add SSAO Render Feature in your Forward Renderer with source set at "Depth Normals" (to be sure that DepthNormalsPrepass occurs).

    upload_2021-11-26_11-28-36.png

    3. Open Frame Debugger and watch what is generated in the prepass. You should see this result :

    upload_2021-11-26_11-29-48.png

    4. Create a simple URP PBR shader that does nothing and set it on one of your cube.

    5. Watch the result in frame debugger, colors are not correct.

    upload_2021-11-26_11-30-45.png

    More informations : This works as intended if the shader is created with Shader Graph. The problem comes from Amplify.
     
  21. Amplify_RnD_Rick

    Amplify_RnD_Rick

    Joined:
    Feb 15, 2016
    Posts:
    528
    That's odd, we tried importing Amplify Shader Pack into an empty project created with Unity 2019.4 from the Asset Store and it went well. Is it possible for you to try that on your end as well?
    Thank you for reporting this, we'll take a look at it as soon as we can.
     
  22. Amplify_RnD_Rick

    Amplify_RnD_Rick

    Joined:
    Feb 15, 2016
    Posts:
    528
    Hey @Francoimora,

    Did some tests now and the results are similar between ours and SG.



    Perhaps I'm missing something on my setup?

    Added the SSAO render feature with the exact same parameters and it is indeed being calculated as we can see over here:



    Sorry about this question but just to be sure, you are using our latest URP 12 templates from our latest build no?
     
    Last edited: Nov 26, 2021
    Luke-kaser likes this.
  23. Francoimora

    Francoimora

    Joined:
    Aug 1, 2013
    Posts:
    35
    Ok I thought I was up to date because I took the latest version from the asset store (and Amplify window was telling me I had the latest version) but by downloading amplify from the link your provided and after regenerating my shaders, everything works fine. Thanks :)
     
  24. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,387
    Just to add, that Version Check was checking the Asset Store version, our site always has the latest dev builds before they hit the store!
     
  25. Gullie667

    Gullie667

    Joined:
    Apr 21, 2021
    Posts:
    10
    I think Amplify is broken in my project. Any chance for a quick fix please?!

    Unity 2020.3.22f1
    Amplify 1.8.9r26
    Universal Render Pipeline 10.7.0

    Create a new project -->
    Import URP -->
    Assign URP To Graphics / Quality Settings -->
    Create a new Amplify Shader -->
    Change 'Shader Type' to 'Universal/Unlit'
    Assign a color to color -->
    Compile shader -->

    This is the first error:

    Shader error in 'Hidden/Universal/PBR': Couldn't open include file 'Packages/com.unity.render-pipelines.universal/ShaderLibrary/DBuffer.hlsl'. at line 680

    Compiling Vertex program
    Platform defines: SHADER_API_DESKTOP UNITY_COLORSPACE_GAMMA 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: DIRLIGHTMAP_COMBINED DYNAMICLIGHTMAP_ON LIGHTMAP_ON LIGHTMAP_SHADOW_MIXING SHADER_API_GLES30 SHADOWS_SHADOWMASK UNITY_ASTC_NORMALMAP_ENCODING UNITY_ENABLE_NATIVE_SHADOW_LOOKUPS 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_VIRTUAL_TEXTURING _ADDITIONAL_LIGHTS _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHT_SHADOWS _ADDITIONAL_OFF _CLUSTERED_RENDERING _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 _LIGHT_COOKIES _LIGHT_LAYERS _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN _MIXED_LIGHTING_SUBTRACTIVE _REFLECTION_PROBE_BLENDING _REFLECTION_PROBE_BOX_PROJECTION _SCREEN_SPACE_OCCLUSION _SHADOWS_SOFT
     
  26. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,387
    Hey, thanks for reaching out!

    That is an odd one, is there anything else on the console? Please show us the full log.
    The new shader you create, does it save and can be used in your scene or is it pink?

    Unfortunately, based on the description, that file is not ours nor does it give us any hints to what could be happening on your end. Did you upgrade your Unity or URP version recently?

    There could always be a version mismatch, in that case importing the USRPTemplates 10xx - 11xx (Legacy) package should correct the issue.


    Let us know, I'm sure we can figure out what happened; this is not the usual behaviour.

    Thanks!
     
    Last edited: Nov 30, 2021
  27. Gullie667

    Gullie667

    Joined:
    Apr 21, 2021
    Posts:
    10
    Only 2 errors. I'll paste em at the end.

    It shows up in the 'Failed to Compile List' and when applied it's pink.

    All of this is a fresh install. Project, URP, and Amplify. I was having the same issue in my game project so
    I created this test case to ensure it was not something I am doing. It was working fine but I upgraded to the latest version when this started happening. The previous version was Amplify 1.8.9r20 If it isn't Amplify, I'm not sure what else it could be. Unity seems to be working fine in all other cases.... In my game project the shaders all work untill I attempt to recompile them... then they break.

    Where exactly do I find this to reimport? I assume you guys have actually tested Amplify 1.8.9r26 with Unity 2020.3.22f1 while using Universal Render Pipeline 10.7.0??

    ERRORS:
    ________________________________________________________________________

    Shader error in 'New Amplify Shader': Couldn't open include file 'Packages/com.unity.render-pipelines.universal/ShaderLibrary/DBuffer.hlsl'. at line 179

    Compiling Fragment program
    Platform defines: SHADER_API_DESKTOP UNITY_COLORSPACE_GAMMA 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 DIRLIGHTMAP_COMBINED INSTANCING_ON LIGHTMAP_ON SHADER_API_GLES30 UNITY_ASTC_NORMALMAP_ENCODING UNITY_ENABLE_NATIVE_SHADOW_LOOKUPS 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_VIRTUAL_TEXTURING _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 _SAMPLE_GI

    ________________________________________________________________________

    Shader error in 'New Amplify Shader': Couldn't open include file 'Packages/com.unity.render-pipelines.universal/ShaderLibrary/DBuffer.hlsl'. at line 891

    Compiling Fragment program
    Platform defines: SHADER_API_DESKTOP UNITY_COLORSPACE_GAMMA 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 DIRLIGHTMAP_COMBINED INSTANCING_ON LIGHTMAP_ON SHADER_API_GLES30 UNITY_ASTC_NORMALMAP_ENCODING UNITY_ENABLE_NATIVE_SHADOW_LOOKUPS 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_VIRTUAL_TEXTURING _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 _SAMPLE_GI
     
  28. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,387


    Hey there,

    Thanks for the details, it does sound like a version mismatch. And of course, we test on multiple releases; the only thing we don't support are Beta and Alpha distributions.

    To elaborate, ASE 1.8.9r20 would have definitely needed to be updated to properly detect URP 10.7 and auto-import the correct templates.

    1. On the new project, did you import ASE 1.8.9r26 directly or update from r20? If the problem persists with r26, import the "USRPTemplates 10xx - 11xx"(you can search for it on the ASE folder); please check if any files are listed to import, if so that means there could be an issue on our side with the auto-import.

    2. On your existing project you should also be able to get rid of those errors by removing the ASE Folder directly from the project tab and re-importing it. By re-importing I mean importing the ASE r26 package you downloaded from our site. After the re-import, disable the automatic SRP template import and import the "USRPTemplates 10xx - 11xx" manually. Give the editor a restart and you should be good to go.

    upload_2021-12-1_10-55-43.png

    Our apologies for the inconvenience, this is usually a pretty smooth process but there could be something wrong on our end. We'll run additional checks, there have been version changes on Unity side before that conflict with our auto-imports, we're double checking it asap.

    Thanks!
     
    Luke-kaser likes this.
  29. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,387
    I can confirm that something definitely changed on URP version checks, ASE was importing the wrong templates. One of our developers will correct this immediately. URP 12 templates are currently being imported automatically instead of 10.x - 11.x.

    To correct this on your end.
    1. Disable the Auto-Import of SRP Templates I mentioned in my previous post under "Preferences".
    2. Delete the URP 12 contents located here(if any):
    AmplifyShaderEditor\Plugins\EditorResources\Templates\Universal
    3. Import the correct URP package for URP 10.x - 11.x:
    AmplifyShaderEditor\Plugins\EditorResources\Templates\SRP (Legacy)\USRPTemplates 10xx - 11xx (Legacy).unitypackage
    4. Restart Unity, open ASE under Window > Amplify Shader Editor > Open Canvas and create a new URP shader; everything should work as expected from here. You can also create shaders from the Create menu of course.

    If you still experience issues, please forward a new project with the problem present, and ASE, to support@amplify.pt using GDrive or WeTransfer for further examination. (please do not post the project here with ASE)

    Once more, apologies for the inconvenience, this is not the normal editor/import behaviour.

    Thanks!
     
  30. Luke-kaser

    Luke-kaser

    Joined:
    Apr 2, 2018
    Posts:
    9
    Hi Amplify Ricardo
    I want to use ASE editor to create grass shader like this effect.
    Grass.PNG

    How should I use ASE editor to use geom function ? or any advice to learning begin make a simple geometry shader by use ase editor.


    [maxvertexcount(10)]
    void geom(triangle v2g input[3], inout TriangleStream<g2f> tristream)
    {
    ..... shader code
    }


    -------------------------------------------------------------------------------------------------------------------------
    #7002 About GetAdditionalLight calculate issue
    and about urp additional light issue. I got the respon from Unity.
    [this issue only case under urp version 12]
    Unity say
    https://docs.unity.cn/Packages/com....versal@12.0/manual/lighting/light-layers.html
    When Universal RP 12.0.0 version was release Unity add new function "Light Layer" to solve ths GetAdditionalLight API bug.
    and when use custom light is mean to use GetAdditionalLight we can use "IsMatchingLightLayer" to check which light is need to be calcuate.

    IsMatchingLightLayer(light.layerMask, meshRenderingLayers)



    for (uint lightIndex = 0; lightIndex < min(_AdditionalLightsDirectionalCount, MAX_VISIBLE_LIGHTS); lightIndex++)
    {
    Light light = GetAdditionalLight(lightIndex, inputData, shadowMask, aoFactor);
    if (IsMatchingLightLayer(light.layerMask, meshRenderingLayers)) // use this funcion to check light layer
    {
    lightingData.additionalLightsColor += CalculateBlinnPhong(light, inputData, surfaceData);
    }
    }
     

    Attached Files:

  31. Amplify_Ricardo

    Amplify_Ricardo

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

    I'm afraid ASE currently does not handle geometry shaders; it's planned but no ETA at the moment. If you're an experienced shader developer, perhaps our Template System can be of service: https://wiki.amplify.pt/index.php?title=Unity_Products:Amplify_Shader_Editor/Templates

    I have not personally tested that with URP 12 but I definitely recommend taking the latest update on our site for a spin; feedback welcome on any issues you might find.

    http://amplify.pt/download/
     
    Luke-kaser likes this.
  32. Luke-kaser

    Luke-kaser

    Joined:
    Apr 2, 2018
    Posts:
    9
    Thanks for the reply ^^
    haha Templates system is a good choice.
    it was helpful:)
     
    Amplify_Ricardo likes this.
  33. rubiez64

    rubiez64

    Joined:
    Jul 25, 2016
    Posts:
    26
    Hey, sorry to bother, I'm not sure this is the place to write this.
    I have a strange issue when im trying to create a volumetric fog shader using the screen position and screen depth trick.
    I follow a tutorial and right at the start I ran into an issue.
    upload_2021-12-4_11-10-57.png
    This is my Shader setup, "Screen Position" is type screen, screen depth is in eye space, convert to Linear is true.
    upload_2021-12-4_11-13-44.png
    Unfortunately this is my result.
    it looks different depending on the view direction, but its not the result im expecting.
    according to the tutorial it should look something like this:
    upload_2021-12-4_11-15-38.png
     
  34. Amplify_Ricardo

    Amplify_Ricardo

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

    Something definitely outdated there, I believe that tutorial has been omitted from the official tutorial list for now.

    Try using the Depth Fade node instead.
    https://wiki.amplify.pt/index.php?title=Unity_Products:Amplify_Shader_Editor/Depth_Fade
     
  35. ohunity

    ohunity

    Joined:
    Jan 19, 2014
    Posts:
    628
    Is there any updated URP template to support URP 12 light cookies?
     
  36. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,387
    It should work with the available template, similarly to how it works with URP 12 SG shaders. Be sure that you're using the latest version from our site, the Asset Store package will be updated soon.

    http://amplify.pt/download

    Let us know if you run into any issues.
     
  37. tangchuan

    tangchuan

    Joined:
    May 3, 2021
    Posts:
    1
    hey,you made a great work! how can i do this shader?
     
  38. Amplify_Ricardo

    Amplify_Ricardo

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

    That's ultimately going to depend on the renderer used, our shader pack(free for ASE users) includes a Translucency, Transmission, and HDRP SSS sample that you might find useful.

    Check the full shader list here: Official Wiki
     
  39. arkadius4991

    arkadius4991

    Joined:
    May 31, 2019
    Posts:
    2
    hey folks, I just bought the editor and created an empty URP project to test it out, and I get errors like this when I import URP samples


    \Shader error in 'ASESampleShaders/SRP Lightweight/2D Fractal': Couldn't open include file 'Packages/com.unity.render-pipelines.lightweight/ShaderLibrary/Core.hlsl'. at line 245
     
  40. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,387
    Hey, like I said on Discord, seems you imported the Lightweight sample instead of the URP samples.

    You should remove that folder. In any case, you can either import the URP samples on the pack or get the full sample pack, for FREE, here: https://assetstore.unity.com/packages/vfx/shaders/amplify-shader-pack-202484
     
  41. netmarbleneo

    netmarbleneo

    Joined:
    Aug 30, 2017
    Posts:
    2
    HI! I used Light Attenuation Node in URP 12 Unlit Template. but cascade shadows LastBorder is not visible.
    Is there a way to help me?

    upload_2021-12-15_17-56-5.png
     
  42. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,387
    Thanks for the heads-up, we'll run a few tests to confirm it.

    What shader are you using on the right side?
     
  43. netmarbleneo

    netmarbleneo

    Joined:
    Aug 30, 2017
    Posts:
    2
    upload_2021-12-15_20-7-16.png
    Thanks for the reply
    I used Template "Universal/Unlit".
    I got the latest update today.


    Code (CSharp):
    1. Light GetMainLight(float4 shadowCoord)
    2. {
    3.     Light light = GetMainLight();
    4.     light.shadowAttenuation = MainLightRealtimeShadow(shadowCoord);
    5.     return light;
    6. }
    7.  
    8. Light GetMainLight(float4 shadowCoord, float3 positionWS, half4 shadowMask)
    9. {
    10.     Light light = GetMainLight();
    11.     light.shadowAttenuation = MainLightShadow(shadowCoord, positionWS, shadowMask, _MainLightOcclusionProbes);
    12.  
    13.     #if defined(_LIGHT_COOKIES)
    14.         real3 cookieColor = SampleMainLightCookie(positionWS);
    15.         light.color *= cookieColor;
    16.     #endif
    17.  
    18.     return light;
    19. }
    Perhaps the code generated by Light Attenuation is the first GetMainLight function, but I wonder if it will work if the second is generated.
     
    Last edited: Dec 15, 2021
  44. Cactus_on_Fire

    Cactus_on_Fire

    Joined:
    Aug 12, 2014
    Posts:
    650
    Made this with ASE. Thanks for making a great shader editor :)

     
    Amplify_Ricardo likes this.
  45. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,387

    That looks amazing, great job as always!
     
  46. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,387
    We'll follow up as soon as one of the devs as a chance to examine this, thanks for reaching out.
     
  47. SunnySunshine

    SunnySunshine

    Joined:
    May 18, 2009
    Posts:
    831
  48. Botaurus

    Botaurus

    Joined:
    Feb 20, 2013
    Posts:
    28
    Can outlines in an outline shader be enabled/disabled with 'Material.SetShaderPassEnabled' to improve performance? For example if you have many objects but only the one under the mouse cursor needs to be outlined.
    It seems that Shader Editor can setup passes, but I don't know enough about shaders to know if this is a good direction to pursue.
    In the comments of an Amplify video about outlines it was stated that 'Ideally, you will use two separate shaders for this.' After seeing that passes can be enabled/disabled and shader editor can setup passes, just wondering if its also a solution as it might be more convenient.
    Thank you!
     
  49. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,387

    It does but it seems that you ran into a specific issue with the decal projector, I'll pass this on to our devs for further examination. Alternatively, you can use the decal on a plane/quad mesh, that should work as expected.

    We'll get back to you as soon as we tackle this issue, apologies for the inconvenience.

    I'm afraid Outlines are a special case, they cannot be turned off.

    You can look into handling passes but this will not work on all shaders, it won't work on Surface shaders for example. We do include a Multi-pass template and example, assuming you're using the built-in renderer, but this is an advanced topic. Alternatively you can create your own multi-pass templates, this does involve some coding.
    http://wiki.amplify.pt/index.php?title=Unity_Products:Amplify_Shader_Editor/Templates#Multi-Pass

    A quick solution to what you're looking for is to use the Outline node and set it to masked or transparent, you can then change its opacity value with a float. Assuming you're using the built-in renderer, otherwise you'd have to set this on the pass responsible for the outline as shown in the video.
    http://wiki.amplify.pt/index.php?title=Unity_Products:Amplify_Shader_Editor/Outline
     
    Last edited: Dec 20, 2021
    SunnySunshine likes this.
  50. NOT_Lonely

    NOT_Lonely

    Joined:
    Feb 2, 2013
    Posts:
    471
    Hi,
    Is it possible to make the tessellation as a shader feature and draw a checkbox in the material inspector which will enable/disable this shader feature?
     
unityunity