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. Carrion-Crow

    Carrion-Crow

    Joined:
    Apr 3, 2015
    Posts:
    15
    Thank you, I'm looking forward to the new release, I hope I will not have time to fix it myself
     
  2. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,257
    That looks totally awesome! Would it be possible that you guys add an example for a shader with flowing water?
     
  3. StudioEvil

    StudioEvil

    Joined:
    Aug 28, 2013
    Posts:
    66
    Yep! :)
     
  4. benderete

    benderete

    Joined:
    Aug 31, 2014
    Posts:
    129
    Semi Off Topic (sorry):

    If you are interested, today's Packt Pub free ebook is Unity 5.x Shaders and Effects Cookbook by Alan Zucconi
    https://www.packtpub.com/packt/offers/free-learning

    IMHO, It is a very good source about shader coding and concepts and, of course, a great base to better understand tools like ASE.
     
  5. Ooi

    Ooi

    Joined:
    Nov 22, 2015
    Posts:
    11
    Was playing around with the Custom Toon Lighting example and managed to add outline without using the default outline feature. This is not perfect but at least you are able to customize the outline shape with a texture. The limitation is the flat surface, as you can see from on the Cube.




    The technique is not something new but hopefully, this can act as starting point for something. At the mean time, I'm still waiting for multipass support :3


     
    hopeful, Amplify_Paulo and benderete like this.
  6. Kellios11

    Kellios11

    Joined:
    Jun 6, 2016
    Posts:
    6
    Hey Amplify Peeps,

    First of all - thanks so much for the incredible editor. Have already been able to speedily and easily make shaders for my team, and couldn't be happier with not only the frequency of new features and updates, but the amazing community as well. Great stuff here.

    I've gotten the new update (v1.3.0 dev 03), am running Unity 5.6.2p1, and keep running into a funky bug. This error pops up whenever I run the game through editor:

    upload_2017-8-30_9-18-16.png

    It keeps spamming the error in console until I close the Amplify Shader Editor window, in which case it stops. I can open the window up again, and continue as normal.

    It's not game breaking, nor preventing me from working, but a bit annoying, and figured you'd like to know. Thanks bunches!
     
  7. Amplify_Paulo

    Amplify_Paulo

    Joined:
    Jul 13, 2017
    Posts:
    297
    Sorry for that, of all performance optimizations we did there's a small one that we weren't sure if it would produce problems. But apparently it did. It's nothing major so we'll revert it back and later today we'll submit and release a new version for the store without that error. Sorry for the inconvenience.

    Thx for the report, keep them coming.
     
    Kellios11 likes this.
  8. Amplify_RnD_Rick

    Amplify_RnD_Rick

    Joined:
    Feb 15, 2016
    Posts:
    528
    Hi everyone,

    Just to let you guys know we just uploaded a new build into our website.
    We also uploaded this new version into the Unity Asset Store.
    Here are the release notes.

    Release Notes v1.3.1 dev 01:
    • Fixes:
      • Fixed issue on copy-pasting custom lighting nodes
      • Fixed issue on null pointer reference on preview material when hitting play mode
    • Improvements:
      • Added upper left widgets into several nodes to change important properties directly on node body
      • Added secondary title into several nodes to show its current state directly from node body
    Happy shader creations!
     
    Kellios11 and petersx like this.
  9. StudioEvil

    StudioEvil

    Joined:
    Aug 28, 2013
    Posts:
    66
    HI all!
    I'm trying to recreate with ASE all the shaders i wrote for our game Super Cane Magic Zero. Everything was very fine until now: custom lighting! :D
    Let me explain what i'm trying to achieve. I need to replicate a toon shader that is similar to the one included in ASE samples. The real difference is that we need to go more toon like, ramping the attenuation too (all sources and files below).
    This is a test scene with, in order: ase toon shader, my original shader written by hand, and the rewritten shader with ase. So, let's look at the picture below:

    1 - Directional lighting: it's fine, no problem at all

    2 - Ambient light: everything's ok

    3 - Point lights: here you can see what do i mean with "ramping the attenuation". Also note that ase custom lighting sample does not make the "ramp effect" on a flat surface. So, everything's fine again with my new shader.

    4 - Emissive with directional light: it's ok again (ase toon shader does not have an emission texture)

    5 - Emissive with point lights: it's ok... no, wait, no. Something's wrong. Hmm...

    1-5.jpg

    And here it is: the point light range pain effect :(

    6.gif 7

    Let's try a different ramp: aargh.

    7.PNG

    8.gif

    Ok, i do not fully understand what is happening, nor how to fix that. Maybe i should try a different approach with that shader, but i'm out of ideas.

    Do you have any tip? I'm stucked with that :(

    Here's the shader. I'll attach source files on the next post.

    ASE shader.PNG
     
    KRGraphics likes this.
  10. StudioEvil

    StudioEvil

    Joined:
    Aug 28, 2013
    Posts:
    66
    Unity 2017.1 project test with scene and shaders:
    https://www.dropbox.com/s/sjyytkjl8knzczl/ASE custom lighting test.zip?dl=0

    The original working shader:

    Code (CSharp):
    1.  
    2. // Upgrade NOTE: replaced '_Object2World' with 'unity_ObjectToWorld'
    3.  
    4. Shader "STUDIOEVIL/TILESRAMPEDTWOTEXTURES"
    5. {
    6.     Properties
    7.     {
    8.         _Color ("Main Color", Color) = (1,1,1,1)
    9.         _MainTex ("Base Texture (RGB)", 2D) = "white" {}
    10.         _ExtraTex ("Extra Tex (R:EM G:-- B:-- A:--)", 2D) = "black" {}
    11.         _RampTex ("Ramp texure", 2D) = "white" {}
    12.         _EmissionMUL ("Emission MUL", Float) = 0
    13.    
    14.     }
    15.  
    16.     SubShader
    17.     {
    18.         Tags
    19.         {
    20.             "Queue"="Geometry"
    21.             "IgnoreProjector"="False"
    22.             "RenderType"="Opaque"
    23.         }
    24.         LOD 200
    25.    
    26.         CGPROGRAM
    27.         #pragma surface surf Ramp
    28.         #include "UnityCG.cginc"
    29.         #include "AutoLight.cginc"
    30.  
    31.         sampler2D _MainTex;
    32.         sampler2D _RampTex;
    33.         sampler2D _ExtraTex;
    34.         half4 _Color;  
    35.         half _EmissionMUL;  
    36.  
    37.         UNITY_INSTANCING_CBUFFER_START(Props)
    38.         UNITY_INSTANCING_CBUFFER_END
    39.  
    40.         struct Input
    41.         {
    42.             float2 uv_MainTex;
    43.         };
    44.  
    45.         half4 LightingRamp (SurfaceOutput s, half3 lightDir, half atten)
    46.         {
    47.             half NdotL = dot (s.Normal, lightDir);
    48.             half diff = NdotL * 0.5 + 0.5;
    49.             half3 ramp = tex2D (_RampTex, float2(diff, 0)).rgb;
    50.             half4 c;
    51.            
    52.             half3 myColors = s.Albedo * _LightColor0.rgb;
    53.             half myIllum = saturate(atten * 2);
    54.             half myRampedIllum = tex2D(_RampTex, float2(myIllum, 0.5));
    55.             c.rgb = myColors * myRampedIllum * ramp;          
    56.             c.a = s.Alpha;
    57.             return c;
    58.         }
    59.  
    60.         void surf (Input IN, inout SurfaceOutput o)
    61.         {
    62.             fixed4 c = tex2D(_MainTex, IN.uv_MainTex);
    63.             o.Albedo = c.rgb;
    64.  
    65.             // emissive extra texture
    66.             o.Emission = c.rgb * tex2D(_ExtraTex, IN.uv_MainTex).r * _EmissionMUL;
    67.         }
    68.         ENDCG
    69.     }
    70.  
    71.     Fallback "Legacy Shaders/Transparent/Cutout/VertexLit"
    72.    
    73. }
    74.  
     

    Attached Files:

  11. Amplify_Paulo

    Amplify_Paulo

    Joined:
    Jul 13, 2017
    Posts:
    297
    Hey there, thx for the detailed report.

    Your issue is divided in two parts.

    Surface shaders generate a function that runs on every pass. The data that is used in that function is sometimes transformed to match that pass requirements. For forward rendering this means there are some changes between the base pass and the add pass. The later runs for every extra light and is added on top of the base one. This means that when you create your emission part of the shader and you add it to the result of your calculations that addition will also happen for every add pass which is equivalent to say that it also happen for every point light. Since you only want to add emission once you need to filter point lights out and only leave the base one which is somewhat tied to the directional light. That is why you see a square highlight when you move your point light. You either attenuate it or you remove it completely. In you case it's the later.

    That has a simple solution in the editor, just do this:
    Unity_2017-08-31_11-04-37.png
    Type returns 1 for point lights and 0 for directional, by multiplying the whole thing by inverse of it you remove it completely.

    As for the other issue... As soon as I saw your post I knew it had something to do with filtering point lights out. I went to check it and to my surprise while you do have a problem with filtering point lights you also stumbled into a new unity 2017 bug that is breaking the light direction calculation for point lights. I still have to run more tests because I want to fix the 2017 version without breaking the previous ones but in essence everything that depends on the world light dir node breaks for point lights, which in your case it's almost everything. For now just wait until we circumvent this bug or use an earlier version of unity (which I'm guessing it's not an option for you).

    I know it doesn't solve your issue completely yet but this is a new bug that we weren't aware of. I hope you can understand.

    cheers
     
    Campbell_Fletcher and antoripa like this.
  12. TheAlmightyPixel

    TheAlmightyPixel

    Joined:
    Jun 21, 2014
    Posts:
    263
    Hi,
    I've been trying to create a shader that would write into the alpha channel of the deferred normal buffer. Is it possible to make a shader like this in Amplify?

    Thanks!

    EDIT: No answer needed after all, I changed my approach and found another solution :)
     
    Last edited: Aug 31, 2017
    Amplify_Paulo likes this.
  13. brett_ridel

    brett_ridel

    Joined:
    Jan 15, 2017
    Posts:
    33
    Hi

    I'm testing the "Standard Surface Light" node in the "Custom Lighting" model, plugged into the "Emission" master node input.

    I'm wondering what kind of information should I plug into the "normal" input. I ask because I tried local and world normals, but it's not working as expected. I suppose it's thought to be used with a normal map ? If so, is there a way to add an other input in order to specify only the "current" normal ?

    I'm very interested by this feature, because I evaluate my normal "on the fly" during the fragment shader step (with ddx and ddy). And, as far as I know, the only way to modify the normal during the lighting process is with the "Local Vertex Normal" input master node, that is used directly in the vertex shader. Therefore, it's not compatible with normal computed in the fragment shader.

    Brett
     
  14. StudioEvil

    StudioEvil

    Joined:
    Aug 28, 2013
    Posts:
    66
    Hi Paulo thank you very much for your explanation, it is really useful!
    No problem for the bug, we are not in a hurry actually and i think we are pretty ok with the fix you suggested.

    Best,
    XeviaN
     
    Last edited: Aug 31, 2017
  15. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,874
    How can i properly change UV tiling for texture array (script or shader)?

    Untitled.jpg
     
  16. Amplify_Paulo

    Amplify_Paulo

    Joined:
    Jul 13, 2017
    Posts:
    297
    Hey, sorry for only replying back to you now, yours is a bit more difficult.

    Can you confirm if this is what you want to do?
    Unity_2017-09-01_12-08-28.png

    I tested this using 5.4.5 and 5.6.3p1 and it seems to be working fine. Can you send me screenshots of the problem and the shader or even a repo case? Maybe i'm not fully understanding the problem or it could be something else entirely.

    That node in specific should be up in our wiki pretty soon, we've been updating it little by little and most of the custom light nodes are node but that one isn't yet. Either way, you guessed it correctly, it accepts a normal in tangent space, which normalmaps usually are. That node mimics the master node so it accepts the same kind of information. I'm not sure what you are trying to accomplish tho. Do you want to calculate the vertex normals yourself? if yes you should use the "local vertex normal" in the master node. If you want to calculate something per pixel you'll have to do those calculations in the "normal" output is the masternode (or the equivalent in the standard surface light node). Most likely you'll need some other nodes to convert the information from one space to another. For instance if you are using a normal map (tangent space) you might want it to convert to world space by using the "world normal" node. Or maybe you then want to convert it to local space (see: Vertex Normal), you would use either the WorldToObject matrix or the node that transforms it.

    I'm just throwing stuff around so you know your options since I'm not sure what you want and what you are having troubles with. If you can be more specific on those or on what's your goal I'll probably be more useful to you.

    Texture arrays function like any texture sampler, you can use the material inspector to change the tilling if you leave the UVs unconnected, or you can use the texture coordinate node that will generate UVs for your and has Tilling and Offset built in.
     
  17. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,874
    I want to use texture arrays as splats for terrain shader. So i need to assign different UV tiles for each splat.
    So i should to use Texture Coordinate node. But after using that, my shader will missing everything :
    Untitled.jpg
    Untitled.jpg
     
    Last edited: Sep 1, 2017
  18. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    I have been looking at the new template system today.

    Is there a way to create a surface shader template?
    I could not find a surface shader version of ase_vert_code.

    I would like to create a surface shader that does some custom setup to support instanced indirect rendering.
     
    antoripa likes this.
  19. brett_ridel

    brett_ridel

    Joined:
    Jan 15, 2017
    Posts:
    33
    My mistake. Thanks for the reminder, I had forgotten to convert my "evaluated normals" in tangent space. It's ok for me now ;-)
     
  20. Amplify_Paulo

    Amplify_Paulo

    Joined:
    Jul 13, 2017
    Posts:
    297
    Ahh, I see what you want to do now. Still, it's working as intended, when you use the Texture Coordinate node without any kind of reference it will create the UV for you, I'm not sure what's going on in there, but it seems you are tilling the masks as well, is that intended?

    Try it this way, use a Texture Object node and set the the auto lock mode to Texture2Darray and link it (notice that none of my array samplers are grey, I'm using them as objects being referenced by in Tex port)
    Unity_2017-09-01_14-03-23.png
    See if that changes anything, your previous attempt should already work but just in case try this instead.

    The templates purpose is to add support for vertex frag shaders as a way to create more complex shaders that aren't possible with surface shaders. So the short answer is no, it's not possible to create surface templates. If you want to add something that is doable in surface shaders we can add it to the main generator. If you want to create something outside of it it must be a template. In your case I'm assuming you want to do something that surface shaders already are capable of doing, is that correct? What exactly do need to add in your surface shader that you can't now? keep in mind that you add your own include files and use the custom expression node which already lets you run custom code, maybe that's enough for what you want to do?

    Also, just as a reference, here's the documentation for creating templates.

    Good to know ^^
     
    antoripa likes this.
  21. Amplify_Paulo

    Amplify_Paulo

    Joined:
    Jul 13, 2017
    Posts:
    297
    Hi everyone,

    We just uploaded a new build into our website.

    Release Notes v1.3.1 dev 02:
    • Fixes:
      • Fixed issue with 'World Normal' node not generating it's components values properly in some occasions
      • Fixed issue with some parameters foldouts not displaying correctly and added a new context message for empty foldouts
    • Improvements:
      • Changed some subtitles prefixes to be more consistent about what they represent
      • Changed dropdown icon to a less confusing and more intuitive one
      • More editor performance improvements and reduction of GC in various places
    Cheers!
     
  22. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,874
    I couldn't use Texture Arrays for my terrain shader (tiling issue )
    Final look from legacy mode :
    photo_2017-09-01_10-55-33.jpg
     
    petersx likes this.
  23. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,466
    You're a machine. :) This Editor is progressing quickly and I can't wait to dip into features like templates... and attempt to convert some shaders I have to be used in ASE. (But I'm not a programmer)
     
  24. MP-ul

    MP-ul

    Joined:
    Jan 25, 2014
    Posts:
    230
    Does ASE support CG or cginc files? if not do you have a plan to ?
     
  25. Deleted User

    Deleted User

    Guest

    No multiple pass?
     
  26. Gray_Master

    Gray_Master

    Joined:
    Jun 20, 2010
    Posts:
    152
    where postprosess examples? all what i creating not work (black screen)
     
    arnoob likes this.
  27. benderete

    benderete

    Joined:
    Aug 31, 2014
    Posts:
    129
    You have two examples on the folder AmplifyShaderEditor -> Examples -> Official -> TemplateExamples -> PostProcess
     
    arnoob likes this.
  28. Gray_Master

    Gray_Master

    Joined:
    Jun 20, 2010
    Posts:
    152
    hm. sorry not for my eyes :D
    PS. thx what say :)
     
  29. Carrion-Crow

    Carrion-Crow

    Joined:
    Apr 3, 2015
    Posts:
    15
    Is there any possibility of using POM with texture arrays?
     
  30. Amplify_Paulo

    Amplify_Paulo

    Joined:
    Jul 13, 2017
    Posts:
    297
    Yes it does, in the main property panel there's a foldout group called "Additional Includes" where you can add your own include files.
    Not yet, we totally do want to add it and you can count on it for the next few weeks, we just decided to hold it back a little because our templates solution is a fairly complex deal and we decided we would add it in incremental steps.
    This is actually an old request, at the time it was difficult to send the necessary data to the POM node and would require a lot of re-writing but I think now could be a good time to try again.
     
  31. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,874
    34.jpg

    When I close and re open the project again, shader give me below error :
    Code (CSharp):
    1. Shader error in 'LightingBox/Terrain 6-Layers': maximum ps_5_0 sampler register index (16) exceeded at line 106 (on d3d11)
    2.  
    After save and compile Shader again, everything becomes OK

    I have 14 texture sampler in my shader. API has been set to DX11 only in player settings.

    How can i fix this issue ?
     
  32. killa247

    killa247

    Joined:
    May 7, 2013
    Posts:
    25
    Hello, Is there a way to fix objects being rendered in from backface's?
    Cutout.png ewqwe.png
     
  33. Amplify_Paulo

    Amplify_Paulo

    Joined:
    Jul 13, 2017
    Posts:
    297
    Send me your shader so I can take a look. Depending on your shader model there are limits to how many of one thing you can have, like interpolators and registers. If you are doing terrain it might be a good idea to pack textures into atlas and/or use something like texture arrays (which i know it was giving you problems before). In either case I want to take a look at the shader in case something is misbehaving. If you don't want to share it here you can always send us an email or PM.

    First and foremost I highly advise you to update your version of the editor. Second, I'm not really sure what I'm seeing in the top screenshot, don't these nodes help you? (Switch by Face and Face)
     
  34. BOXOPHOBIC

    BOXOPHOBIC

    Joined:
    Jul 17, 2015
    Posts:
    508
    Hello,

    I had this problem some time ago. I updated to the latest version from the store (1.3.1), the bug is still there.
    I attached the shader again.

    I also have some suggestions:
    1. I played with shader functions lately. When a Function is compiled, it would be nice to recompile all the shaders containing that function, or maybe a different button for that, instead of opening all the shaders and manually recompile all of them.
    2. I think that it would be nice to have Header Attributes to group the parameters.

    Keep up the good work!
     

    Attached Files:

  35. Amplify_Paulo

    Amplify_Paulo

    Joined:
    Jul 13, 2017
    Posts:
    297
    Thx for the shader, the issues seems to be on the vertex to frag node. This is a community node that we don't look at it regularly and it needs some updates. I'll try to fix it for the next update.

    1. I'm totally on board on that, the issues is more about UX and usability, we actually have something similar for a different feature and it suffers from delays, editor responsiveness and other usability issues. In unreal for instance it gets kinda crazy when suddenly hundreds of shaders start to recompile and you aren't even sure if your change is the final one or if it breaks anything. Also, in unreal you have no feedback of what recompiled besides the text saying that X shaders are recompiling. Shader functions are destructible, if you remove inputs and recompile the shader using it there's no way of knowing how the graph was connected with function before the new compilation so if you then add the inputs again and recompile you would need to manually open the shader and reconnected those inputs. If you imagine this behavior for dozens of shader it gets messy pretty quickly. I think the best intermediary solution would be some sort of update tool where you have that info and maybe some kind of backup system just in case something doesn't go how you predict. It's not an easy issue and we though about it before, we just need figure out the best way to do it without adding risk of breaking shaders.

    2. As easy and obvious as this feature sounds it's actually not that simple. The first version of shader functions actually had custom headers for properties. We tried a bunch of different alternatives on to how to display them and generate them but eventually we decided to remove them altogether.
    This is mostly because of two reasons:
    a) Unity doesn't provide enough options in their material inspector and we can't simply roll our own. It would be nice to add a foldout or a box to represent what's inside the shader function. Header's alone are too vague and don't mesh well when you have multiple functions inside other functions. It becomes a bunch of headers together that make no sense. While we could create our own it would then break and not compile if someone used the shader without the editor. We don't want to tie the shaders you produce with the editor.
    b) Properties are unique. If you add the same property in two functions where does it belongs? In unity it counts as the same property. Our solution was to add the property once and let you decide where to put it using the ordered list in the left panel.

    I'm more inclined to add the header/space attribute to any property so you can add it everywhere and organize as you see fit. We "just" have to figure out how exactly.

    thx for the suggestions, I can't promise if anything will change and thats why I wanted to explain why, but we do want to do both of them in one way or another, it's a matter or how and when since the prototypes weren't good enough.

    cheers
     
  36. BOXOPHOBIC

    BOXOPHOBIC

    Joined:
    Jul 17, 2015
    Posts:
    508
    @Amplify_Paulo thanks for the detailed answer. It seamed to be more simple, but apparently I did't think that far :)
    When I was thinking about Header attributes I was thinking to have them only in shaders, but with shader functions everything becomes much more complicated.

    Thanks!
     
    Amplify_Paulo likes this.
  37. killa247

    killa247

    Joined:
    May 7, 2013
    Posts:
    25
    It would seem to be the render que that the ambient occlusion is using being rendered after the transparent/cutout renderer of 2000, this is fixed by changing to render que of 3000 but you lose shadows. Is there a way to have the ambient occlusion be rendered before the transparent/cutout? or mask it from objects in front of it?
     
  38. brett_ridel

    brett_ridel

    Joined:
    Jan 15, 2017
    Posts:
    33
    Hi all

    I noticed two bug in my version of ASE (1.3.0 dev 01).
    First, I've often problem with property fields that reset when I update my shader, especially with shader functions.
    Second, I've some times an error with a multiply node connected to the "World To Tangent Matrix" as first input and a normalized vector as a second input. (I don't have the error message at the moment, I don't succeed to find how to reproduce the error, it's "random").

    Edit :

    Here the error with the Multiply node

    Brett
     
    Last edited: Sep 5, 2017
  39. TechnicalArtist

    TechnicalArtist

    Joined:
    Jul 9, 2012
    Posts:
    736
    How to make Slice shader?Any tutorial or help?

     
  40. christophercimbaro

    christophercimbaro

    Joined:
    Aug 30, 2017
    Posts:
    12
    Morning Amplify team & Unity community,

    Just a quick question, actually I worked on pipeline production for artist and I evaluate the possibility to use amplify in our production.
    Something which is really important is Substance full compatibility and I have two issues. I'm sure it's a miss understanding of my self, so if any one can help it will be pleasant :)

    I explain :

    - First, actually I can't get exposed parameters from my substances in ASE editor, so I loose all the advantages gived by procedural material.

    - Second, I tried to do a multi-layering shader, the idea is to use few substances and mask done and export from Substance Painter and lerp/blend them in a shader.
    Something like that :


    Actually it works but the shader target all individual maps contrary to target substances as you can see :



    Do you know if I miss something or it's not allready plug? Your shader editor is completly awesome and answer a lot of need we have, it's just the bridge between substance and ASE which is complicated.

    See you soon,
     

    Attached Files:

  41. ColtonKadlecik_VitruviusVR

    ColtonKadlecik_VitruviusVR

    Joined:
    Nov 27, 2015
    Posts:
    197
    Hey All,

    I have modified the sample water shader to use a sine wave for local vertex offset which looks good on its own, but when I try to modify the vertex normals so you can see the waves in the center of the tub better i get this:

    BlackWaterRipple.JPG

    I have attached the shader and am using the latest version of Amplify, any thoughts?

    Cheers,
    Colton
     

    Attached Files:

    HiWill likes this.
  42. Amplify_Paulo

    Amplify_Paulo

    Joined:
    Jul 13, 2017
    Posts:
    297
    Hey guys, new build time!

    Grab it at our website.

    Release Notes v1.3.1 dev 03:
    • New Features:
      • Added custom pragmas support to the main property panel
    • Fixes:
      • Fixed issue with texture arrays when in reference mode creating multiple properties
      • Fixed issue of 'Vertex To Frag' node not generating code in certain situations
      • Fixed issue with 'World Reflection' node not generating code correctly in vertex functions
      • Fixed issue of custom shadow caster not using the correct shader model
      • Fixed issue with dynamic port nodes not updating correctly in some occasions
      • Fixed issue of some nodes not properly using the selected precision type
      • Matrix 3x3 port types now display properly in the node property panel and compile correctly
    • Improvements:
      • World position node now forces float precision
      • Some more changes for the nodes subtitles for consistency
      • Minor performance and GC improvements

    This build is mainly bug fixes but one cool thing to note is new custom pragmas support, this allows you to specify some compile options that might be out of the editor scope. This came as a request from @LennartJohansen and indirectly it should be possible to use procedural instancing with a custom include file.

    Those kind of issues are usually tied the depth pass and to the ambient occlusion solution you are using. Check if your shader is generating shadows (tick both options) since it's in the shadow pass that it writes to the depth buffer. If you don't want the shadow remove them from the mesh renderer options. Also check yout AO options, unity stack AO for instance as a couple of options to force better detection in some cases. Report back.

    Uhm that first one is a mystery to me, I've never encounter it before, do you remember what you were doing at the time? About the second one, I made some changes in this build that should be enough to stop those errors from happening again, please update and pay attention if it happens again, if it does let me know.

    I would start looking at our example called "WorldPosSlice" that should give you an idea of how you can cut something out of a mesh. The way you accomplish the rest is by some proximity function that feed using some sort of global variable (check the "Smear" example on how to use global variables). So you feed you shader the position of the slicer you define an axis to slice with, you can then measure the distance from that axis to any point and create the highlight. The animation on the highlight is just a panning texture driving the cutting.

    Hey there, welcome to the forums.
    You have two ways of using substances with ASE, you either generate all texture and use them inside the shader as regular textures (this is the as the example we provide) or you set the shader in your substance to use one you created in the editor and then your parameters can be used as usual. There's one caveat for the second option tho, the samplers you use must have the same name as the ones unity standard uses, this is because the susbtances are looking for them to feed the shader. (ie: you call your albedo texture MainTex and your normal map BumpMap). Sometimes it gets a bit finicky and spews errors to the console and you need to reassign the textures to the right spots but it should work for the most part, this is just how susbtance are made to work. Some more complex stuff from the editor might not work tho so the first option is the recommended one.

    What do you mean by "contrary"? I'm not sure what I'm looking at on your second screenshot.
     
    antoripa and petersx like this.
  43. antoripa

    antoripa

    Joined:
    Oct 19, 2015
    Posts:
    1,163
    Impressive how fast are ASE progress .. great team .. congrats
     
  44. Amplify_Paulo

    Amplify_Paulo

    Joined:
    Jul 13, 2017
    Posts:
    297
    Thx a lot ;)
     
    antoripa likes this.
  45. christophercimbaro

    christophercimbaro

    Joined:
    Aug 30, 2017
    Posts:
    12
    Hi,

    And thanks for your quick reply, for the "contrary to" I would like to say, the shader actually targets maps contrary to substances (in public parameters).

    What we 're looking for is a shader with differents substances and control by mask (like id materials) but our artist should not have to change maps, only drag and drop substances and mask (mask is generated by substance painter export).
    Something like in attachement.

    Allegorithmic allready propose an export in multilayered system compatible with Unity but their is not enough control, that's why we're looking for create our own.

    Thanks for all your supply, Amplify shader is growing fast and well :)
     

    Attached Files:

  46. petersx

    petersx

    Joined:
    Mar 5, 2015
    Posts:
    239
    Hi,
    Why I can't add two append nodes (f.e. 2 VECTOR) to any node ?
    I add to first node the same value to X and Y, then output of this node I can only add to Y node, not to X ? Why ?
     
  47. Loards

    Loards

    Joined:
    May 2, 2013
    Posts:
    112
    Hi Guys!! this is awesome.
    Im doing a shader based in this toon example and i have a question, does the custom lighting mode only works with one directional light? i ask this because i have a weird issue. If a static object have this shader, only receives baked GI from the directional light and real time direct light from all the light. Even light from emission objects is discarded by the shader (i can see the lighting in the baked light map view mode) but not in the shaded mode.

    EDIT: i just saw, the material receives the baked GI but really dim, only shows like the 10% of the strength of the GI.

    any Idea?? Thanks!!
     
  48. DigitalAdam

    DigitalAdam

    Joined:
    Jul 18, 2007
    Posts:
    1,202
    @Amplify_Paulo

    Does Translucency only work in Forward? Anyway to get it working in Deferred?

    Thanks.
     
  49. nxrighthere

    nxrighthere

    Joined:
    Mar 2, 2014
    Posts:
    567
    @Amplify_Paulo I noticed that ASE always adds at the end of the shader's code Fallback "Diffuse", even if I set a custom fallback. It doesn't work correctly by this way.
     
  50. Amplify_Paulo

    Amplify_Paulo

    Joined:
    Jul 13, 2017
    Posts:
    297
    Have you tried the second option of setting up the shader in the substance? setting it up in the substance itself should allow you to use the substance parameters and still have the shader properties visible and editable.

    This is me using the snow substance we provide with the sand POM shader from our samples, I didn't even renamed the properties, I just dragged and dropped to the substance inspector:

    Unity_2017-09-06_11-12-38.png

    Isn't this what you want? or am I missing something?

    Can you share a screenshot of it? You should be able to add whatever you want to the append node and it should dynamically change it's ports to match the size of the input data.

    This is me just messing around with different sizes. Am I misunderstanding your problem?
    Unity_2017-09-06_11-20-29.png

    Yep! I can confirm it, it's a bug. I just checked and indeed it's losing it's emission values. I'm using a unity built-in function to get it and somehow it's not working correctly, I'll probably need to do something like I did for the specular component. It's fixable, I'll try to get it to work for the next build. Sorry for the trouble and thx for the report ;)

    Yes it's forward only. For now any custom lighting is forward only (translucency, transmission and refraction ports included). I'll need time to investigate if it's possible to do something for deferred. No promises, some of these things are just limitations from the unity rendering system and surface shaders generation.

    It doesn't? can you send me an example? Keep in mind that you can have multiple fallbacks, we have multiple but some things depend on extra passes, maybe what we are missing is an option to remove them entirely?