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

    Prodigga

    Joined:
    Apr 13, 2011
    Posts:
    1,123
    Hey there, how do I read the lightmaps in a custom lighting surface shader? There is the DecodeLightmap node, but it doesn't look like you can actually do anything with it because you can't sample the lightmap?
     
  2. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    That is really interesting, i'm mostly wondering about the performance differences between calculate them in fragment and vertex. and thanks for the explanation it answer my question :)
    And yeah usually i calculate them in vertex (when i'm just writing the shaders manually)
     
  3. awdOrbit

    awdOrbit

    Joined:
    Oct 21, 2017
    Posts:
    3
    Hi,

    A question about Custom Lighting. When using the Standard Light Model in Masked mode the shadows are clipped as you would expect to follow the shape of the alpha cutout. But when doing the same using the Custom Lighting Model, even though the opacity mask is available, the shadows are solid.

    I can get around this by editing the ASE output in the following way ...

    Duplicate the surf function, rename it and copy a few lines from the LightingStandardCustomLighting function.

    Code (CSharp):
    1. void surf_shad(Input i, inout SurfaceOutputCustomLightingCustom o)
    2.         {
    3.             o.SurfInput = i;
    4.             float2 uv_Albedo = i.uv_texcoord * _Albedo_ST.xy + _Albedo_ST.zw;
    5.             float4 tex2DNode1 = tex2D(_Albedo, uv_Albedo);
    6.             clip(tex2DNode1.a - _Cutoff);
    7.         }
    8.  
    And then modify frag in the ShadowCaster pass

    Code (CSharp):
    1. v2f vert( appdata_full v )
    2.         {
    3.             v2f o;
    4.             ...
    5.  
    6.             // surf( surfIN, o );
    7.             surf_shad( surfIN, o ); //Replace with this.
    8.         ...
    9.     }
    10.  
    But obviously modifying the shader text is not an ideal way to go. Is there a bug or am I just doing something dumb?

    Example.png

    Thanks.
     
  4. MoribitoMT

    MoribitoMT

    Joined:
    Jun 1, 2013
    Posts:
    301
    Hi, I am really interested in this asset, I have couple of question..

    1. I do not have extensive shader knowledge. Do I need very deep shader knowledge to use this asset ?

    2. I create only mobile games, and I use %90 of mobile shaders of standard unity shaders. Can I create other mobile shaders, I mean simple and efficient shaders ?

    3. Is there way to understand or techniques if a shader is optimised, efficient and effective for mobile in this asset ? For example I use standard shaders with reflection on my vehicles in my mobile game, but standard unity shader not efficient enough. Can I create and efficient shader that similar but much simpler/optimised than unity standard shader.

    4. Does this asset manual pdf for specially created for optimised / mobile shaders ?

    Regards.
     
  5. recon0303

    recon0303

    Joined:
    Apr 20, 2014
    Posts:
    1,634
    1. No you do not need any knowledge really...

    2. I use SF, and now AMP for mobile shaders... all the time.


    Some people try and say you cant use SF, and AMP in production, due to performance limitations, since its using visual....I disagree , I have used Unreal for years and years, all visual shader scripting, and I also used SF , and now AMP as of late......it boils down to making sure to optimize any shader...no matter if its visual or hand written.... Mobile you need to pay attention and make sure you aren't using expensive nodes..

    PS: I know how to code been for over 20 years, shaders, I can do basic shaders, when it comes to hand writing....Some people in my opinion, are old school as I'm., and like to bash visual.... Is it more expensive sure, but if you use properly, you will be fine... The future is visual, even AAA companies are using visual more and more in there engines as well.....some even for other elements than just shader....Unreal you use a mix of C++ and blue print.....Cry engine you are using a mix . So people just need to get used to the way things are going to go....visual is here to stay...
     
    Last edited: Oct 23, 2017
  6. irwit

    irwit

    Joined:
    Sep 30, 2014
    Posts:
    55
    Hi all,

    I'm new and coming from Shader Forge and just trying to find my feet. Would any kind soul mind showing me how to create my own chrome shader. Within shader Forge I would only ever build my own shaders and plug into the Emission slot. I would like to do the same in Amplify but I've no idea where to start. SF had some good tutorials for building things like this but I am struggling to find something similar for ASE.

    Any help would be much appreciated!

    Many thanks

    Will
     
  7. recon0303

    recon0303

    Joined:
    Apr 20, 2014
    Posts:
    1,634

    to be honest a lot of what work with SF, will work with AMP, Unreal some will as well... I come from Unreal and SF myself, UDK and much more.. I bought ASE when it first release but rarely used.. I been using as of late, and noticed I been converting many of mine Unreal shaders, and SF users to AMP, and most are nearly the same.. Some difference with Unreal but SF, so far almost every shader I made, works with AMP.
     
  8. irwit

    irwit

    Joined:
    Sep 30, 2014
    Posts:
    55
    Thanks for the quick reply Recon, as a specific then, how would I re-create this in ASF? In shader forge I would plug this into the emission and have chrome shader.

    Many thanks,

    Will.
     

    Attached Files:

    • hdri.JPG
      hdri.JPG
      File size:
      30.3 KB
      Views:
      886
  9. Amplify_RnD_Rick

    Amplify_RnD_Rick

    Joined:
    Feb 15, 2016
    Posts:
    528
    Hey guys,

    We've just uploaded a new build into our website.
    Here are the release notes:
    Release Notes v1.3.3 dev 01:
    • Fixes:
      • Fixed multiple issues with 'Append' node behavior
      • Fixed null pointer exception when Shift + Tabbing helper window
      • Fixed duplication error on UV generation code
    • Improvements:
      • Added Alpha To Coverage option ( tied to Opacity port being active )
      • Opacity Mask now only generates code if connected
      • Blend ops defaults are now OFF instead of ADD
      • Blend ops now pick the respective refined options when a specific blend mode is selected

    EDIT: Just a quick note about the Append node.
    Unfortunately when we made its ports to dynamically react to connections we introduced some issues that would make its usage a bit confusing.
    P.e if on an Append node outputting a Vector4, you would first connect a Float on its Y Input port and then a Vector2 on its X, the Vector2 would automatically occupy two channels and make the first connection to change from Y to Z.
    If you then removed the X connection then Z would turn back to Y.
    This behavior is too confusing and the user choices should always be maintained.
    With this new fix, when the Vector2 is connected to X it will only occupy X, which is the only occupied channel. What is connected to Y will always maintain connected to Y.


    Hope everyone has a great week and happy shader creations!
     
    Last edited: Oct 23, 2017
  10. Amplify_Paulo

    Amplify_Paulo

    Joined:
    Jul 13, 2017
    Posts:
    297
    Unfortunately no, those tessellation functions come from unity and have no interpolators. If it's something you really need you can try copy pasting those function into a template. They are big, hard to read and hard to use so we didn't include a template with them. If you feel you can't do it I can always try creating one for your case.

    Collisions on GPU aren't impossible, just really hard to do with a lot of limitations. I usually only see it for GPU particles. I'm not sure how you are going to solve that one but maybe you can get away with cached colliders that you swap when necessary? Just an idea.

    Those shadows are indeed happening because of the normals. We added a shader function that reconstructs normals in the latest builds along side with a sample (waving flag). Maybe you can take a look at that to see how you can do it. Keep in mind tho, it's a bit expensive but it's done on the vertex function so if it's nothing too crazy you should be fine. To be honest every time you want to generate something in the shader you should consider why you are doing it. Most of times you can get away with pre-generated stuff.

    There isn't a specific node to it, I guess no one requested before. I think it's doable, I'll need to check tho. Give me so time and I'll reply back when I have more information for you.

    Yep, that's a bug :\ I'll try to fix it for the next dev build. Thx for reporting and sorry for the inconvenience.

    Thx @recon0303 for replying ;). Either way I'll add my two cents.

    1. No, if you feel like you do then we are failing at what we are trying to accomplish. Of course, there will always be complex subjects that you are required to know a thing or two about shaders. But our point is that you should be able to do most of what you want by experimenting and checking the existing samples. This is the reason we sometimes create more complex nodes like the triplanar or POM nodes, which are techniques that are possible with some other nodes but just too demanding for new users. If you feel there's something you are not getting or it's just hard to do just ask us/tell us about it and most of the times we just incorporate it into the editor seamlessly. You can also check the node documentation to clear some doubts.

    2. Yes, you can, either by using the custom lighting setup or a template you can create efficient mobile friendly shaders. You can also use a standard one and remove all the options you don't need from it. Most of the times that is fine already.

    3. Personally I think the only optimal way to understand a shader is by looking at the code but that would require shader knowledge that we can't expect from our users. Your best metric for now is compiling a shader and see it's instruction count. We actually want this number to be available inside the editor and we tried a couple of times but Unity is hiding some stuff from us making it impossible for the time being. If the only thing you need is some reflection you can set the shader as a custom lighting shader and use the indirect specular light node. You can also check our sample for custom lighting. Finally I'd say that most of times the only way to know if a certain shader is fast enough is by testing it on the machine. There's too many variable to know beforehand with certainty if a shader is fast or not. One thing I can guarantee, we try our best to make them optimal regardless of being a created in an editor. From time to time I do some instruction count comparisons between shaders from ASE and vertex/frag shaders created by hand, and most of the time the count is the same and in the worst case scenarios the editor only adds an instruction or two which too me is a good compromise between usability and performance, we are talking about 50 to 150 instruction or regular shaders, 1 or 2 instruction in very specific situations is great in my book.

    4. We do have a manual with some specific platform notes here. But not exactly for mobile shaders, no. I guess that's a good idea tho. Thx for the suggestion ;)

    You want to put your Lighting Model into custom lighting, and you want to use the indirect specular light node and/or the indirect diffuse light node in some fashion to get what you want. I highly recommend you to check our toon ramp sample. It should give you a good starting point. If it's just a chrome shader that you want just check the first link and see the example.
     
    recon0303 and MoribitoMT like this.
  11. MoribitoMT

    MoribitoMT

    Joined:
    Jun 1, 2013
    Posts:
    301
    Thanks for greta answers.

    I definetly get the asset soon. And a good documentation for optimized and mobile shaders would be amazing since majority of developers develop games for mobile playforms such as ios and android.

    Regards.
     
    Amplify_Paulo likes this.
  12. Amplify_Paulo

    Amplify_Paulo

    Joined:
    Jul 13, 2017
    Posts:
    297
    Hi again and sorry for the wait, we had to make some changes to the editor for alpha to coverage to work properly. Hopefully now it should be fine with one exception, which is the same from the bgolus blog post you shared.

    In attachment goes a shader and a shader function that you can reuse to pretty much mimic what the blog post talks about. The only part missing is the antialiased shadows which you can find some information about it here. This seemed to be out of the scope of this fix so I didn't try it, but changing the shadow clip mask value seems to help reduced the problem a bit. But if want it and if you are having troubles with it just say.

    Cheers
     

    Attached Files:

    knup_ likes this.
  13. awdOrbit

    awdOrbit

    Joined:
    Oct 21, 2017
    Posts:
    3
    No problem. I've only had ASE for about a week so just exploring how to do things. From what I've read, it looks like custom lighting is quite new. No surprise there are a few bugs.
     
  14. Laurens-Paladin-Studios

    Laurens-Paladin-Studios

    Joined:
    Apr 25, 2015
    Posts:
    54
    Hi there,

    I can't seem to find a way to override a property name without changing it's internal shader name.
    For example having Diffuse Map (A=Alpha) as a texture input property while maintaining the internal name _MainTex.

    Is this not implemented or am I missing something?

    Laurens
     
  15. Prodigga

    Prodigga

    Joined:
    Apr 13, 2011
    Posts:
    1,123
    That sounds awesome @Amplify_Paulo !
    I noticed if I add a texture sample node and call it _unity_Lightmap (or something like that), and edit the shader to remove the leading underscore, it receives the lightmaps (though then the lightmap UVs are all whack). Also, it means that there is this texture imput visible all the time, where as with normal shaders the lightmap stuff is done "behind the scenes" so the shader can be used both for lightmapped and non lightmapped objects. (I think they wrap all the lightmap stuff around a #if LIGHTMAP check or something?)

    Anyway, yeah, it'd be awesome to have!
     
  16. OP3NGL

    OP3NGL

    Joined:
    Dec 10, 2013
    Posts:
    267
    when creating my shader function, i realized there's no boolean node? or am i missing something?

    another question, how to re-create an unreal function called "RotateAroundAxis"?
     
    Last edited: Oct 24, 2017
  17. Mark_T

    Mark_T

    Joined:
    Apr 25, 2011
    Posts:
    303
    Any chance we see blur nodes inside ASE? Mostly interested in box blur. Thanks!
     
    Last edited: Oct 24, 2017
  18. Amplify_Paulo

    Amplify_Paulo

    Joined:
    Jul 13, 2017
    Posts:
    297
    We actually had this before but it was too confusing for newcomers, I can't promise you we'll revert it back but we'll discuss internally, maybe there's a intermediate solution. For now, the only way is to actually change the property name.

    There isn't indeed. We do want to implement it, mostly because of shader functions, for now you need to use some combination of a float, a comparison node or a static switch. It's just a matter of time. And speaking of time, I actually have assigned to me to create a similar node to rotate around axis for the next weeks so I guess you can expect at least one of these two resolved soon. I'll try to squeeze the booleans as soon as possible ;)

    What exactly is the purpose of the blur? We do have a sample in ASE which creates a simple blur effect.

    If what you want is a screen space blur, that usually comes with a script to call different iterations of a separable blur, along side a downscale and a 4-tap blur. Of this three only the 4-tap is entirely done on a shader, and this is the one from our sample. Would you like a node to mimic that 4-tap blur? Anything else besides that it's just too expensive to do on the GPU.
     
  19. Mark_T

    Mark_T

    Joined:
    Apr 25, 2011
    Posts:
    303
    I checked the SimpleBlurOFF example coming with ASE.. By applying an offset to the texture is not coming even close to a blur effect. Having a proper box blur algorithm implemented with iterations and repet pixel edge controls can be very useful. It's not always needed to have the highest frame rate. Maybe you want some cool effects when in pause mode or maybe you want to use such a dynamic blur to replace a simple sprite on some of the UI elements. Cool things can be achieved, me thinks.
    A quick google check handed me some interesting results. The gaussian blur found on shadertoy was pretty decent I think and can be used very clever in UI cases. And not only.
    As a backup, just for the UI I have the Shadero Shader . They have a blur node implemented that will do the job. I was hoping to have the same option inside ASE, I'm more familiar with your asset and since you implemented templates I was hoping I can use your asset for all my shader work. Combining standard UI combined with 3D elements can open interesting doors.
    Anyway, thanks for the fast answer!
     
  20. irwit

    irwit

    Joined:
    Sep 30, 2014
    Posts:
    55
    Hi all,

    Super quick question, how do I make a 2 sided material?
     
  21. knup_

    knup_

    Joined:
    Feb 23, 2017
    Posts:
    19
    Wow, this is fantastic! Thank you so much for taking the time to add this! Everything is working great so far.
     
  22. Amplify_Paulo

    Amplify_Paulo

    Joined:
    Jul 13, 2017
    Posts:
    297
    That's extremely heavy, neither are downsampling the texture, which means you can't obtain high order blurs without obliterating performance with multiple in-shader iterations. I'm not exactly against it, but I'd rather create a custom expression node within a shader function and share it here than allow a user to destroy the shader performance unwillingly. I'll see if I can get you something.

    Go to the main options at set the cull mode to OFF. Be aware tho that normals will be shared between the two sides, this is expected and the solution would be to use withe the switch by face node or the face node. (check links for examples)
     
  23. rxmarccall

    rxmarccall

    Joined:
    Oct 13, 2011
    Posts:
    353
    Hi, just purchased ASE today and had a few questions.

    I wondered if there is a Slack or Discord community for ASE? If not, maybe we should start one so we can more easily communicate / help each other as a community?

    I'm trying to do a basic water shader that is similar to what is seen in Zelda Wind Waker. I have my water texture and have it scrolling, but how can I have a foam texture display on water that is touching other 3d objects in the game world?

    Here is an image showing my simple node setup for scrolling the texture and how I'd like to have a foam around where the box and plane are meeting.

     
  24. Laurens-Paladin-Studios

    Laurens-Paladin-Studios

    Joined:
    Apr 25, 2015
    Posts:
    54
    Alright, thank you for the quick reply! It's a pretty important feature in my opinion, but I can understand the decision taken. Hope to hear more about this :)
     
  25. recon0303

    recon0303

    Joined:
    Apr 20, 2014
    Posts:
    1,634

    I suggest to look at sample ones, and check this page, go through and see what others have done. There website also has some community shader's ..and some on google. That's all I know about personally.
     
    Amplify_Paulo likes this.
  26. Amplify_Paulo

    Amplify_Paulo

    Joined:
    Jul 13, 2017
    Posts:
    297
    Sorry we don't have a slack or discord for the community. We'll think about but I imagine it to be too chaotic to do support.

    On the water shader stuff, there's actually some pretty good stuff already out there that explains the process, it's a somewhat simple procedure but takes a bit more effort in your development pipeline. We are actually using this effect on our own game and we even posted about it in the devlog here (it has been updated since then tho). Unfortunately if you really want to mimic the wind waker style it's not just shader work :1

    You need some meshes to do the ripples around objects, these can be procedural, static or something in-between. The closest thing you have in the shader to do something similar is the depth fade node which will allow you to get the intersection on the camera point of view. Since it's camera dependent effect you'll soon find out it doesn't cover all angles and has some continuity issues.

    There's a pretty good discussion in these forums about it already so I'll just link it there: https://forum.unity.com/threads/the-legend-of-zelda-wind-waker-styled-water.298724/

    Anything shader related for that effect you can do in ASE, if you have issues with it then just contact us again ;)
     
  27. BOXOPHOBIC

    BOXOPHOBIC

    Joined:
    Jul 17, 2015
    Posts:
    508
    Hello,

    Is there a way to get the View Space Normal in ASE? I tried using Screen Depth with Decode View Normal Stereo. Tried renaming _CameraDepthTexture to _CameraDepthNormalsTexture.
    My camera is set to DepthTextureMode.DepthNormals. I just can't figure out how to do it. Thanks!
     
    Last edited: Oct 25, 2017
  28. Amplify_Paulo

    Amplify_Paulo

    Joined:
    Jul 13, 2017
    Posts:
    297
    There's a simpler way without editing the code:

    Unity_2017-10-25_18-28-49.png

    The secret is to use the render texture name in the texture sample node and set it to be a global property.

    In this shot I have my shader set as Opaque, if you set it as transparent you see the normals of the objects behind it. And in this shot I have my camera in forward rendering with a script that forces the rendering of the normals. If you set your camera to deferred you'll also see the normals map on top of the geometry.

    Out of curiosity, what are you trying to do with this?
     
    arnoob likes this.
  29. MaZy

    MaZy

    Joined:
    Jun 29, 2012
    Posts:
    105
    Nice Simple Sprite example. I was going to ask for it how I get sprites. Then I saw the update. This example helped me to understand.

    EDIT: Well I guess I am not good enough. I tried to make an outline for 2d sprites. Like this tutorial http://nielson.io/2016/04/2d-sprite-outlines-in-unity/. I already tried the shader code and it works. But wanted also to reproduce in ASE. But can't get it.

    In normal case I can use outline and check it in the left menu. How can I do this for sprites?
     
    Last edited: Oct 25, 2017
  30. Frump

    Frump

    Joined:
    Jan 24, 2017
    Posts:
    4
    Hi, is there a way to get the Parallax Occlusion Mapping node to work with Mobile? I created a cool fur shader using it but when I switch to build for Android the shader breaks. I went through and isolated the problem to that node (the parallax shader sample scenes also break). Would love it if there's a solution. Thanks.
     
  31. BOXOPHOBIC

    BOXOPHOBIC

    Joined:
    Jul 17, 2015
    Posts:
    508
    Thanks, this is what I need. Mostly testing and learning stuff :D. As an artist with technical inclination but no programming knowledge, ASE offers me a good environment to learn more about rendering.

    I was thinking to implement some screen space caustics for my low poly water shaders, based on world position from depth, but I needed a way to occlude them where the light don't shine. Of course the result is not that good, given the fact that I don't have shadows. Maybe I can access the the fragment shadow map, didn't try yet.

    To get the normals in world space I multiplied them with inverse view matrix. People suggest to calculate the matrices in a script instead of shader, for better performance. What's the deal with that?
    Below, screen space lit object based on view space normals:
    upload_2017-10-26_10-25-5.png

    Thanks!
     
  32. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Hi guys,

    I'm trying to prevent our 3rd person sword and shield from clipping the environment too badly. Offset comes with too many negative issues. and obviously a separate camera doesn't work in this case and I would like to use ASE for all our shaders.

    Increasing collider radius is not an option.

    What would be the best way of doing this, perhaps masking with stencil or something or a better idea?

    Any help or demonstration nodes will be greatly welcome as I'm pretty new to node based shader programming and could use the help :)

    Thanks a lot.
     
  33. Amplify_Paulo

    Amplify_Paulo

    Joined:
    Jul 13, 2017
    Posts:
    297
    Hey there, here's a way:
    Unity_2017-10-26_09-59-49.png
    Shader in attachment. Not everything is the same as the article but mostly is (the order of the IFs is inverted). Hopefully it will serve as a learning step. Feel free to take questions.

    While heavy, POM should be working on mobile. I'll test it here just in case but my uninformative guess is that it's some hardware limitation or check not doing a great job. Maybe shader model, dunno. I'll report back later.

    The only time calculation your own matrices is faster is when that matrix is a combination of various others, lets say you are combining three of them, by multiplying them in the cpu and sending to the shader you are preventing multiple calculation on the vertex or fragment functions, but as long as it's an existing matrix that you already have access to, just keep using it. In your case the view matrix is already available to you so stick with it.

    For your case you don't actually need to use the inverse node, in the case of the view matrix it's transpose is the same as it's inverse, so you can simple connect the view matrix directly in the B port of multiply node, since matrices operations are no commutative you are actually calculating it's transposed value which in this case is the inverse, this is only true for orthogonal matrices.

    Third person? Uhm, that's tricky, I've seen tricks like rendering in a separate camera for first person but for third person I anticipate all sorts of lighting problems. Probably the only thing I can think of is having an animation frame/clip that holds the weapon closer when you detect the facing player to be at a wall. I know it's not shaders but i'm not sure if you can avoid oddities with them.

    With stencils you need special shaders for every object that could possibly intersect with the weapon, and you'll still need to offset the renderings somewhat to create a one way detection "mechanism" so I'm not sure you can avoid offsetting entirely :|

    I'll see what I can accomplish anyway and I'll reply back if I get something decent.
     

    Attached Files:

  34. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Thanks a lot. It's a tricky one but if I recall, batman games used a shader for the cloak to prevent it clipping the character, so I was thinking that perhaps that's an angle. The game I'm doing does support first and 3rd person modes but first person is probably more solvable.

    I guess I could use offset if the amount put in could be variable. Also I don't really need to worry if enemies clip much, just the player's objects, which is more often noticed. A hard problem... :)

    When I did my own shader with offset, I found I needed to offset so much that it started to clip the player in front of the weapon.

    The anim idea isn't a bad one, and we'll have to look at doing that as a last resort or even a mix.
     
  35. BOXOPHOBIC

    BOXOPHOBIC

    Joined:
    Jul 17, 2015
    Posts:
    508
    Thanks for the info !
     
  36. AndreBengtsson

    AndreBengtsson

    Joined:
    May 6, 2016
    Posts:
    14
    Hey!

    I'm having some trouble with the template for soft blended particles. I don't quite understand how it is supposed to be used. Basically I just want to have the texture/sprite multiplied with the light color node so that it reacts to different lightings, but when i multiply a texture node and a light color node i get nothing showing up in my material. And i can't get a simple color node to be viewed adjustable in the inspector. Am I missing something really fundemental here? :p

    Thanks in advance!
     
  37. NOT_Lonely

    NOT_Lonely

    Joined:
    Feb 2, 2013
    Posts:
    531
    Hi,
    First of all I want to thank you for the awesome tool! It's really powereful and easy workflow addition to Unity.
    I made a simple semi-transparent shader with a vertex animation for my cobweb. And I got a problem that the object shades incorrect when I select any mixed lighting mode in the Lighting settings. For example, it works fine with Substructive and Shadow Mask mode, but once I select "Baked Indirect" or "Distance Shadow Map" the object became bright, looks like it lit by the sun direct light, but it's placed in shadow. With the Standard Unity's shader it works as expected.
    I attached two images to compare. The sun is shining from behind the camera look.

    AmplifyProblem3.jpg

    AmplifyProblem4.jpg

    AmplifyProblem5.jpg

    I really appreciate any help!
    Thanks!
     
  38. Remer

    Remer

    Joined:
    Mar 24, 2013
    Posts:
    79
  39. Khena_B

    Khena_B

    Joined:
    Aug 21, 2014
    Posts:
    273
    Hey, Amplify Shader is awesome! Currently rewriting all my Shaderforge shaders and noticed a major annoyance, when a node is selected and the Amplify Shader window is lowered by dragging it down to view the result in the scene view, the selected node is being dragged down as well and needs to be put back in it's place every time, using Unity 2017.1.0p4.

    Also, is there a way for a property that isn't connected to anything to show in the inspector?

    Thanks!

    AmplifyShaderBug.gif
     
    Last edited: Oct 26, 2017
  40. Laurens-Paladin-Studios

    Laurens-Paladin-Studios

    Joined:
    Apr 25, 2015
    Posts:
    54
    Hey Amplify, I'm really getting the hang of using Amplify shader editor and the Function system. It creates this great subtitles for shader properties which make the shaders super clean and organised.



    The only issue I really noticed is that all properties that are part of a Shader function are being reset when it get's updated in the shader and not to the default shader function values, but to zero.

    Also one more thing i wanted to ask is if it's somehow possible to get rid of the extra options that you can set at the bottom of a shader:



    Anyway, thank you for a great tool!
     
  41. Amplify_Paulo

    Amplify_Paulo

    Joined:
    Jul 13, 2017
    Posts:
    297
    You really got me curious there, went searching for that batman cape stuff with no success :C
    I did make a few experiments with the stencil buffer unsuccessfully, probably need another approach since I wasn't able to make the wall work correctly when in front of the player.

    Can you show you setup or share the shader? You don't seem to be doing anything wrong, I'm now suspecting I'm the one missing something.

    Use this blend mode, when you change the blend options the blend mode something detects a preset and changes accordingly so probably the fastest way to get to this setup is by changing your blend mode to transparent first, then change it to opaque and then again to custom. If you have the latest version this will change the blend RGB to alpha blend on the first point, then change the render type and queue to opaque and geometry on the second and finally on the third it will leave your settings as is with the opacity channel ON. (if for some reason your blend op is set to ADD change it to OFF).

    If you imitate this setup you should get alpha blend objects with receiving shadows and it should fix your issue. The presets are just that, presets, when you put it as a transparent blend mode it changes the type and queue to the transparent category which will limit the shadow receiving capabilities.

    Unity_2017-10-27_09-56-33.png

    That seems to be a very glossy material with a planar reflection on top. What you need to look into is the reflection, check unity's water shaders, if I'm not mistaken they have a planar reflection script that you can use.

    Noted, there's actually a few other annoyances about being able to so some actions when outside the editor window. I guess some of these will need to be solved separately. Thx for reporting that one.

    Yeah that's known issue, kinda hard to solve and I haven't got the time to look into it. About the second part I don't think we can do that in any easy way, Unity requires those settings to be there even if your shader doesn't use them, in order to hide them the material editor must communicate with the shader somehow. This is information that would be completely useless for other material editors besides our custom one and we don't want to add shader information in a intrusive manner that only works for our inspector. So while this is not impossible it makes the process too complex for such a simple thing. It's not completely out of the question but we wont do it until we find a better way for it.
     
    arnoob likes this.
  42. Laurens-Paladin-Studios

    Laurens-Paladin-Studios

    Joined:
    Apr 25, 2015
    Posts:
    54
    Allright, thanks for the reply!
     
  43. Khena_B

    Khena_B

    Joined:
    Aug 21, 2014
    Posts:
    273
    You haven't answered my other question, i'd like to know if there is a way for a property that isn't connected to anything to show in the inspector (Other than declaring it manually in code)? One of my shaders is affected by a post process effect, it uses a property just to pass information but i've had to connect it somewhere just for it to be accessible in the inspector, a bit of an annoyance.
     
    Last edited: Oct 27, 2017
  44. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Damned if I can find the article about the batman cloak now. It may have been a gdc or gamasutra article, been looking around, no luck. Thanks for looking into it though :)
     
  45. Amplify_Paulo

    Amplify_Paulo

    Joined:
    Jul 13, 2017
    Posts:
    297
    Completely missed it, sorry ;|

    No, we don't have a way to do that natively. You can hack your way through using a custom expression node. Create a custom expression node, connect whatever input you want to generate and then in the code section of the node just type either 0 or 1 and connect it in a output that doesn't break anything. Again this is a hack, not really user friendly.

    What's the use of it anyway? maybe we can add some option for it.

    Funny enough, I feel like I've seen that mention before as well, so you are not alone on that :1

    In fact I'm now considering re-watching the whole snow technique talk in hopes they mention it somewhere in the middle. Now I'm just curious, I'll research this on the weekend.
     
    hippocoder likes this.
  46. Khena_B

    Khena_B

    Joined:
    Aug 21, 2014
    Posts:
    273
    I'm using a post process effect which uses replacement shaders to render the scene, the replacement shader has a color property which is black by default, some objects have a shader which uses this color property (not connected), when the replacement shader is used, it will use the color property set for those objects and just black for the objects which didn't have this property to render on a render texture.

    I'm porting everything from Shaderforge and it declared everything even when not connected, having a toggle to declare that property even if not connected would be really nice!
     
    Last edited: Oct 27, 2017
    Amplify_Paulo likes this.
  47. Amplify_RnD_Rick

    Amplify_RnD_Rick

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

    We just uploaded a new build into our website.

    Here are the release notes:

    Release Notes v1.3.4 dev 02:
    • Fixes:
      • Fixed issue on text fields in nodes picking up values from other text fields in the editor
      • Fixed cast issue on 'Flipbook UV Animation' node
      • Fixed issue on creating sampler wire nodes
      • Small fix for resize buttons of 'Comment' nodes
      • Small fix to focus and select search text in the context menu not happening in specific situations
      • Fixed issue with 'Object To View Pos' local variable
      • Fixed 'Triplanar Sample' node normal mode signs in certain situations
      • Fixed issue on adding the same grab pass declaration multiple times
      • Fixed issue on incorrectly getting separate channels from transform nodes after local variables are created
      • Fixed issue on duplicate uniforms with some templates
      • Fixed issue where shader function properties were resetting after every save
    • Improvements:
      • Locking blend type nodes from sampler and matrix type connections
      • Expanded 'Object To View Pos' vector output vector into individual ports
      • Changed 'Triplanar Sample' node base UV direction to match unity terrain
      • Expanded vector ports for 'Object Space View Dir' and 'World Space View Dir'
      • 'Lerp' node now converts int types in the alpha input port to float types to prevent errors
    Hope you guys have an awesome weekend and happy shader creations!
     
  48. pwTA

    pwTA

    Joined:
    Mar 20, 2014
    Posts:
    5
    There's a bug associated with the Toggle Switch Node in context of it showing up in the Properties block of the ASE UI. Specifically, if you have more than one Toggle Switch Node, only one of the nodes shows up as a property in the Material Properties block in the UI; the property does show up in the shader itself, but it's stuck at the end of the property list. If you move it in code (i.e. move it's location in the shader's Properties{}), then subsequently recompile the ASE network, it gets stuck at the end of the shader prop's again. Frustrating!

    Here's a snippet of my ASE node network with the two Toggle Switch Nodes:
    2017-10-27_124904.png

    Here's the Material Properties block in the ASE UI:
    2017-10-27_125035.png

    Here's the ASE-generated code:
    2017-10-27_130002.png

    If you need the full shader let me know and I'll be happy to post it.
     
  49. Remer

    Remer

    Joined:
    Mar 24, 2013
    Posts:
    79
    I tried to make the shader, is that correct? Tips on how to improve it?

    Here for a high resolution version of the nsanity crash shader
    https://i2.wp.com/operationrainfall...rash-Bandicoot-N-Sane-Trilogy-Ice-Madness.jpg
     

    Attached Files:

  50. MoribitoMT

    MoribitoMT

    Joined:
    Jun 1, 2013
    Posts:
    301
    Hi,

    Is this asset has kind of benchmarking or performance analysing tools ( Beside unity profilers ) ?
    Can I compare performance of two shaders side by side ?
    Can I compare performance of built in Unity Shaders ( Standard, Mobile Diffuse, et.. ) to shaders that created with this asset ?
    If the answer is NO, is there a future plan to integrate performance analysing tools ?

    Regards