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

    Amplify_RnD_Rick

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

    We've uploaded a new build into both our website and Unity Asset Store.

    Here are the release notes.
    Release Notes v1.5.7 rev 00:
    • Fixes:
      • Fixed issue with using FACE type nodes over both Lightweight and HD Unlit templates
      • Fixed issue regarding 'Lerp' node's Alpha input port always loading as a Float type
      • Fixed minor issue on 'Function Subtitle' node tooltip
      • Fixed minor issue on 'Posterize' node
        • Power variable should not be shown on property window if its input port is connected
      • Fixed minor issue with auto-spacing over shader function names
    Happy shader creations!
     
    Andrey_Graphics likes this.
  2. arnoob

    arnoob

    Joined:
    May 16, 2014
    Posts:
    152
    It does give me some clues indeed, I guessed the post process type would be the most pertinent to be used, but I would never have guessed that we had to put a script on the camera. I will try to follow your instructions thanks! Just in case, do you think it would be possible to include a basic example of a CRT creation in the samples in the future release of ASE? It would probably be helpful for lot of people :)
     
  3. Amplify_Borba

    Amplify_Borba

    Joined:
    Jul 24, 2017
    Posts:
    538
    That's definitely something to consider, thank you for the suggestion!
     
    arnoob likes this.
  4. arnoob

    arnoob

    Joined:
    May 16, 2014
    Posts:
    152
    Hello again everyone!

    Okay, I have finally been able to make the screen space normals work with two cameras (I don't know why it didn't before).

    DualCameraDecodeNormals.jpg

    But I still can't make it "world space", even with the "transform direction node" (is this node actually working? Is there a bug?).

    DualCameraDecodeNormalsNode.jpg


    By the way, the "Decode Depth Normal" node is super useful. Could it also decode motion vectors in the future?

    Anyway, once this "world space" problem will be solved, I will need to be able to use some of the deferred passes in order to continue the post effects I am working on (namely, the Albedo and Metallic/Smoothness passes). Is it possible to do so in Amplify?
     
  5. zelmund

    zelmund

    Joined:
    Mar 2, 2012
    Posts:
    391
    hi there.
    does it possible to add tesselation to existing terrain shader? i tried and got ghosting effect on it, like it would transparent texture.
    it happens on AddPass shader part. when i try to use on terrain more than 4 textures.
     

    Attached Files:

  6. Luke-kaser

    Luke-kaser

    Joined:
    Apr 2, 2018
    Posts:
    3
    Hello,
    Does any resources or article could help beginner to learn about 2d effect shader?
    how does 2DLiquid work?if has simple tutorial thanks!

    PS: if run ASE at 2018MBP15" with Intel UHD Graphics 630 at some shader editor window will cause screen freezes and after few min to auto shut down.
     
    Last edited: Oct 16, 2018
  7. EscalatorSafe

    EscalatorSafe

    Joined:
    Apr 12, 2018
    Posts:
    21
    Hello!
    in Update v1.5.6 rev 08
    "Fixed Queue Offset not being correctly set when loading certain template based shaders"
    I dont think this is quite working as intended.
    When I open the shader it does indeed remember the queue offset it was set to before but it still internally sets it to 0 after I compile the shader.
    I can tell as my source control picks up a change in the compiled shader.
    and only when I change the queue offset, compile, and change back, compile, does it appear to stick to the value I wanted it.
    Cheers
     
  8. Amplify_Borba

    Amplify_Borba

    Joined:
    Jul 24, 2017
    Posts:
    538
    Hey there, could you please elaborate on the effect that you're going for, so that we might be able to provide more insight? We're not entirely sure if there's need to perform any sort of decoding regarding motion vectors, what is read from the buffer automatically provides an offset in UV space in regards to its previous position, all that is needed is to apply an offset to the current UV.

    Regarding the Transform Direction node, we'll run some tests on our side and will get back to you on this.


    Hello, Tessellation should work with out SimpleTerrain sample, you just need to make sure that the same vertex behavior must be present in the First Pass and Add shaders. It won't be necessary in the Base shader since it's only active at a large distance, so it won't be necessary to have this effect applied.

    Please let me know if this helps, if you're still experiencing any sort of issue feel free to share a sample so that we can debug it on our side, thanks!


    Hello! Although we don't have any 2D sample for that specific effect, keep in mind that you can very well adapt tutorials from other sources to our editor since ASE is based on common shader development standards.

    Regarding the freezes, could you provide additional information regarding your computer specs, Unity version and, if possible, any steps that can be taken to reproduce that behavior?


    Hello, thank you for letting us know, I've just confirmed the issue and have passed it to the developer, you can expect a fix soon!
     
  9. Kolyasisan

    Kolyasisan

    Joined:
    Feb 2, 2015
    Posts:
    283
    Hello! Just bought the product and I am greatly satisfied. I just can't figure out something.
    How can I make a property that will allow me to select whether I want an opaque rendering or a cutout one? I'm currently making an uber-shader for a specific use-case and I really don't want to split my shader into Opaque and Cutout variants. It should be rather obvious why having the mask set to 0 to be a bad alternative to Opaque rendering. Having a toggle or a dropdown like in the Standard shader would be awesome.
     
    Last edited: Oct 17, 2018
  10. arnoob

    arnoob

    Joined:
    May 16, 2014
    Posts:
    152
    Thank you for looking at it!

    Well, for what I am currently doing, motion vectors aren't needed, it was simply something that I thought could be useful in the future for some custom screen space effects made with amplify.

    However, the deferred pass is something I need right now in order to implement some custom lights i made.
    It already permits me to have distant shadows (shadows that are only rendered when I ask it to, in order to have fewer draw calls) and I can cast the shadows on anything (even transparent objects if I want).
    Two cascades are presents in the picture below, (the transparent particules's shadows only have a rough noising as a blur, I will look into it later).

    Custom_TransparentShadows.jpg

    However, the shadowing is currently done in the surface shader, which means I have to put the function in every shader that I create that would need it, and it use at least 6 samples (for 5 cascades and a noise sampling).
    In order to ease it a bit I would like to make as post processing shader that would show the lighting directly on the screen (standard deferred style), but in order to do that I need to sample the albedo (for the diffuse lighting) and specular (for reflection) passes.

    That is why I would like to be able to access these passes in my shader.

    Also, with this setup, I can define a light by a few variables (direction, size, color etc...). These variables can easily be saved in a global shader array. Using a 3D texture as index, I will then be able to sample from 255 lights in a same scene, as long as no more than 3 lights are illuminating the same voxel (a kinda-forward plus setup?).
    All lights will then be rendered all over the scene, at the price of "only" 3 lights.

    Hope it helps explaining why I need these samples! :)
     
    Last edited: Oct 18, 2018
  11. Amplify_Borba

    Amplify_Borba

    Joined:
    Jul 24, 2017
    Posts:
    538
    Hello and thank you for your support, we're happy to know you're enjoying ASE!

    Unfortunately, those Blend Modes also alter the Render Queues, which means that you'll need to use different shaders in order to switch between Blend Modes, as it's not possible to change the Render Queue since it can't be set to a property.


    Thank you for providing additional details, unfortunately it won't be possible to use Transform Direction in this particular scenario since you're using it in a Post-Processing shader, which doesn't provide the transform matrix data from the objects since the effect is being applied to a quad that fills the screen rather than the objects themselves, which would provide the necessary matrix data.

    In short, this node needs to be used in a shader that is applied directly to the objects it is meant to act upon.
     
    Last edited: Oct 18, 2018
    arnoob likes this.
  12. arnoob

    arnoob

    Joined:
    May 16, 2014
    Posts:
    152
    Good to know.
    So basically, if I manage to obtain the transformation matrix from the camera manually, I will then simply have to multiply it by the screen space normals in order to obtain world normals?

    And also, about the albedo pass, do you know if it is possible to get it in the standard pipeline?
     
  13. Prodigga

    Prodigga

    Joined:
    Apr 13, 2011
    Posts:
    799
    Hello!

    Can we have a feature to convert the selected nodes into a function? It sucks having to copy paste nodes from one shader to a shader function, because the property names break when copy/pasting and then we have to manually plug stuff back in again! :)

    Cheeeeers
     
  14. bitinn

    bitinn

    Joined:
    Aug 20, 2016
    Posts:
    580
    Hi,

    I am just wondering if ASE were already tested for LWRP 4.0.x releases? I have tried using ASE 1.5.7 rev00 on Unity 2018.3.0b5 with LWRP 4.0.1 and so far none of the LWRP examples are working, they are largely caused by include error such as:

    I believe since 4.0.x the include path has changed. They are closed to shipping LWRP stable, so hopefully ASE is preparing for it as well.

    (I have followed the usual steps of setting up LWRP templates, but this seems like the LWRP base template is the problem, as re-compiling the shader doesn't do me any good.)

    (EDIT: looks like just changing include path and keywords are not enough, things like TangentToWorldNormal and ApplyFog has also changed. I am trying to find the shader snippet where ASE decide to use TangentToWorldNormal, so that I can replace it myself, any suggestion?)

    Thx
     
    Last edited: Oct 19, 2018
  15. zelmund

    zelmund

    Joined:
    Mar 2, 2012
    Posts:
    391

    yep, all must be simple, but i feel like i did something wrong =(
    here is shaders + function
     

    Attached Files:

  16. Amplify_Borba

    Amplify_Borba

    Joined:
    Jul 24, 2017
    Posts:
    538
    Since you're using a post-processing shader, you'll need to send the camera to world's matrix values directly through script in order to get the correct values. We've set up a simple sample as an example, which I'm attaching to this post for your convenience:

    GetWorldNormals.zip

    Please let us know if this helps!

    Regarding your other question, could you please elaborate on what you mean by the Albedo Pass and what you're trying to achieve? Thanks!


    Hello, thank you for your feedback! This is something that we have plans for and that will hopefully be available in a future version.

    The issue with breaking property names and values when copy/pasting, however, its something that has been corrected in the latest ASE versions, so please update by downloading the latest build from our website and let us know if the issue still persists.


    Hello, we're still investigating the latest render pipeline release and working on new templates, which will be required due to the major changes that Unity has made, so we're not quite sure on what to suggest just yet We will be sure to release them as soon as possible, so stay tuned!


    From a preliminary investigation, I'm not entirely sure why you're using a Blend Operations node in the Local Vertex Offset port, as it's not meant for this type of use. By removing it and tweaking the Distance-based Tessellation node, it seems to be working as expected, did you have any different result in mind?
     

    Attached Files:

  17. Amplify_RnD_Rick

    Amplify_RnD_Rick

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

    We've just uploaded a new build into our website.

    Here are the release notes.
    Release Notes v1.5.7 rev 01:
    • New Templates:
      • Custom RT Init
        • Packed inside AmplifyShaderEditor > Plugins > EditorResources > Templates > CustomRTTemplates
      • Custom RT Update
        • Packed inside AmplifyShaderEditor > Plugins > EditorResources > Templates > CustomRTTemplates
    • New Sample:
      • Custom Render Texture Rain
        • Packed inside AmplifyShaderEditor > Examples > Custom RT Samples
    • Fixes:
      • Fixed issue on Queue Offset incorrect writing over templates
      • Fixed issue on templates not recognizing uint
      • Fixed minor issue over Directives UI
      • Fixed Shadow Coord macro registry differences between Unity 5.5 and above
    • Improvements:
      • Added Substance Plugin integration over ASE for Unity 2018 and above
      • Added Mirror option into 'Depth Fade' node
        • Enabled by default, which was older behavior
        • If toggled on, sets an abs operation over the final value
      • Custom Render Textures can now be used/dragged over ASE
      • Can Pan and Zoom ASE canvas camera through keyboard directional keys
        • Up/Down/Left/Right Arrow keys pan camera
        • Alt+Up/Alt+Down/Alt+Left/Alt+Right Arrow keys zoom camera
    Just a few notes over this build:

    We already added support for Substances in ASE with Unity 2018. The guys at Allegorithmic were really supportive and helped us out through the process.
    Please notice that you MUST have the Substance in Unity plugin imported into your project in order to be able to use Substances on Unity 2018 and above.

    Also we've added two new templates, to be specifically used with custom render textures. One for the initialization process and the other for the update.
    A new sample was also added to demonstrate its usage. Both templates and sample are packed on unity packages since this is a feature that only came along Unity 2017 and ASE needs to maintain compatibility/be error free with Unity 5.5 and 5.6.

    Here's a quick glimpse over the new sample in action:



    Finally, in regards of SRP 4.0.0, like @Amplify_Borba already commented, we are already working on it. Since much has changed from 3.x.x to 4.0.0 we decided to create brand new templates and will release them as soon as possible.

    Hope all of you have a great weekend and as always happy shader creations!
     
    Last edited: Oct 19, 2018
  18. arnoob

    arnoob

    Joined:
    May 16, 2014
    Posts:
    152
    Awesome! Thank you for providing a solution for CRT so fast!

    EDIT : Alright I took a look at it. it works perfectly, the code on the camera is pretty simple. However I can't manage to open the shaders used on the CRT with amplify. It only open a new tab, that stays gray, with "shader editor" writen instead of "CustomRTInit" or "CustomRTRainUpdate" as a name. Did you have this issue on your side?

    Well as I said in the previous post. I already made some custom lights in amplify shader. But now I would like to show them through post process (and not on the surface shader itself). In order to do that correctly, I need to multiply the light values by the albedo (original the color of the surface the light is lighting) and the specular passes in order to have a correct PBR lighting.

    (I joined picture of the 4 deferred passes that you can isolate in the editor scene. Those are the passes I am talking about, aside from the normal pass, that I already have).

    Oh by the way thank you for the camera matrix tip, I already took care of it but your response might help others in the future ;-)
     

    Attached Files:

    Last edited: Oct 20, 2018
  19. jjobby

    jjobby

    Joined:
    Nov 28, 2009
    Posts:
    151
    Hello, is there any way to control intensity of point lights in Amplify standard shader? I want the character to have less affect from point light in the scene. So, I intend to create normal standard shader that can modify intensity of point lights from environment. Is this possible to do in Amplify?

    Edit: I manage to do it by using Standard Surface Light to calculate light in Custom Lighting. Then I use #if POINT to separate between direct light and point light and apply multiplier to the LightingStandard function. The downside is that the modified code will be removed when Amplify save the file. If someone can suggest a better approach then I would really appreciate it.
     
    Last edited: Oct 20, 2018
  20. victorkin11

    victorkin11

    Joined:
    Apr 20, 2013
    Posts:
    97
    I have a question about shader function, I thought when using shader function multiply time in one shader, it only gen 1 time the shader function code, but when I check the shader generated code, How many time I use that shader function, there are same many time same version of shader function code with different number, is it a bug?!
     
  21. jjobby

    jjobby

    Joined:
    Nov 28, 2009
    Posts:
    151
    Is it possible to have Refraction in Custom Lighting mode?
     
  22. zelmund

    zelmund

    Joined:
    Mar 2, 2012
    Posts:
    391
    using blend operation give me needed result.
    but even if i ignore blend node, i still have ghosting.
    did a screenshots with different node inputs and results.
     

    Attached Files:

  23. Amplify_Borba

    Amplify_Borba

    Joined:
    Jul 24, 2017
    Posts:
    538
    No problem!

    You'll need to unpack the new templates that can be found in the CustomRTTemplates package within the AmplifyShaderEditor \ Plugins \ EditorResources \ Templates folder.
    As stated in the release post, both templates and sample are packed on unity packages since this is a feature that only came along Unity 2017 and ASE needs to maintain compatibility/be error free with Unity 5.5 and 5.6.

    Regarding your other question, thank you for providing additional details, you'll need to access the _CameraGBufferTexture0, and you'll have the Albedo data in the RGB channels while the Alpha channel contains Occlusion, so it can be ignored. Please refer to the screenshot below:



    Please let me know if this helps, thanks!


    Hello! You can use the POINT variable in a Static Switch with its mode set to Fetch rather than through editing the code, here's an example on how it needs to be set up:



    Do note that in the above example, False will return blue, while True will return a blend of both values.

    Another valid approach that you can also consider for accessing lighting data is through use of the World Space Light Pos node, which behaves different according to light type and, in case of point lights, returns 1 as the Type output, and the world space position as the Dir/Pos output.


    Hello! Shader Functions are meant to help organize complex node networks and to eliminate unnecessary repetitive tasks, but they'll still show in the shader code in the same way as if you didn't pack their contents into functions, which is an expected behavior.


    Hey there! It's definitely possible to have Refraction in Custom Lighting mode possible, but you'll have to set it up manually through use of the Grab Screen Position and Grab Screen Color nodes. The Refraction port that we provide in the Standard Surface shader is in fact a custom lighting setup that we've implemented specifically for that type, so it's not suitable for other light models.


    You'll need to make sure that your tessellation setup is exactly the same in both the FirstPass and the AddPass shaders, otherwise you might end up getting unexpected results such as ghosting.

    I've just tested the Distance-based Tessellation node with the SimpleTerrain sample simply by using the setup shared in the image below in both shaders, and it seems to be working as expected.

     
    arnoob likes this.
  24. arnoob

    arnoob

    Joined:
    May 16, 2014
    Posts:
    152
    Thank you Borba! I am now able to create my own ambient lighting, as well as starting to have fun with my own custom SSAO that I can now directly do in ASE! :-D
    However, I miss one final pass in order to use my 3D texture for GI and project my own light shadows in screen space : the world position of the pixel on screen. I thought that simply multiplying the linear depth pass with CameraToWorld matrix (obtained through the script that you shared in the postprocessing shader) would do the trick. But sadly it doesn't. This is really the final element I need in order to achieve my own custom lighting.

    Do you know how it would be possible to get the world position of the pixels of the screen in a post process shader?

    EDIT : Never mind, I found how to. For others that are in the same situation : you can use the "reconstruct World Position From Depth" node. It works perfectly on a post process shader attached to a camera!

    Also about the the custom render texture package. Of course I did extract the package, otherwise I wouldn't have been able to access the shaders and materials or the scene dedicated to CRT ;-). I tried to open it in an other project, and I still face the same problem (can't see or edit the shader in ASE, the tab stays blank). I am using 2018.3.0b5. Can it be related?
     
    Last edited: Oct 24, 2018
  25. zelmund

    zelmund

    Joined:
    Mar 2, 2012
    Posts:
    391

    its identical.
    i even did float for min-max dist (not vector2)
    and its still ghosting.

    i fell frustrated ((
    can you share your working copy of tesselated terrain? ill try to match and understand why my shader wont work as i expected.
     

    Attached Files:

  26. jjobby

    jjobby

    Joined:
    Nov 28, 2009
    Posts:
    151
    Thank you very much. I created two static switch nodes, TRUE and FALSE. In case of TRUE (it's point light), I multiplied it with float value and added the result with output from FALSE static switch (light from other source). Now I can decrease the intensity from point light in the shader. But I just noticed another problem. This method doesn't work for point light in non-important mode. The intensity didn't affect at all. I don't know if it has different keyword or I have to use other method. Can you explain to me what's the problem here?

    I looked at SimpleRefraction example. I can make it work now. I couldn't do it before because I insert color x texture as input to Albedo in Standard Surface Light node. I have other questions. Because I use Standard Surface Light node in Custom Lighting. Now, I have two Albedo and two Emission inputs from Master node and Standard Surface Light node. From my testing with this refraction method, the result was not the same. The one from Master node was more transparent and the other was very bright. What is the different? Which input should I use? (but in this case, I prefer Emission from Master node)
     
  27. OliverAge24Games

    OliverAge24Games

    Joined:
    Jun 13, 2014
    Posts:
    16
    I've been playing around with this plugin, and I'm really struggling to wrap my head around how to do something that seems like a normal use case...

    I have my RGBA 'cable' going from my main sprite into a greyscale node. The greyscale node only takes RGB though, so the A is lost. I'm then trying to multiply the RGB 'cable' by the Alpha cable which I take from the original sprite, to get the alpha back. It works... but on the pixels where there is a semi-transparency, it alters their colour - So each of my sprites have an outline that I don't want.

    Is there no node that takes in a RGBA 'cable', and gives out separate R, G, B and A cables, and then a node that takes the separate R, G, B, and A cables, and gives out a combined RGBA cable? Allowing you to just alter one value?

    If not, how would I add the A cable back into the RGB cable to make the combined RGBA cable again?

    Is that a weird use-case, or normal use-case?

    Cheers,
    Oliver
     
  28. sacb0y

    sacb0y

    Joined:
    May 9, 2016
    Posts:
    202
    Anyone else having an issue where a "get variable" displays a different result than the input?

    It results in the shader outputting wrong despite the node displaying properly. The fix is remaking the "get" node. Worse it's been rolling through happening to other "get" nodes when I make changes.

    Sometimes I even get a complete error in the shader if I plugin the faulty "get" node to the result.

    I'm using unity 2018.2.12 and this is in a new project. This is a custom lighting shader, no SRP enabled.
     
  29. ifayad

    ifayad

    Joined:
    Jun 15, 2017
    Posts:
    24
    Hello Oliver, To combine channels you can use the "append" node (in your case you are multiplying the pixels in the alpha channel with the pixels from the RGB channels). However, to add the alpha back in, add an append node in your graph (in the parameters of the append node, top left, you can set how many outputs it will have; e.g. if you want to append RGB + A, set output type to color) connect the RGB from someplace, and connect the alpha channel from your sprite to the last input (designated A). To separate the channels, use the "break to components" node, it takes an input with multiple channels and breaks them. I have attached a snipped that shows the append and break to components nodes.

    snippet.PNG
     
  30. Ozhogi_AMG

    Ozhogi_AMG

    Joined:
    Sep 5, 2018
    Posts:
    1
    Hello all

    I had to create a tun shader with a custom brightness at the shadow sides. Faced with the problem that if the multiply-final pass through add, the brightness of all increases, even if there is a white color and even a separate one does not help. I wrote on the amplify forum, we talked a bit with Borba and I came to the conclusion that this is not a technical problem.
    http://amplify.pt/forum/viewtopic.php?f=23&t=888&sid=e127b98403fcc3f7c3f60fcdb078f905
    In the end, as it seems to me, I used the curve and the wrong way. But he works lol
    Maybe someone will benefit from such a decision, at least for a start, maybe someone will tell me how to do it all correctly.
    Plus, toon shaders mostly use Divide for sharpening shadows, but Smoothstep gave a more attractive result, but for some reason I think this is too cumbersome
    Maybe someone tell me if I did everything right? :)
     

    Attached Files:

  31. sacb0y

    sacb0y

    Joined:
    May 9, 2016
    Posts:
    202
    Also secondary question, advice for getting specular highlights in custom lighting? I've checked many tutorials but none seem to line up properly.

    And i don't mean the indirect specular i mean similar to the highlights in the unity standard specular shader.

    I'm also wondering about anisotropic specular too...
     
    Last edited: Oct 24, 2018
  32. julian-moschuering

    julian-moschuering

    Joined:
    Apr 15, 2014
    Posts:
    399
    There seems to be a pretty new bug in one of the latest releases regarding InstancedProperties:
    When having a custom function node that includes an instanced property the buffer declaration in the shader is not generated (UNITY_INSTANCING_BUFFER_START). Only when the actual shader graph includes an instanced property, which doesn't has to be used and doesn't need Auto Register, the buffer declaration is created and now includes the inner property previously missing.
     
  33. Amplify_Borba

    Amplify_Borba

    Joined:
    Jul 24, 2017
    Posts:
    538
    Thank you for letting us know that you've found a workaround for your first question!

    Regarding the second matter, can you confirm that you've extracted both "Custom RT Samples.unitypackage", which contains the assets you've described, as well as the "CustomRTTemplates.unitypackage", which contains the necessary templates to open 2 out of the 3 shaders contained in the first package?

    I've tested it on my side and the sample seems to be working as expected in Unity 2018.3.0b5.


    No problem, I've set the sample up as I've described in my previous reply, for your convenience:

    SimpleTerrainTessellationSample.zip

    It's working as expected on my end, but please let me know if you come across any issues.

    If you still experience ghosting of any sorte, please send us a sample project to support@amplify.pt so that we can debug it on our side using the same data as you, and also share your system specifications, thanks!


    Can you show us what you've built so far, so that we may best help you?
    Feel free to share a sample through support@amplify.pt, thanks!


    Hello! Can you provide the necessary steps to replicate the issue or, if possible, a sample with the issue present, so that we can debug it on our side? Feel free to send it over through support@amplify.pt, thanks!


    I believe that you'll need to use the Blinn-Phong Light function for this:




    Thank you for reaching out to help a fellow community member!


    Hello, unfortunately I can't seem to replicate that behavior, here's what I understood what caused it based on your description:



    The shader only contains the custom function, and the custom function only contains the instanced property, and after compiling the function and then the shader, the buffer seems to be generated in the code.

    What Unity and ASE versions are you currently using? Could you provide a detailed step-by-step guide to replicate this?
     

    Attached Files:

    ifayad likes this.
  34. Alexander_T_

    Alexander_T_

    Joined:
    Mar 5, 2018
    Posts:
    6
    Hello, please tell me how to convert World normal to Tangent in ASE upload_2018-10-24_17-26-31.png
     
  35. Amplify_RnD_Rick

    Amplify_RnD_Rick

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

    We've uploaded a new build into our website as we found out a nasty issue with the Register/Get Local Var nodes and wanted to give a fix to it as soon as possible.

    Here are the release notes.

    Release Notes v1.5.7 rev 02:
    • Fixes:
      • Fixed issues on 'Static Switch' node
        • Property Name wasn't available in all options
        • Keys on Keyword Enum over Fetch Mode were being automatically upper cased
      • Fixed issue on 'Get Local Var' node not propagating node data correctly after being loaded


    We have a Transform Direction node, but its still missing the Tangent Space as an option.
    Rest assured that we will be adding Tangent Space to it, but for now you will need to do the transform this way:


    Happy shader creations!
     
    brisingre and Alexander_T_ like this.
  36. Alexander_T_

    Alexander_T_

    Joined:
    Mar 5, 2018
    Posts:
    6
    Thanks!

     
  37. jjobby

    jjobby

    Joined:
    Nov 28, 2009
    Posts:
    151
    I sent the mail.
     
  38. arnoob

    arnoob

    Joined:
    May 16, 2014
    Posts:
    152
    My bad indeed, I tried to open the same package twice, hence becoming the people that don't properly read that I despise, sorry about that... :-/
     
  39. julian-moschuering

    julian-moschuering

    Joined:
    Apr 15, 2014
    Posts:
    399
    This problem started after updating from to v156_002 to v157_001. The cause is this addition in FunctionNode.RefreshExternalReferences:
    Code (CSharp):
    1.                 else
    2.                 {
    3.                     // Assuring that we're not editing a Shader Function, as directives setup is not needed there
    4.                     if( !UIUtils.CurrentWindow.IsShaderFunctionWindow )
    5.                     {
    6.                         // This function is nested inside a shader function itself and this method
    7.                         // was called before the main output node was created.
    8.                         // This is possible since all nodes RefreshExternalReferences(...) are called at the end
    9.                         // of a LoadFromMeta
    10.                         // Need to delay this setup to after all nodes are loaded to then setup the directives
    11.                         m_lateRefresh = true;
    12.                         return;
    13.                     }
    14.                 }
    I have multiple encapsulated functions and the problem seems to be, that InstancedPropertyCount is only passed to parent but order is not ensured thus correct count never reaches top graph?

    Repo shader is attached.
     

    Attached Files:

  40. Amplify_Borba

    Amplify_Borba

    Joined:
    Jul 24, 2017
    Posts:
    538
    Thank you, we'll get back to you as soon as possible!


    No problem, please let us know if you come across any further issues, we're always happy to assist!


    Thanks to the additional details and sample you've provided, we've managed to track down the issue!
    You can expect a fix in an upcoming build, apologies for the inconvenience.
     
    julian-moschuering likes this.
  41. sacb0y

    sacb0y

    Joined:
    May 9, 2016
    Posts:
    202
    Ah i see you guys worked out the problem, awesome :D

    Also i'm well aware of that node for blinn-phong light but i wanted to get the math for it manually. That node gives additional parameters and information i don't need.

    In the end i found someone elses shader posted here that had the manual node set up i needed.

    I have a mimick of the PBR specular shader made from scratch made entirely of ndoes in custom lighting but the only issue i have right now is accurately mimicking the specularity.
     
  42. Amplify_Borba

    Amplify_Borba

    Joined:
    Jul 24, 2017
    Posts:
    538
    Yes, we've ran a few tests and managed to track down the issue, thank you for giving us the heads up!

    Regarding the Blinn-Phong Light function that was previously suggested, I've failed to mention this but did you get the chance to open the function and examine the node setup? You can do so by double-clicking with the LMB on the node, as with any other function node.

    Please let us know if you come across any further issues, we'll be happy to assist.
     
  43. Amplify_RnD_Rick

    Amplify_RnD_Rick

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

    We've uploaded a new build on our website, and also submitted it over the Unity Asset Store so it should be available over there soon.

    Here are the release notes:
    Release Notes v1.5.8 rev 00:
    • New Sample:
      • Substance 2018
    • Fixes:
      • Fixed canvas crash when loading shaders with missing templates
      • Fixed issue on UV Coords creation over 'Substance Sample' Node
      • Fixed issue with loosing Substance reference on 'Substance Sample' node when applying new changes on it
        • Only happened on Unity 2018 with Substance in Unity plugin
      • Fixed issue on nested instanced properties over shader functions not being taken into account
    • Improvements:
      • Upgraded Lightweight and HD templates to v5.0.0
        • Maintained templates for v.3.x.x under the packages HDSRPTemplates (Legacy) and LWSRPTemplates (Legacy)

    We updated our SRP templates to compatible with the latest version at Unity's Scriptable Rendering Pipeline repo, but maintained the current ones under the packages HDSRPTemplates (Legacy) and LWSRPTemplates (Legacy) since v3.0.0 is still the one directly available over the Package Manager.
    All SRP related samples are still using the legacy templates.

    We are also already working on a brand new HD template based on Unity's HD Lit Master Node and will make it available as soon as possible.

    Hope all you guys have an amazing weekend and happy shader creations!

    EDIT: We noticed that Unity's importer gets a little confused when importing the new SRP template packages into the project. The old packages were renamed to have the (Legacy) suffix but somehow it doesn't detect that and generates a GUID mismatch with the new ones.
    Please remove the old HDSRPTemplates and LWSRPTemplates packages before importing this one.
     
    Last edited: Oct 26, 2018
  44. ifayad

    ifayad

    Joined:
    Jun 15, 2017
    Posts:
    24
    Hey @Amplify_RnD_Rick ,
    I noticed Unity have new shaders available in HDRP (I am mostly interested in the fabric ones), will they have templates in the near future ?

    Thanks on your already great work.
     
  45. Amplify_RnD_Rick

    Amplify_RnD_Rick

    Joined:
    Feb 15, 2016
    Posts:
    510
    Thank you so much for such kind words!
    For now we are working on the HD Lit template and we will try to make it as flexible as possible, so it can cover as may material types as possible.
    After that, we can definitely check specific materials that cannot be created under that template and add templates specific for those.

    Also, we updated the build on our website with a new one which has a workaround for the importing issue so you guys don't need to manually delete the legacy template packages.
     
    ifayad likes this.
  46. sacb0y

    sacb0y

    Joined:
    May 9, 2016
    Posts:
    202
    ooooh? I can look inside that function? I didn't realize that was the case :O

    Cool i'll do that.

    Also does the substance 2018 node just for substance source or does it allow for the realtime update too?
     
  47. daville

    daville

    Joined:
    Aug 5, 2012
    Posts:
    272
    Hi I'm trying to make a custom phong lighting in LightWeight SRP, Any idea why this isn't working?

    The light is pointing directly down, and it seems as if the direction of the light is not being modified in the WorldSpaceLightDir

    upload_2018-10-27_19-0-54.png
     
  48. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    3,984
    Glad for the new updates. Hopefully, we will be able to add multipass rendering for things like hair, alpha blending (which I still need to convert to HD SRP. And alpha blending for hair planes didn't work at all), and hopefully they work with the shader functions @Amplify_Paulo created for me.
     
  49. unity_5fpsmegasupergiperprogramer

    unity_5fpsmegasupergiperprogramer

    Joined:
    Dec 1, 2017
    Posts:
    101
    Hi. Need help.
    In “Shader Forge” there was “Specular Ambient Light” as this to make in Amplify???
    upload_2018-10-29_16-0-6.png
     
  50. Amplify_Borba

    Amplify_Borba

    Joined:
    Jul 24, 2017
    Posts:
    538
    Yes, all functions are accessible by double clicking them, so that you can examine or even re-purpose them.

    Regarding Substance, we use the textures that are generated so, if they are updated in real-time, ASE should be able to react to that and point to the correct textures that are generated by the substance. Please let us know if you come across any issues, we'll be happy to help.


    Hello, there seems to be an issue with the World Space Light nodes not behaving as expected in SRP, apologies for the inconvenience.

    I've passed this information to the developer for further investigation, hopefully we can provide a fix soon.


    Thanks, let us know if you come across any issues!


    Hello, you need to set your shader's Light Model to Specular in order to enable the Specular workflow and its respective Port in the Output Node.



    EDIT:

    I believe that I misunderstood your original post, if you're looking for a Custom Lighting solution similar to SF's, its something that's implemented differently in ASE, so you'll have to set up the light calculations manually through our Lighting nodes, or use the Standard Surface node as a starting point.
     
    Last edited: Oct 29, 2018
unityunity