Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

[Best Tool Asset Store Award] Amplify Shader Editor - Node-based Shader Creation Tool

Discussion in 'Assets and Asset Store' started by Amplify_Ricardo, Sep 13, 2016.

  1. SniperEvan

    SniperEvan

    Joined:
    Mar 3, 2013
    Posts:
    161
    Hello all!
    I made another tutorial for ASE. This one covers the camera depth fade to make an object wash out in a certain color as it travels into the the distance. I plan on making another video today that also incorporates dithering in a cool way.



    Second topic: has anyone used the clip panes node? I want to make a demo video for every node but I have no idea how to use this one!! I read the wiki page for it but am having trouble coming up with a way to use it practically. Any advice is appreciated!

    Third topic: would it be possible to add a splitter node? The clip panes output would be a lot easier to understand if I could look at the output of the 4 float values individually. Has anyone tried to implement this? It should be possible to split the COLOR and FLOAT4 values into 4 separate outputs by passing them through some kind of splitter node.
     
    MudPuppet, deab and Malbers like this.
  2. Mister-D

    Mister-D

    Joined:
    Dec 6, 2011
    Posts:
    1,694
    im not sure if this has been asked before but
    how will the shader editor work with unity 2018 new setup rules for custom rendering?
     
    chiapet1021 likes this.
  3. blitzvb

    blitzvb

    Joined:
    Mar 20, 2015
    Posts:
    284
    Thanks man! I follow your tutorial all the time. All I know about shader is coming from you.

    Thanks a lot.
     
    SniperEvan likes this.
  4. SniperEvan

    SniperEvan

    Joined:
    Mar 3, 2013
    Posts:
    161
    Here is the dithering tutorial I mentioned before:


    Let me know what you think!
     
    Amplify_Paulo, blitzvb and KRGraphics like this.
  5. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,436
    Now just needs some scary ass portals... I love this effect
     
  6. marggob

    marggob

    Joined:
    Feb 24, 2013
    Posts:
    65
    Hello!
    We have our own diffuse lighting miscalculation system, which I would like to connect or repeat in ASE. I tried to repeat the system using Custom Lighting in ASE, but it is limited to Forward rendering(Indirect Diffuse node and Indirect Specular node work only in Forward), which deletes us unacceptably, because We need a Deferred renderer.
    Questions:
    1. Can you make a choice between "Lighting <Name> _Deferred" and "Lighting <Name>" for "Custom Lighting"?
    2. If the first item is not possible, can I somehow add my lightning to the "Light Model" list in the editor?
    3. Can you implement custom light connection from Includes?
     
    Last edited: Dec 25, 2017
  7. SpaceRay

    SpaceRay

    Joined:
    Feb 26, 2014
    Posts:
    455
    ina likes this.
  8. Maverick

    Maverick

    Joined:
    Dec 18, 2009
    Posts:
    225
    Hello,

    I have a cutout shader and it works just fine, except shadows. It casts shadows even for clipped areas. Any advice what I'm doing wrong?

    Here is a screenshot:


    Thanks

    PS: using v1.4.2 dev 01
     
  9. Amplify_Borba

    Amplify_Borba

    Joined:
    Jul 24, 2017
    Posts:
    538
    Apologies to all for the late replies, our developers are currently taking some time off for the holidays, rest assured that we'll get back to you as soon as possible! Thank you for understanding.

    We have plenty in store for ASE in the next year, and one of our priorities for early 2018 is support for multi-pass which will be invaluable for custom terrain and skin shaders.
    I will register your suggestion regarding skin shading models, thanks!


    We'll have to get back to you on this as soon as the developers are available.


    We currently don't have much to share other than the fact that we plan to support it as early as possible.
    In any case, it's safe to assume that all shaders, including existing ASE shaders, will require some conversion work.


    We'll have to get back to you on this as soon as the developers are available.


    That transparency effect is possible to achieve through the use of the transparency settings/blend mode in the main node, but it will depend on the approach and specificity of the shader you want to build. You may refer to this documentation for more information on the blend modes currently available: ShaderLab: Blending.

    You may also check out our Transparency sample at AmplifyShaderEditor/Examples/Official/Transparency in order to get a few pointers on how to get started in building a shader with transparency.


    Could you send us your shader sample through support@amplify.pt? Thanks!
     
    hopeful and Mister-D like this.
  10. marggob

    marggob

    Joined:
    Feb 24, 2013
    Posts:
    65
    I think it will be enough to realize the transmission of its own diffuse lighting. Now, inside my own lightning, I substitute only the diffuse component of lighting. I have thoughts on how to implement this. Write to me in private messages when there is an opportunity. Thank you.
     
  11. SpyChar

    SpyChar

    Joined:
    Jul 15, 2012
    Posts:
    11
    Hi! How would you go about replicating the Pixel Depth Offset from UE4 hair shader? Is modyfying depth per pixel even possible in ASE? I've tried to mimic it using depth fade node but with no success :(
     
  12. marcatore

    marcatore

    Joined:
    May 22, 2015
    Posts:
    160
    I have a request as addition to the Flipbook Texture Animation node.
    I think it could be helpful to have as output, the frame of the animation where the flipbook is.

    It seems a duplicate of the StartFrame but I'm in a situation where the an animated flipbook texture is used as a loop for the Task A and while the loop is going on, I need to use the last frame of the first loop for the Task B.

    Or do you know how to do this with the nodes we have now?

    Thanks in advance
     
  13. Amplify_Borba

    Amplify_Borba

    Joined:
    Jul 24, 2017
    Posts:
    538
    Hey there! Unfortunately, not at the moment, since Unity's standard surface shader does not support depth output, but we'll be investigating means of providing this through our Shader Templates as soon as we have implemented multi-pass support.


    Hello, thank you for the suggestion, I'll register your request and we'll get back to you as soon as possible.
     
    marcatore, SpyChar and laurentlavigne like this.
  14. kepesh

    kepesh

    Joined:
    Dec 29, 2017
    Posts:
    92
    Hi,

    How does the Local Vertex Position ( Absolute Vertex Output ) work? I've tried using a vector3, float and just an image but the meshes that use the shader just disappears.
    I've used the Relative Vertex Output which offsets the vertex as I expect, but I can't seem to figure out how to make meshes be offset in a certain direction. But they all just offset from their local space in this mode.
     
  15. Amplify_Paulo

    Amplify_Paulo

    Joined:
    Jul 13, 2017
    Posts:
    297
    Hey everyone, hope you had a great holiday!

    I don't think you are doing anything wrong, I tried the same thing and it seems to be working just fine, I although I can't quite get to the same look you have. Send me the shader please, maybe I'm missing something.

    Unity_2018-01-02_10-12-48.png

    All I can say for now is that I've been looking at it to measure what needs to change and how. It's still a bit early to tell. Some things seem pretty obvious but others not so much. We'll inform everyone as soon as we have figured out what to do.

    Good one, as a suggestion, if you use your own blue noise pattern (maybe we should provide one) and change the node to be able to use it's own pattern you can generate dithering with far better visual results.

    I've looked at what needs to be added for deferred custom lighting and unfortunately it seems to be a wasted effort, while Unity does allow to create your custom behavior to some parts of the deferred pass it will not work correctly in most situations. I haven't totally gave up on it but for now it seems to be out of the scope of ASE. Because deferred is a way to treat everything the same way by doing the lighting part in screen space it defeats the purpose of having one special object different from the rest, that's what forward rendering does. In order to change it and create a true custom lighting for deferred you would need to change the internal shaders :\

    So for #1 no, not for now at least. For #2 you could try adding your own template with a deferred pass but I suspect you will find the same issues. #3 yes, unless you need something more specific you can add your own functions in the include file and call them using a custom expression node.

    When you say you only need the transmission of the diffuse value do you mean the transmission output port of simply passing the diffuse value through? Can you give a specific example on what you are trying to achieve? Maybe there's a different approach to it.

    I guess the closest you could do is using the refraction port or a refraction shader in general. Let me say tho that transparency in general has all sort of issues in realtime rendering. Don't get your hopes up to get close to that effect from the video, focus on the "feel" of the effect instead. One of the main issues you'll find right away is ordering of transparent objects. It's not completely impossible but not viable or practical. Another is that in order to get a good looking refraction you'll always need a proper path tracing which out of question so you'll never get the good looking blacks in the glass when they are outside of the camera view. Finally, I don't know what it is for but performance will most definitely haunt you.

    Is this related to your other question or is it a new issue? (I've received your package and I'll look at it next).
    Shadows might not behave has you expect them to behave if what's clipping them is different from the perspective of the light. For instance, if you are clipping them using a screen position value it will give you either results because the screen projection is different for shadows. It's not totally impossible to change it but it requires some use of shadow specific keywords to filter the different behavior and the necessary transformations which aren't always easy to get. What are you using to clip yours?

    That output represents the local position of each vertex, so if you give it a flat value with will either move all vertices the same way if it's in relative mode or override their position to the same value if it absolute mode. In order to differentiate between them you need to make some analytical calculation, for example, by either using their current location of their current normal, that way you can make them different. I suspect that what you want can be found in the extrusion sample we provide, in that one we use both vertex position and vertex normal to deform the mesh. You can also use images as you can see from the tessellation sample.
     
    SpaceRay and Mister-D like this.
  16. Maverick

    Maverick

    Joined:
    Dec 18, 2009
    Posts:
    225
    This is another issue. I've sent a project example to support email. I'm using pure color/mask value to clip, so it should be same regardless of distance/lighting/etc.
     
  17. marggob

    marggob

    Joined:
    Feb 24, 2013
    Posts:
    65
    Hello!
    Now I'm outputting this function to get the result I need and everything works fine. Of course this only works in deferred mode.

    Code (CSharp):
    1.  
    2. calculateGI(){
    3. };
    4. inline fixed4 LightingCustomGI_Deferred (CustomGI_SurfaceOutput s, UnityGI gi, out half4 outDiffuseOcclusion, out half4 outSpecSmoothness, out half4 outNormal) {
    5.     float4 c;
    6.     c.a = 1;
    7.     //////////////////////////////////////
    8.     ///////  Calculate GI  ///////
    9.     //////////////////////////////////////
    10.     float3 GI = calculateGI();
    11.     //////////////////////////////////////
    12.  
    13.     /////////////////////////////////////////
    14.     /////  Calculate Albedo  /////
    15.     /////////////////////////////////////////
    16.     c.rgb = s.Albedo * (1 - s.Metallic);
    17.     outDiffuseOcclusion = float4(c.rgb, s.Occlusion);
    18.  
    19.     c.rgb *= GI; //Add my Global Illumination
    20.  
    21.    
    22.     float3 spec = lerp(1, s.Albedo, pow(s.Metallic, 0.05));
    23.     spec = lerp(0.04, spec, s.Metallic);
    24.     outSpecSmoothness = float4(spec, s.Smoothness);
    25.     outNormal = float4(s.Normal * 0.5 + 0.5, 1);
    26.      
    27.     return c;
    28. }
    29.  
    30. inline void LightingCustomGI_GI (CustomGI_SurfaceOutput s, UnityGIInput data, inout UnityGI gi) {
    31.     gi = UnityGlobalIllumination(data, 1.0, 1.0 - s.Smoothness, s.Normal);
    32. }
    I just need to embed my "calculateGI" function in your editor. I checked - it is perfectly assembled from the Editor's Nodes.
    I see this mode like this:
    1. On the main node there is an additional slot "Custom Diffuse GI", in which you can send the prepared information.
    2. All that can not work in Deferred mode is blocked.
     
  18. SpaceRay

    SpaceRay

    Joined:
    Feb 26, 2014
    Posts:
    455
    Happy New year 2018!

    Thanks for your answer, I will try to do to as you told. Of course that I understand that I will not get exactly same effect, because this is a 3D rendering animation, and Unity is different way of rendering, but I agree to have something similar in some way. In fact I have put additional examples, to show that what I want is to simulate the plexiglass or acrylic plastic effect.

    I have seen in the forum that it seems that using a Thickness map, it would give a more realistic transparent effect based on the thickness of the object itself, so I wonder if there is some way to use a Thickness map in Amplify shader. Sorry that I am very new to this asset and have no idea of the features and nodes available.

    HOW TO USE DIFFERENT RENDER MAPS?

    Also want to know how to use a vertex map to mark and define clearly the edges of a mesh.

    How many render maps are compatible and available to be used with Amplify Shader Editor?

    Please, is there somewhere where is told about the different kind of render maps that can be used? for example

    Bump map
    Vertex Map
    Specular Map
    Thickness map
    Normal map
    Curvature map
    Ambient occlusion map
    Height map
    Reflective Occlusion Map
    Metallic Map
    Alpha Map

    Some of these maps are explained here in this link from Substance Designer

    https://support.allegorithmic.com/documentation/display/SDDOC/Bakers

    Some of these maps are explained also here in this link from Filter Forge software

    https://www.filterforge.com/more/help/MainWindow/RenderMapsMenu.html

    Also detail maps from Unity

    https://docs.unity3d.com/Manual/StandardShaderMaterialParameterDetail.html

    Thanks for your help
     
    Last edited: Jan 3, 2018
  19. Amplify_Paulo

    Amplify_Paulo

    Joined:
    Jul 13, 2017
    Posts:
    297
    The deferred pass in these shaders only allow you to specify the content of each buffer because it will then be used to calculate the final light on the surface.

    So correct me if I'm wrong, you don't necessarily want to do custom lighting, only custom GI. Am I correct? From what I understand of your sample code you might not even need a custom lighting setup and the standard surface shader should do just fine as long as you could use your own gi data. For instance why not just change the GI function instead?

    Just to clarify, aside from normal maps which are little bit different every other is just a regular texture. What you do with that texture and how you map it is up to you really. ASE has the standard outputs for the most common unity parameter like albedo, smoothness and so on. A curvature map or a thickness has no meaning by itself. I assume you would use a thickness map to something like SSS or translucency (which btw its an actual output port in ASE and the sample provided actually uses a thickness map that we calculated in knald if I recall correctly), but you could also do other things with it so that when the editor comes in handy. You could very well add a curvature map (drag and drop texture inside the editor) and connect it in some way that makes sense to you. For instance you could add or subtract that curvature from the smoothness parameter to make hard edges more or less rough.

    The detail maps are another example, these are just maps that are rendered with much higher and repeated UVs and then combined with the main main.

    There's no standard for this so there's no documentation for those maps. It up to the user to decide. I would recommend you to check our wiki for more information and check individual node documentation to know more about them with some examples, like the texture sample.

    If you want a more specific example just ask about it and I'll try to guide you through it.
     
    SpaceRay likes this.
  20. marcatore

    marcatore

    Joined:
    May 22, 2015
    Posts:
    160
  21. blitzvb

    blitzvb

    Joined:
    Mar 20, 2015
    Posts:
    284
    Does ASE shaders support vertex colors by default or do I need to do something?
     
  22. marggob

    marggob

    Joined:
    Feb 24, 2013
    Posts:
    65
    Yes. I want to change only the diffuse component of lighting.

    do you suggest making changes to include Unity files? In this case, there may be difficulties with those shaders that will need to use the Unity lighting system. But I will try to implement it. If it does not work out - I will apply again to you.
     
  23. Teh_Lemon

    Teh_Lemon

    Joined:
    May 12, 2015
    Posts:
    17
    Yes. There's a vertex color node.
     
  24. blitzvb

    blitzvb

    Joined:
    Mar 20, 2015
    Posts:
    284
  25. Amplify_Paulo

    Amplify_Paulo

    Joined:
    Jul 13, 2017
    Posts:
    297
    To be perfectly honest I wasn't sure how to respond to that because it's a community node that I haven't looked at its code yet. I'll however take some time reviewing its code, maybe simplify it and then add that output. Shouldn't be too difficult.

    not exactly, I was thinking that maybe you could recreate the GI call in your own include files and do whatever you need with them. It would still require some work from our part in order to be able to call it but I guess I'm just brainstorming solutions with you at this point.

    Keep in mind that I already did some ground work to support the deferred pass before, I never released it because it has too many issues and I'm afraid to be a useless feature. Like I said before the pass doesn't allow you to do much and it seems you only want to change the GI and not the lighting so I'm here thinking that maybe it's possible to change the GI alone regardless of which rendering path you choose.

    I'm not sure how are both related, that plugin generates mesh data while ASE generates shaders that can use that data. The only thing I can think of right now that you still can't do is the low poly look (no interpolation) from shader alone (it's possible to do without shader specific code tho) since it requires a feature that it's still in the works. Aside from that it everything should work as expected.
     
    blitzvb likes this.
  26. deab

    deab

    Joined:
    Aug 11, 2013
    Posts:
    91
    @Amplify_Paulo

    I would like to build a shader that shows the game object as a flat, single transparent colour. Using a standard alpha shader means overlapping faces darken the colour - I'd like to avoid this. In the image below the door detail can be seen as darker areas.



    Objects closer to the camera should obscure this object.

    I don't really know where to start with this, any pointers? I'm sure some sort of depth test is involved..
     
  27. blitzvb

    blitzvb

    Joined:
    Mar 20, 2015
    Posts:
    284
    Thx! Well, I have to buy the terrain to mesh plugin and as I want to understand vertex colors more precisely, I could do it with this asset. But yeah it’s all replaceable with a shader.
     
  28. BOXOPHOBIC

    BOXOPHOBIC

    Joined:
    Jul 17, 2015
    Posts:
    481
    Hello and Happy New Year !

    1. I made a shader that I would like to include in the ASE package. It is a skybox shader that allows you to add height based fog (it takes unity fog color) and rotation animation to cubemap skies. The shader also works better in orthographic than Unity’s built-in skybox cubemap shader. The only thing missing is a DecodeHDR node in order to make it compatible with HDR and LDR textures. I think it will be quite a useful shader to blend the world with the sky properly when fog is used.

    SkyboxExtended - Image 03.jpg

    2. Have you considered adding KeywordEnums to ASE? I think it will be quite nice and useful to select different features (keywords from a dropdown list. Lets say when you have more than 2 options like Unlit, Per Vertex Lighting and Per Pixel Lighting, you need to use 2 toggles where maybe one will override the other, but both are checked.

    Thanks !
     
  29. Amplify_Paulo

    Amplify_Paulo

    Joined:
    Jul 13, 2017
    Posts:
    297
    That should be easy, I'm assuming you want something mobile friendly? Either way in attachment goes a template that you can use that allows for that effect with a flat color, just drag and drop somewhere in your project and this option should show up after hot code reloading kicks in:

    Unity_2018-01-04_14-37-05.png
    Feel free to edit the template itself, I added a color property that you can reuse using the template parameter node. Then you can use the editor like usual.

    I'm actually considering adding this small trick to the standard surface as well since I believe it might be somewhat common.

    And yes, you were right, it has to do with depth, more specifically you need a extra pass that writes to the depth and only then you do alpha blending.

    1. Thats pretty cool, of course we'll accept it and credit you, I'll definitely take a lot at that decodeHDR function, shouldn't be hard to add.

    2. We have, we just didn't figure out a good interface and use case for it so it got forgotten. Its definitely a good suggestion, we'll add it at some point soon for sure, for now we are still going through all support requests from the holidays. Maybe next week? no promises :p
     

    Attached Files:

  30. Amplify_Paulo

    Amplify_Paulo

    Joined:
    Jul 13, 2017
    Posts:
    297
    I forgot in my previous post, you can also use a shader function with a custom expression that calls the function in question, like so:

    Unity_2018-01-04_15-14-20.png
    Shader function in attachment.
     

    Attached Files:

  31. BOXOPHOBIC

    BOXOPHOBIC

    Joined:
    Jul 17, 2015
    Posts:
    481
    Thanks! Initially I tried using a custom expression. Right now this isn't working correctly. When using DecodeHDR, you need to define the cubemap samplerCUBE _Tex and half4 _Tex_HDR (cubemap texture name + _HDR) to use it as decode Instructions. The problem is that I can not define that _Tex_HDR from Ase. I also tried to make it a global half4, but is not working.

    Check the skybox shader from the built-in unity shaders. :)
     
  32. cyuxi

    cyuxi

    Joined:
    Apr 21, 2014
    Posts:
    49
    Hi Paulo,
    Thank you for your reply!
    I still can't manage to get the similar result as you just did. Also, it seems turning On/Off the light or shadow will cause rendering problem( polarized effect? ).
    I have attached my test scene, which include the both samples of ASE and ShaderForge, please have a look.(I am using Unity 2017.2f3.)
    I wonder is there a more handy way of making such depth effect like SF dose?
    I'm looking forward to your continued guidance! Thank you.
     

    Attached Files:

  33. one_one

    one_one

    Joined:
    May 20, 2013
    Posts:
    621
    Is there a convenient way to read neighbouring texels?
     
  34. Amplify_Paulo

    Amplify_Paulo

    Joined:
    Jul 13, 2017
    Posts:
    297
    Well thats another reason why the node still needs to exist by itself. But you can still hack your way through for now, you just add a texture object and a vector4, set both to global and change their name accordingly, then you set the texture object cast mode to sampler CUBE and you add them to the custom expression. By doing this the custom expression node will declare them but not use them. It's hackish and the code is not pretty but it does work. I'll add the proper node as soon as possible. See attachment.

    Thx ;) I'll take a look as soon as I can and report back when I find something.

    You need to pan the UVs by the amount of texels first then read the respective texture. You can do that using the texel size node, check the link for an example (not the attachment).
     

    Attached Files:

  35. marcatore

    marcatore

    Joined:
    May 22, 2015
    Posts:
    160
    Thank you very much.
    Really appreciated.
     
  36. deab

    deab

    Joined:
    Aug 11, 2013
    Posts:
    91
    Thank you that's brilliant. However it isn't showing as a true silhouette - why are the different faces different? Doesn't appear to be lighting as if viewed in the scene view with lighting disabled still appears the same.

    I wondered if it was the normals, but there's no normal pin when using the template I couldn't test this. Is it easy to add a normal pin?

     
  37. Amplify_Paulo

    Amplify_Paulo

    Joined:
    Jul 13, 2017
    Posts:
    297
    What are using in this shot? to me it looks like you have two objects, one with lighting behind and another with the template I've sent in the foreground, since the one in the foreground is transparent with opacity different than 1 it shows a bit of the geometry behind. The template doesn't have any lighting so it only renders a flat color unless you create some sort of lighting inside the shader (like doing a dot product of normals and light direction)
     
  38. BOXOPHOBIC

    BOXOPHOBIC

    Joined:
    Jul 17, 2015
    Posts:
    481
    Thanks again! That's a bit hacky indeed. There's no hurry, I will wait for the node :)

    Also Polyverse Skies, low poly skybox shaders made with ASE, is finally out :D
    For anyone interested, here is the Unity Asset Store link: http://u3d.as/ZXW.

    Youtube - Thumbnail.jpg
     
    Amplify_Paulo likes this.
  39. deab

    deab

    Joined:
    Aug 11, 2013
    Posts:
    91
    It's a single 3d mesh (a crate, shown below as normally rendered).


    There's a black plane behind that I use as a background to hide items below the world. If I disable the background plane, it is indeed flat as expected:


    But I would need other objects behind (its for fading objects blocking the view) so that would not be usable!

    I'm using deferred rendering, would this make a difference?
     
  40. Amplify_Paulo

    Amplify_Paulo

    Joined:
    Jul 13, 2017
    Posts:
    297
    Hi again, after looking at the code I found some ways to optimize it, in fact, we decided to create a new shader function that mimics some of unreal flipbook (which is nice in terms of compatibility and features). While doing it this particular case seemed ideal to some new features for shader functions so while I have it working we are going to delay it into these new features roll out (next week most likely). In any case the real reason I'm replying you now is because there's already a easy way to achieve what you need right now with the current flipbook node. You can simply ignore the start frame input port and just use the time port, time in this context in the index of the frame animation so you can have two flipbook nodes and add a value to the time to the second one, the value signifies the which frame you are looking for, like this:
    Unity_2018-01-05_16-51-06.png

    So I'm just adding 1 to the time to get the index of the next frame. This should be enough for what you are looking for :)
    Stay tunned for the new flipbook tho, it comes with some extra goodies :p

    Could you perhaps send us some simple scene with only that box (email in my signature or PM me)? I feel like I'm missing something, maybe it's the settings of that background plane or how you are setting the foreground but I don't see a reason why it would affect the final result.

    That's.. Awesome!!!

    And you even included a reference to us. Thank you ^^ and of course, good luck!! Feel free to ask us for help if something ever breaks to your customers :]
     
    marcatore likes this.
  41. deab

    deab

    Joined:
    Aug 11, 2013
    Posts:
    91
    Found the problem - SSAO on the camera - my apologies! And changing the Render Queue to Transparent fixes the SSAO image.
     
  42. Amplify_RnD_Rick

    Amplify_RnD_Rick

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

    First of all I would like to wish an amazing year of 2018 to our incredible community!

    We just uploaded the first build of 2018 into our website, and here are the release notes.

    Release Notes v1.4.2 dev 02:

    • Improvements:
      • 'Toggle Switch' node can now share properties
      • Added lock button to property name on property type nodes
        • Allows to customize the internal variable name used
      • Added support for 'View Dir' node on templates
      • Added preview position selection to shader functions to further customize function nodes
    • Fixes:
      • Fixed issue where custom shadows were ignoring vertex colors
      • Fixed issue on 'Fresnel' node using a non-normalized normal vector
      • Small fix on 'Static Switch' node getting and setting values from the material

    Let 2018 be a perfectly shaded year!

    Happy shader creations!
     
  43. one_one

    one_one

    Joined:
    May 20, 2013
    Posts:
    621
    If I read all 8 neighbouring texels that way, does it have the same performance implications as sampling 8 separate textures?
     
  44. Igualop

    Igualop

    Joined:
    Mar 1, 2017
    Posts:
    30
    Is there is any way to make the outline work with a dither or dissolve effect? The closest I got was by tweaking the blend mode of the output shader but I'm pretty sure I was going on the wrong way to solve that :p

    Heres an example on how the outline looks with a dither effect:

     
  45. MirzaBeig

    MirzaBeig

    Joined:
    Dec 27, 2014
    Posts:
    587
    Is there any way to implement headers (bold text) through ASE and change the blend mode with a switch node? I'm thinking of the standard shader:

    upload_2018-1-5_19-19-40.png

    I have an increasing number of properties and I'd like to be able to organize them into sections/groups.
     
    marcatore and KRGraphics like this.
  46. Mister-D

    Mister-D

    Joined:
    Dec 6, 2011
    Posts:
    1,694
    how to disable zbuffer correctly? i only get a semi transparent version working. i want to render my gun mesh on top of everything else in the scene
     
  47. deab

    deab

    Joined:
    Aug 11, 2013
    Posts:
    91
    Back in October we were talking about recreating a cross section effect (like this). Any chance you could have a look at it? Would make a great addition to the included samples :) For my use case I really need all three planes.
     
  48. marcatore

    marcatore

    Joined:
    May 22, 2015
    Posts:
    160
    I have a general question: Are all the nodes runtime evaluated ? Or someone not? If someone not, which ones?

    In particular I'm interested about the "logical operators".
     
  49. BOXOPHOBIC

    BOXOPHOBIC

    Joined:
    Jul 17, 2015
    Posts:
    481
    Thanks ! that's kind of you :)
     
    Amplify_Paulo likes this.
  50. Amplify_Paulo

    Amplify_Paulo

    Joined:
    Jul 13, 2017
    Posts:
    297
    Aside from the obvious memory size differences in terms of shaders there's at least some overhead for each property and sampler. To be honest I don't know how well unity deals with samplers and their state so I'm not sure if there's some optimization going on or not but samplers are limited so I suspect there's some sort of extra cost I'm not aware of for using more.

    The best way to know for sure is to stress test it both and see the performance loss. Maybe it's negligible in your case.

    I'll take a loot at it, should be possible.

    You can't add headers, not yet at least, we just haven't found the proper way to add it. Maybe in the property list? It's more a matter of UI/UX than anything else but since we need some time to "think" about it many other things have priority so it has been delayed.

    About the other, No, not that specific one. It is possible to add enum switches and even recently I talked about it, much like the first one we just need to figure out the UI/UX and we need time. But in your specific case the enum switch does not solve your problem. That rendering mode that you see in the material is not done on the shader level alone. That's a enum that belongs to that material inspector which sets some keywords on and off. So while the shader needs support for those keywords there's no proper way to set them in a batch like that enum. The only thing closer would be to have various keywords that you could set individually. So in order for you to have something like that you would need to create your own material inspector and set your shader to use that one instead of ours.

    You don't need to disable zwrite for that. You only need to change the queue offset of your render queue. You can however change the ztest to always so that it renders on top of everything else, not sure which one is the best for your case tho. You can set the ztest in the "depth" group in the property left panel but it will only allow you to change anything if your blend mode is each opaque or custom.

    I did, I even made some changes to fully support that at that time. I simply never added a sample into the ase package because this effect needs a very specific mesh to work correctly which I simply default back to the free asset on your link. Here's the post: link

    Everything is runtime, even the logical operators. There's only one exception for now, the debug switch.
     
    MirzaBeig likes this.