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

    syscrusher

    Joined:
    Jul 4, 2015
    Posts:
    1,104
    I can't recall the context offhand, but somewhere not too long ago I encountered a situation where two consecutive underscores was treated as a delimiter for some reason, but single underscores were passed as part of a name. I wish I could remember where that was; to be honest, I'm not even sure it was in Unity because I also program outside Unity. Something to think about, but unless I suddenly get a better memory, don't put more stock in my musing than it deserves. :)
     
    IllTemperedTunas likes this.
  2. IllTemperedTunas

    IllTemperedTunas

    Joined:
    Aug 31, 2012
    Posts:
    782
    One thing's for sure, No more underscore usage for me when naming things in shaders!
     
    Rowlan likes this.
  3. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,389
    Thanks for the heads-up, that gives us some clue to what is going on.

    I'll get back to you as soon as we have additional insights.
     
  4. IllTemperedTunas

    IllTemperedTunas

    Joined:
    Aug 31, 2012
    Posts:
    782
    **thumbs up**
     
    Last edited: Mar 29, 2020
  5. devyndamonster

    devyndamonster

    Joined:
    Oct 11, 2017
    Posts:
    3
    Hello, I'm currently having some weird problems with reflections using amplify shader. Heres a recording of what I mean:
    . I've attached a picture of the shader I've mader. Most of the stuff plugged into the emission of the shader can be ignored, since that effect isn't used here. Has anyone else had this weird behavior?
     

    Attached Files:

  6. AaronXRDev

    AaronXRDev

    Joined:
    Dec 13, 2014
    Posts:
    30
    Hello! I am trying to make an x-ray shader that only shows behind objects on a specific layer, is that possible?
     
  7. syscrusher

    syscrusher

    Joined:
    Jul 4, 2015
    Posts:
    1,104
    Maybe something with a stencil buffer? See the portal example that comes with ASE to see if perhaps that technique could work for you.
     
    AaronXRDev likes this.
  8. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,389
    Seems like the result of a spherical lower resolution reflection probe, I don't see any reflection manipulation in your shader screenshot. Have you tried using Box Projection reflection probes, Screen Space Reflections, or planar reflections with HDRP?

    You should see similar results with the Standard Unity shader but, if not, then we would need to run a few tests with a similar case.

    Got back to you on Discord, please don't duplicate questions ;)

    For reference, the Stencil and Xray samples are a good start.
     
  9. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,389
    I'm afraid we don't have sample for that. Seems to be working, can you share a simple example of how you're using it?

    Thanks!
     
  10. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,389
    Ok, turns out that this is a WebGL limitation, not specific to our editor. We're not entirely sure if it's specific to that Unity version, it's not something we've come across before.

    "identifiers containing two consecutive underscores (__) are reserved as possible future keywords"
     
    Last edited: Mar 30, 2020
  11. syscrusher

    syscrusher

    Joined:
    Jul 4, 2015
    Posts:
    1,104
    Absolutely; I'll extract out a simple test case that will be easy to analyze without irrelevant nodes around it. :)

    Update 2020-04-06: I haven't forgotten about this, but the past few days have been swamped with time-critical project work. Apologies for the delay!
     
    Last edited: Apr 6, 2020
    Amplify_Ricardo likes this.
  12. ArminJohansson

    ArminJohansson

    Joined:
    Jan 8, 2019
    Posts:
    14
    I'm not running into any specific issue, this is a general usability preference. I think it would be better if the preview always visualized the shader applied on regular coordinates. The vertex color preview occludes much of the texture and it is IMO more harmful then helpful.
     
  13. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,389
    Thanks for confirming it. I'll make sure our devs get your feeback for further improvements/additions. Although, in this case, I don't think it's something that would be too useful in some cases, or possible to display as you're picturing it, as those values are not confined to specific values such as the UV node(0-1).
     
    Last edited: Apr 1, 2020
  14. UnityRocksAlt

    UnityRocksAlt

    Joined:
    Dec 28, 2015
    Posts:
    157
    Your product is amazing, I love it.

    Is there a LUT Node? If it is mathematically possible to make it through nodes - can I know how to, since I am creating everything in my game like assets, programming, shaders, etc I don't have too much time to create custom nodes

    If anyone can make a LUT Node here, please help
     
  15. markashburner

    markashburner

    Joined:
    Aug 14, 2015
    Posts:
    212
    Hi

    I am having some issues with an ocean shader I have just developed with Amplify, my depth doesn't seem to work correctly with a custom made shader for my planet terrain. The depth works with Unity's standard shader though but just not with my custom shader.

    Here in this screen shot, the depth doesn't work with my custom shader.


    But if I use the standard Unity shader. It works:



    Obviously I would prefer to use my own custom planet shader over Unity's standard shader.

    Would anyone be able to tell me how to get it to work with my custom planet shader?

    Thanks
     
  16. markashburner

    markashburner

    Joined:
    Aug 14, 2015
    Posts:
    212
    Also Another issue I am having is that I can't get my Amplify shader to work with the Camera settings on deffered. My shader just glitches all the time. Do Amplify Shaders not work with the Main Camera set to deffered? I am using Unity 2018.4.15f.

     
  17. code749

    code749

    Joined:
    Jan 17, 2009
    Posts:
    100
    hi

    am I able to create blend textures with this shader and then bake the output as a single image

    for mobile terrain assets

    thank you in advance
     
  18. Amplify_Ricardo

    Amplify_Ricardo

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

    Thanks for using ASE, we really appreciate it.

    I'm afraid we don't have a LUT node, but there are many resources out there that might help you get started. We also support custom expressions, if you're interested in using that instead of creating a Custom Node.



    Thanks for getting in touch, we would be happy to assist.

    I think we'll need a small sample for further examination, we're available privately via support@amplify.pt.

    Could be the case that you're using something Forward only, we'll need to know more in order to determine the problem.

    You are able to create shaders but baking textures is beyond what a shader editor provides. Check this User Sample, it includes a bake C# script: Material To Texture Baker (bottom of the page)

    Thanks!
     
  19. JLO

    JLO

    Joined:
    Nov 11, 2012
    Posts:
    46
    Hi, just thought I share this error I found when using a Gradient Sample into an Append node.

    Shader error in 'Test': incorrect number of arguments to numeric-type constructor at line 93 (on d3d11)

    Here's a simple setup to reproduce the error. Error.PNG
     
  20. JLO

    JLO

    Joined:
    Nov 11, 2012
    Posts:
    46
    I've been wondering, is it possible to make the "Gradient" node a property within the material inspector?
    I imagine it would have been done already, but I'm guessing it's not that simple to implement or for whatever reason.
    I would be a nice addition to the gradient node. So that way the same shader doesn't have to be duplicated again and again with the only change being the gradient (especially if multiple gradients are being used).

    :) so thought I ask, if this is something we could see in a future update or not to expect it? Thanks in advance.
     
  21. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,389
    Well spotted, there's something wrong with the Append node there. Use a Break To Components node for now, I'm going to pass this on to our devs, hopefully it will be corrected in the next update.

    upload_2020-4-7_11-44-13.png

    Thanks for the heads-up!

    You're right, it's not actually possible; hence why we created those nodes as a compromise ;)
     
    JLO likes this.
  22. JLO

    JLO

    Joined:
    Nov 11, 2012
    Posts:
    46
    Amplify_Ricardo likes this.
  23. fwalker

    fwalker

    Joined:
    Feb 5, 2013
    Posts:
    255
    I am seeing a problem with our Amplify shaders on iOS (works on Windows and Mac/Editor) when upgrading from Unity 2018.3.1f to 2019.3.8f. I got the latest Amplify package as well. 1.7.9. It looks like there are issues with the Z depth. The geometry using the Water shader is showing through other geometry.
    Has anyone seen similar problems? Any hints on the primary suspect to look at?

    Here is an example of what it looks like running on the Editor(Mac) and Running on the iPad. As you can see the "black" material is showing through the brown material. And the same things happen with the aqua color material.
    The two materials on the background are both transparent materials.

    On iOS (iPad I think 10.0)
    Screen Shot 2020-04-08 at 5.25.42 PM.png

    Runnig on the Mac Editor. What it should look like and what it looked like on 2018.3.1.f
    Screen Shot 2020-04-08 at 5.26.56 PM.png
     
  24. Amplify_Ricardo

    Amplify_Ricardo

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

    Thanks for the heads-up, we really appreciate it. While this could be specific to the platform used, it's best to run a few tests on our side. Can you share a small sample with the issue present so that we can run a few on-device tests?

    We're also available at support@amplify.pt

    Thanks!
     
    syscrusher likes this.
  25. o1o101

    o1o101

    Joined:
    Jan 19, 2014
    Posts:
    639
    Trying to get the Terrain instanced normal map feature working in ASE in URP?
    I tried looking at the built in shader code but couldn't figure it out!

    Any tips?

    Thanks :)
     
  26. o1o101

    o1o101

    Joined:
    Jan 19, 2014
    Posts:
    639
    Also, my Amplify Shaders are displaying incorrectly on iOS with URP.
    For example my simple water shader:

    Water shader in Editor
    upload_2020-4-11_18-22-15.png

    IOS Metal (Android looks the same as this)
    upload_2020-4-11_18-36-15.png

    Sorry the screenshots aren't the best, but I can't really pinpoint what is happening, however to me it looks like the normals are wonky, and specular seems to be gone / incorrect as well.

    Do you have any idea what this is / what could cause this? Its preventing me from going forward with a bunch of things.

    Cheers
     
  27. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,389
    Hey there,
    I believe we have a sample for that, can you elaborate on what the problem is?

    Hard to tell, could be a platform specific issue. Have you checked your iOS compression settings?

    Other than that, we'd need an actual shader sample with the issue present(including textures in this case) so that we can run a few tests on iOS. Feel free to reach out to us directly at support@amplify.pt for direct, and private, examination.

    Thanks!
     
  28. Tracecat

    Tracecat

    Joined:
    Mar 20, 2014
    Posts:
    23
    Just updated to Unity 2019.3.9f1 and I now get these errors: Assets\AmplifyShaderEditor\Plugins\Editor\Nodes\SRP\HD\DiffusionProfileNode.cs(18,207): error CS0122: 'DiffusionProfileSettings' is inaccessible due to its protection level

    Seems like Unity guys decided to change the access to this code to internal. I tried to update to the latest asset store version but it didn't help... is there a fix for this?
     
  29. Amplify_Ricardo

    Amplify_Ricardo

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

    We've accounted for this in the latest update(hdrp 7.2.x), please update your ASE version. As a reminder, you can always get the most recent version from our website.

    Let us know if the problem persists, we would be happy to help.

    Thanks!
     
  30. o1o101

    o1o101

    Joined:
    Jan 19, 2014
    Posts:
    639
    Yea, the "Instanced Per Pixel Normal map" which is generated in newer versions of Unity and used in the latest terrain shaders. I didn't know you guys had a sample for this yet, but I check it out.

    Going to upload a repro project for my other issue.

    Thanks
     
  31. Tracecat

    Tracecat

    Joined:
    Mar 20, 2014
    Posts:
    23
    Ah sorry, I did forget that there is a download site for the most recent versions. Works now! Thank you very much!
     
  32. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,389
    Let us know if the terrain sample helps, we would be happy to assist.

    Thanks, be sure to check the texture compression; might just be the case that those normals are being affected. In any case, we will test it on our side just to be sure.


    Happy to hear it!
     
  33. kamicth

    kamicth

    Joined:
    Sep 30, 2018
    Posts:
    32
    i new using ase,

    i played around with both builtin and hdrp shaders.

    some builtin shaders can be converted more or less easily to hdrp, still my most difficult is for those ising opacity and opacity mask like dissolve and forcefiled.

    i failed during all day finding a solution.

    please can anybody show me how to obtain dissolve and forcefield with HDRP ?
     
  34. mxbrunner

    mxbrunner

    Joined:
    Sep 30, 2016
    Posts:
    4
    a newer update broke compilation for older Unity versions.
    I'm on Amplify Shader Editor 1.7.8 and Unity 5.6.6
    there are two points in the Amplify Shader Editor C# code where the same preprocessor check for the Unity version is done to accomodate for an API change:
    Code (CSharp):
    1. #if UNITY_5_6_OR_NEWER
    2.                 yield return www.SendWebRequest();
    3. #else
    4.                 yield return www.Send();
    5. #endif
    The check is wrong though. Even though I am on Unity 5.6.6, "SendWebRequest" is not defined, while "Send" is.
    When I look at the legacy API documentation, it seems that the "Send" method was renamed to "SendWebRequest" in Unity 2017.2:
    https://docs.unity3d.com/2017.1/Documentation/ScriptReference/Networking.UnityWebRequest.html
    https://docs.unity3d.com/2017.2/Documentation/ScriptReference/Networking.UnityWebRequest.html
    so I assume the switch should be changed to check #if UNITY_2017_2_OR_NEWER
    the erroneous check is located in both "ASEStartScreen.cs" and "InvalidDataChecker.cs"
     
  35. Amplify_Ricardo

    Amplify_Ricardo

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

    Indeed, some built-in shaders can be harder to convert given the renderer differences. Best to look into specific transparency differences(Standard - HDRP) in order to best understand how to convert similar samples.



    Regarding the Dissolve shader, you have to make sure that Alpha Clipping is toggled, that you plug the opacity value into the Alpha input, and that you create a property for the actual Mask Clip Value; notice that this value was set in the output node properties when using Surface Shaders.

    For the ForceShield, you'll need to change its opacity type to transparent and tweak the color/emission values as it's going to look somewhat different in HDRP; another important bit is to set the Smoothness value to 0 so you get rid of the default highlight in the HDRP version.

    I'll PM you an adjusted sample, hope it helps.

    Thanks for the heads-up, we were not aware of changes on intermediate releases; our ASE devs will sort that out as soon as possible!
     
  36. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,389


    Happy to announce that we're part of the 2020 Spring Sale - Stay home, learn to create shaders!

    Learn more: Asset Store
     
    Lars-Steenhoff likes this.
  37. SF_futurlab

    SF_futurlab

    Joined:
    Feb 4, 2016
    Posts:
    19
    Hello, I have a hair shader that was posted by a very clever user called 'Farfarer' in 2013. It's very close to what we need in our game, but its written in code and I'm having difficulty understanding how to recreate it in Amplify Shader so that I can understand it and edit it. The main complexity is having 2 passes, and how the transparency is handled. Would any kind souls out there be able to help?
    (just in case, here is the shader code)

    Code (CSharp):
    1.     Shader "Exploration/Hair Soft Edge Surface" {
    2.         Properties {
    3.             _Color ("Main Color", Color) = (1,1,1,1)
    4.             _MainTex ("Diffuse (RGB) Alpha (A)", 2D) = "gray" {}
    5.             _SpecularTex ("Specular (R) Gloss (G) Null (B)", 2D) = "gray" {}
    6.             _BumpMap ("Normal (Normal)", 2D) = "bump" {}
    7.             _AnisoDirection ("Anisotropic Direction (RGB) Anisotropic Mask (A)", 2D) = "bump" {}
    8.             _AnisoOffset ("Anisotropic Highlight Offset", Range(-0.5,0.5)) = -0.2
    9.             _Cutoff ("Alpha Cut-Off Threshold", Range(0,1)) = 0.5
    10.             _Fresnel ("Fresnel Value", Float) = 0.028
    11.         }
    12.    
    13.         SubShader {
    14.             Tags { "RenderType" = "TransparentCutout" }
    15.    
    16.             CGPROGRAM
    17.                 #pragma surface surf ExplorationSoftHair fullforwardshadows exclude_path:prepass nolightmap nodirlightmap
    18.                 #pragma target 3.0
    19.    
    20.                 struct SurfaceOutputHair {
    21.                     fixed3 Albedo;
    22.                     fixed Alpha;
    23.                     fixed3 AnisoDir;
    24.                     fixed3 Normal;
    25.                     fixed2 Specular;
    26.                     fixed3 Emission;
    27.                 };
    28.    
    29.                 struct Input
    30.                 {
    31.                     float2 uv_MainTex;
    32.                 };
    33.              
    34.                 sampler2D _MainTex, _SpecularTex, _BumpMap, _AnisoDirection;
    35.                 float _Cutoff, _AnisoOffset, _Fresnel;
    36.                  
    37.                 void surf (Input IN, inout SurfaceOutputHair o)
    38.                 {
    39.                     float4 albedo = tex2D(_MainTex, IN.uv_MainTex);
    40.                     clip(albedo.a - _Cutoff);
    41.                  
    42.                     o.Albedo = albedo.rgb;
    43.                     o.Alpha = albedo.a;
    44.                     o.AnisoDir = tex2D(_AnisoDirection, IN.uv_MainTex).rgb * 2 - 1;
    45.                     o.Normal = UnpackNormal(tex2D(_BumpMap, IN.uv_MainTex));
    46.                     o.Specular = tex2D(_SpecularTex, IN.uv_MainTex).rg;
    47.                  
    48.                     // Stop DX11 complaining.
    49.                     o.Emission = fixed3(0.0,0.0,0.0);
    50.                 }
    51.    
    52.                 inline fixed4 LightingExplorationSoftHair (SurfaceOutputHair s, fixed3 lightDir, fixed3 viewDir, fixed atten)
    53.                 {
    54.                     viewDir = normalize(viewDir);
    55.                     lightDir = normalize(lightDir);
    56.                     s.Normal = normalize(s.Normal);
    57.                     float NdotL = dot(s.Normal, lightDir);
    58.                     float3 h = normalize(lightDir + viewDir);
    59.                     float VdotH = dot( viewDir, h );
    60.    
    61.                     float fresnel = pow( 1.0 - VdotH, 5.0 );
    62.                     fresnel += _Fresnel * ( 1.0 - fresnel );
    63.                     float aniso = max(0, sin(radians( (dot(normalize(s.Normal + s.AnisoDir), h) + _AnisoOffset) * 180 ) ));
    64.                     float spec = pow( aniso, s.Specular.g * 128 ) * s.Specular.r * fresnel;
    65.                  
    66.                     fixed4 c;
    67.                     c.rgb = (s.Albedo * saturate(NdotL) * atten * _LightColor0.rgb + (spec * atten * _LightColor0.rgb) ) * 2;
    68.                     c.a = s.Alpha;
    69.                  
    70.                     return c;
    71.                 }
    72.             ENDCG
    73.    
    74.             ZWrite Off
    75.    
    76.             CGPROGRAM
    77.                 #pragma surface surf ExplorationSoftHair fullforwardshadows exclude_path:prepass nolightmap nodirlightmap decal:blend
    78.                 #pragma target 3.0
    79.    
    80.                 struct SurfaceOutputHair {
    81.                     fixed3 Albedo;
    82.                     fixed Alpha;
    83.                     fixed3 AnisoDir;
    84.                     fixed3 Normal;
    85.                     fixed2 Specular;
    86.                     fixed3 Emission;
    87.                 };
    88.    
    89.                 struct Input
    90.                 {
    91.                     float2 uv_MainTex;
    92.                 };
    93.              
    94.                 sampler2D _MainTex, _SpecularTex, _BumpMap, _AnisoDirection;
    95.                 float _Cutoff, _AnisoOffset, _Fresnel;
    96.                  
    97.                 void surf (Input IN, inout SurfaceOutputHair o)
    98.                 {
    99.                     float4 albedo = tex2D(_MainTex, IN.uv_MainTex);
    100.                     clip(-(albedo.a - _Cutoff));
    101.                  
    102.                     o.Albedo = albedo.rgb;
    103.                     o.Alpha = albedo.a;
    104.                     o.AnisoDir = tex2D(_AnisoDirection, IN.uv_MainTex).rgb * 2 - 1;
    105.                     o.Normal = UnpackNormal(tex2D(_BumpMap, IN.uv_MainTex));
    106.                     o.Specular = tex2D(_SpecularTex, IN.uv_MainTex).rg;
    107.                  
    108.                     // Stop DX11 complaining.
    109.                     o.Emission = fixed3(0.0,0.0,0.0);
    110.                 }
    111.    
    112.                 inline fixed4 LightingExplorationSoftHair (SurfaceOutputHair s, fixed3 lightDir, fixed3 viewDir, fixed atten)
    113.                 {
    114.                     viewDir = normalize(viewDir);
    115.                     lightDir = normalize(lightDir);
    116.                     s.Normal = normalize(s.Normal);
    117.                     float NdotL = dot(s.Normal, lightDir);
    118.                     float3 h = normalize(lightDir + viewDir);
    119.                     float VdotH = dot( viewDir, h );
    120.    
    121.                     float fresnel = pow( 1.0 - VdotH, 5.0 );
    122.                     fresnel += _Fresnel * ( 1.0 - fresnel );
    123.                     float aniso = max(0, sin(radians( (dot(normalize(s.Normal + s.AnisoDir), h) + _AnisoOffset) * 180 ) ));
    124.                     float spec = pow( aniso, s.Specular.g * 128 ) * s.Specular.r * fresnel;
    125.                  
    126.                     fixed4 c;
    127.                     c.rgb = (s.Albedo * saturate(NdotL) * atten * _LightColor0.rgb + (spec * atten * _LightColor0.rgb) ) * 2;
    128.                     c.a = s.Alpha;
    129.                  
    130.                     return c;
    131.                 }
    132.             ENDCG
    133.         }
    134.         FallBack "Transparent/Cutout/VertexLit"
    135.     }
    136.  
     
  38. IllTemperedTunas

    IllTemperedTunas

    Joined:
    Aug 31, 2012
    Posts:
    782
    I'm not sure if there's a big aspect of Amplify shader i'm missing, but i'm finding it hard to find a simple and nice setup for certain shader types. If you guys are familiar with the old "shader forge" you could simply select "additive" and it would set evertying up nicely and you'd be good to go.

    Currently the best setup i've found is legacy and alpha blended for "additive". If I use the "surface" option I get zsorting issues which is really weird for an additive shader as it's supposed to not depth blend at all. The whole setup just feels "off". Further, if I set the shader model to 3.0, or 2.0 I'm still getting errors in the shader causing them to render pink on older devices.

    Here's the setup:


    Any insight into how i should be setting up an additive shader would be welcome.
     
  39. o1o101

    o1o101

    Joined:
    Jan 19, 2014
    Posts:
    639
    Hi, following up on this.

    I downloaded the latest from the Asset Store, and updated my URP samples. I opened up the latest samples and I don't see anything related to the per pixel normal map.

    This is the option in the built in URP terrain shader.
    upload_2020-4-19_11-26-38.png

    Would be super cool to access this texture that is automatically generated but I can't figure out how any ideas?

    Cheers.
     
  40. SuperUltraHyper

    SuperUltraHyper

    Joined:
    Sep 7, 2015
    Posts:
    112
    I am trying create a shader with manual MIP map generation.
    In the example file I have 3 shaders.

    a) A basic texture using 'Auto' for MIP calculation
    This Works
    b) A more complex shader where I am calculating the MIP map Derivatives.
    This Works
    c) A complex shader where I am attempting to calculate the MIP map Levels.
    This is not working.

    Any idea where am I going wrong?

    Attached in the zip: Sample Scene / Shaders / Materials / Texture

    In the image I have altered the DDS so that the mip swaps are obvious / colored.
    From Left the Right... Standard = Working; Derivative = Working; Levels = Only Mip 1 is showing.
     

    Attached Files:

  41. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,389

    Hello,

    Have you had a chance to check out the Multi Pass Distortion sample? Depending on your requirements, you might need to create a custom template. This is covered here: http://wiki.amplify.pt/index.php?title=Unity_Products:Amplify_Shader_Editor/Templates#Multi-Pass

    I suppose it depends on the type of shader used, we provide a larger selection than Shader Forge, and additional configuration options; I can definitely see how this could be overwhelming.

    What "surface option" are you referring to? We need to know exactly what you're doing in this shader so that we can determine what's causing z sorting problems.

    Are you using it on Particles? There's a specific option in the Blend mode called "Particle Additive"

    If you're seeing pink shaders, we're going to need a sample or additional details regarding existing shader errors; that's definitely not supposed to happen.

    Looking forward to additional details.

    Don't mind us, we were looking at something else. It seems that we created the template before that option was available, or it wasn't apparent at the time, hence why it's not available. It should be possible to add something, the ASE devs are looking into it for the next update.

    A temporary workaround, would be to use a Static Switch and add a pragma for it but we'll need to test it further.





    Make sure that "Instanced Terrain" is toggled.



    Could you share a sample of the terrain you're using to support@amplify.pt?

    Thanks!
     
  42. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,389
    Thank you for the detailed example, we've passed it on to one of our developers for further examination.
     
  43. o1o101

    o1o101

    Joined:
    Jan 19, 2014
    Posts:
    639
    Forgive me, I am a little unclear on the setup -
    upload_2020-4-20_14-44-37.png

    Looking through the built in shaders I see all sorts of things like:

    #pragma shader_feature_local _TERRAIN_INSTANCED_PERPIXEL_NORMAL
    [ToggleUI] _EnableInstancedPerPixelNormal("Enable Instanced per-pixel normal", Float) = 1.0
    Possibly I need to input these as well.

    Is there anything else you can see that I am missing?

    Cheers :)
     
  44. MirzaBeig

    MirzaBeig

    Joined:
    Dec 27, 2014
    Posts:
    602
    I saw there were some neat functions added to the latest release, 1.8.0. Are these documented somewhere so I can get an idea of how to use them quickly (ideally with visual previews) without trying them out individually?

    upload_2020-4-20_19-35-51.png

    upload_2020-4-20_19-45-10.png
     
    Last edited: Apr 21, 2020
  45. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,389
    Apologies for the inconvenience, might be best to wait for an official solution from our developers; it seems that there's more to it than we saw yesterday. Can you forward us a simple sample of the terrain you're using to support@amplify.pt? It could help speedup things.

    Thanks!

    Hey there, great to hear from you!

    I'm afraid not, they are fairly recent so they're not on our wiki just yet. We based them off the Shader Graph Procedural graph pattern Sample; they were added as per-user request.

    We will definitely add them to the wiki later.

    Apologies for the inconvenience.
     
  46. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,389


    Use our affiliate link and the coupon code SSAFF2020 for an extra 10% OFF on your total sale price; this is valid for all assets, not just ours!

    Learn more: Asset Store
     
    Squize likes this.
  47. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    Hey, guys... Having some fun, updating my eye shaders. The texture is completely procedural from Substance Designer, including the parallax map that was made from scratch. I am still trying to get both normal maps working together (one uses the POM, the other uses straight normals) as well as dual roughness maps.

    If I could make a feature request, I would love to see a radial gradient node, which would be perfect to do falloffs for the eyes (Iris more reflective than the sclera)

    Substance_Designer_wmJp0jKN8c.png Unity_b0Yk6FbcjP.png Unity_bqHTPpVkw6.png Unity_F6AfhHF8s0.png
     
  48. SF_futurlab

    SF_futurlab

    Joined:
    Feb 4, 2016
    Posts:
    19
    Thank you Ricardo for your reply - the link and documentation on how to do multipasses and custom templates is really great. All the best, Sean
     
    Amplify_Ricardo likes this.
  49. MirzaBeig

    MirzaBeig

    Joined:
    Dec 27, 2014
    Posts:
    602
    Gotcha, thanks for the heads up! I haven't been keeping track of things in Unity's Shadergraph but I'm glad ASE is so flexible to have similar functions.
     
    Amplify_Ricardo likes this.
  50. Yaos

    Yaos

    Joined:
    Mar 26, 2015
    Posts:
    6
    Hey everyone!
    I've seen many videos about shaders blending terrain with objects.
    but this video is the only one where you can clearly see it's only a amplify shader doing all the work : no script, no code, no unity terrain.
    How would you go about to create something like this ? I've been trying for ages.
    (warning : turn off the horrendous music)

     
    Last edited: Apr 22, 2020