Search Unity

  1. Unity 2020.1 has been released.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    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. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    1,744
    NEW! Amplify Shader Editor Tutorial 1 - User Interaction [BETA 1]



    Amplify Shader Editor - Asset Store Page
     
    Malbers, zyzyx, kebrus and 1 other person like this.
  2. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    I was not asking Substance Integration, i was only asking a new shader preset based on the most common PBR workflow, i mean a new shader having Metallic and Roughness as inputs instead of Glossiness.
     
  3. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    1,744
    Our apologies for the misunderstanding. Support for that workflow is almost complete. We will let you know as soon as it's available.

    Thanks!
     
    zenGarden likes this.
  4. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    No need to aplogize, anyway thank you for bringing the metallic/Roughness workflow :)
     
    IFL likes this.
  5. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    3,997
    Wow! This is impressive. I just got a ping in my email for new assets, and this was on top of the list... I am hoping to see shader creation for physically based skin shaders and subsurface scattering with support for transmission maps. I'm primarily a character artist and things like skin, hair, cloth, and eyes are important.

    Games like Paragon have impressive shaders and I hope with this, I can create the same details I have now. I use Alloy btw, and I'm keeping an eye on this
     
  6. kebrus

    kebrus

    Joined:
    Oct 10, 2011
    Posts:
    414
    Good introduction. Explaining the shortcut keys and the expandable panels is indeed important, it took me a while to figure that by myself.

    Found another small bug.

    With the new Render queue parameter even if I save with the parameter "Transparent" if I then close the editor and open it again it defaults to Geometry. Nothing major but I thought I should warn you.

    [edit] The same thing happens with vector 2 append nodes, They default to vector 3 in the editor (but are compiled correctly)
     
    Last edited: Sep 29, 2016
    Shodan0101 likes this.
  7. Amplify_RnD_Rick

    Amplify_RnD_Rick

    Joined:
    Feb 15, 2016
    Posts:
    513
    Thanks for reporting these issues!
    They will be fixed on our next update!
     
    kebrus likes this.
  8. eafreak

    eafreak

    Joined:
    Jan 28, 2014
    Posts:
    5
    Hallo

    Request for logic operators

    ex: If, Else, Switch
     
  9. moure

    moure

    Joined:
    Aug 18, 2013
    Posts:
    184
    After seeing the "frantic" development rate, i had to support you :)
    Here is a re-make of a shader i had hand-written before and ported to Amplify Shader
    Amplify_First_Shader.png
    It's a stylized shader that mixes world space gradient with triplanar projection. Solid first release, had no issues using the editor. I kind of miss an integrated preview window, so that i can just focus on shader creation without having to manually create a preview scene. Also i don't know what your thoughts are for node previews. If you are against having a preview window on every node it would be cool if there was a seperate "Preview Node" that we could manually place in the graph to help debug and visually organise big graphs.
     
  10. spaceemotion

    spaceemotion

    Joined:
    Sep 29, 2015
    Posts:
    91
    The popular world generation program World Machine allows you to set any node to a "preview" to see the generated output up to that node. It would be nice to have something similar to that.

    On a side note, the "center on node" feature does not scale the view, is this intended? When you have a big graph and hit the center button, you still only see a fraction. Would be cool to have it auto-scale to have a better overview!
     
  11. Amplify_RnD_Rick

    Amplify_RnD_Rick

    Joined:
    Feb 15, 2016
    Posts:
    513
    Yes, these are really important. Already registered them on our roadmap.

    Thank you so much for the support! Please let us know if you have any kind of issues.
    Feedback is always welcome!
    EDIT: Your suggestion on having preview on nodes was already given by another user and is registered on our community suggestions!

    Double click the button, or double hit 'F' key and it will also auto-scale.
     
    Last edited: Sep 30, 2016
  12. RoyArtorius

    RoyArtorius

    Joined:
    Jul 11, 2013
    Posts:
    70
    I hope I'm not pushing my luck but there's one more thing I would like to see.

    A variable node or a portal node. Basically, have a node's output connect to a variable node and have another variable node that is an instance of that variable, like how the texture 2d nodes work now. This way there won't have to be wires going across the entire shader editor or numerous wires all coming from the same output and creating a mess of wires.
     
  13. Amplify_RnD_Rick

    Amplify_RnD_Rick

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

    Just uploaded a new version into the beta area.

    Here are the release notes.

    Release Notes v0.1.3 dev 003
    - Added RegisterLocalVar node. This is a node to improve shader readability in certain situations, as it forces the shader to create a local var containing its input value and always use that as output
    - Added Screen Color Texture Reference feature
    - Created Simple Refraction example ( Samples/SimpleRefraction )
    - Fixed issues with sampler instance resizing
    - Fixed issue with Fresnel node incident vector
    - Fixed issue with attemping connection removal on inexistent nodes ( bug affecting Append node )
    - Fixed issue with overwriting render type and queue values with Blend Mode default values on read from file

    Please let us know if you find any issue and happy shader creation!
     
    Last edited: Sep 30, 2016
    kebrus likes this.
  14. RoyArtorius

    RoyArtorius

    Joined:
    Jul 11, 2013
    Posts:
    70
    Is the register local var similar to what I asked about? Because that would have been fast :p
     
  15. Amplify_RnD_Rick

    Amplify_RnD_Rick

    Joined:
    Feb 15, 2016
    Posts:
    513
    Please don't have any kind of problem in suggesting anything. We really want to know what you guys need/want implemented on ASE!
    What you suggested is really useful and will enable a much cleaner graph. This was already on our private roadmap.
     
  16. Amplify_RnD_Rick

    Amplify_RnD_Rick

    Joined:
    Feb 15, 2016
    Posts:
    513
    :D It's not quite what you are looking for. But your request is quite nice so expect it to maybe be on our next update! :D
     
  17. kebrus

    kebrus

    Joined:
    Oct 10, 2011
    Posts:
    414
    Really great additions. Since your fresnel solution is different from what I was using in my experiments I'll work with both to see the differences and come up with something fast and intuitive for a distortion shader and I'll share it tonight.

    Thx for the local var node. That really helps to maintain code.
     
  18. Amplify_RnD_Rick

    Amplify_RnD_Rick

    Joined:
    Feb 15, 2016
    Posts:
    513
    Awesome! Looking forward to see your shader in action!
     
  19. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,422
    Latest beta give me this error when i'm trying to open the shader editor from material inspector
    Code (csharp):
    1.  
    2. NullReferenceException: Object reference not set to an instance of an object
    3. AmplifyShaderEditor.UIUtils.CustomStyle (CustomStyle style) (at Assets/AmplifyShaderEditor/Plugins/Editor/Utils/UIUtils.cs:1098)
    4.  
    and this error when opening shader editor from windows menu
    Code (csharp):
    1.  
    2. UnassignedReferenceException: The variable MasterNodeOffTexture of AmplifyShaderEditorWindow has not been assigned.
    3. You probably need to assign the MasterNodeOffTexture variable of the AmplifyShaderEditorWindow script in the inspector.
    4.  
    the refraction shader sample also broken in deferred
    tested in unity 5.4.0
     
  20. Amplify_RnD_Rick

    Amplify_RnD_Rick

    Joined:
    Feb 15, 2016
    Posts:
    513
    I'm not being able to replicate the console error on my end. Can you let me know how did you opened ASE? (P.e double clicking a specific shader)

    EDIT: Also is it possible for you to share the full error message from your console?
     
  21. Amplify_RnD_Rick

    Amplify_RnD_Rick

    Joined:
    Feb 15, 2016
    Posts:
    513
    Just tried downloading the zip into both a windows and mac machine. Imported it into empty project s and still not throwing me any errors on those situations.

    Sorry for asking this, but can you delete ASE from your project folder, reimport the new version and let me know if the errors persist?
     
  22. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,422
    Uhh this might be kinda weird but after i restart unity those error are gone i cannot repro the error anymore, also i've tried delete and reimport.
    But the refraction sample still broken, and honestly i think the refraction graph are incorrect and you sampling the grabpass twice and for a simple refraction sample that's kinda overkill :p
    This might be better
    upload_2016-10-1_0-9-33.png
    upload_2016-10-1_0-11-10.png
    No depth based refraction test btw, just a pure distort everything

    The local variable graph are handy, how about also add the variable input name in the node directly just make it like Float Constant node?
     
  23. Amplify_RnD_Rick

    Amplify_RnD_Rick

    Joined:
    Feb 15, 2016
    Posts:
    513
    Yes, it is indeed an overkill, I did this sample more to demonstrate the screen color node reference usage. I'll create a better example for it and take your suggestion for the current refraction graph.
    And yes, 100% agree on adding the var name on the node!
     
  24. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,422
    This is actually could be useful for refraction depth testing
    Super, that would be great.

    Alright feedback and request time, maybe some of this already requested in the thread.
    1. Expand and collapse node, maybe by double clicking a node
    This would be great addition to simplify the graph viewport and make it cleaner while working
    upload_2016-10-1_0-55-37.png

    2. Shortcut node
    Also to simplify the graph viewport from cluttered or crowded node connection

    3.Dynamic Code Node
    A node where we can add a code as input, now the dynamic part is the input slot.
    for example if we have use this kind of code input
    Code (csharp):
    1.  
    2. float4 inputcode(float4 x)
    3. {
    4. return x;
    5. }
    6.  
    The node will have one input on the left side.
    if we use this kind of code input
    Code (csharp):
    1.  
    2. float4 inputcode(float x,float2 y)
    3. {
    4. return float4(y.x,y.x,x,0);
    5. }
    6.  
    The node will have two input on the left side
    etc

    4. Grouping nodes
    When selecting nodes with rectangle select and right click on it, we have an option to grouping the nodes with some kind of colored rectangle around the group, in the group property we can add label (will be visible in the graph viewport), also notes in the property bar.

    5. Notes Rectangle
    Basically just an ability to draw a rectangle in the viewport where we can display a notes
    upload_2016-10-1_1-15-16.png

    That's all i have at the moment :)
     
  25. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,422
    on second thought maybe 4 and 5 can be merged. so just basically create a rectangle with label and notes (with a toggle to display the notes in the viewport),and to choose the rectangle color :D
     
  26. benderete

    benderete

    Joined:
    Aug 31, 2014
    Posts:
    129
    Hi, just started to play with it and i have a silly question.
    Starting with easy things i had tried to do a simple shader with transition between two textures and with scroll animation of uv offset.
    Well i don't see how to pass the x and y offset values. Only a common value for both.

     
    Last edited: Oct 1, 2016
  27. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,422
    @Amplify_RnD_Rick My properties order index keep getting reset every time i'm reopening shader in shader graph
     
  28. kebrus

    kebrus

    Joined:
    Oct 10, 2011
    Posts:
    414
    Hey there

    Just as promised, here it is:

    chromatic refraction.PNG

    For future reference I wanted it to be simple but I also wanted to be visually correct but not totally physically accurate or else I would never finish this. I actually spent a few hours trying to get a realistic look out of it so I did a few renders in blender cycles using their refraction shader as true references and went back and forth until I was happy with it.

    I tried with a bunch of different fresnel factors and the visual differences weren't enough in my opinion to justify the increase in complexity so I ended up with the most basic one. The only notable part of some of the alternatives was having a bias term that lets you increase the image total offset that you can use like magnifying glass at very close ranges. I ended scraping it but you can easily add a value at the end of the fresnel node tree. (small values work better)

    Anyway, play with it, ideas are welcome. It only has two sliders, one to control the refraction and another to control the chromatic aberration. I have to say I really like the effect :p

    Some other things I notice with the editor after using it for some hours:
    there's definitely some duplication bug somewhere, I can't pinpoint where exactly or how but in rare occasions after duplicating a node using ctrl+D and linking it the shader doesn't compile anymore, only happen twice so far and both times was a operator node. Sorry if that doesn't help enough :\

    There's a new bug somewhere with the texture interpolators. The best repo case is the snowAccum sample. It doesn't compile because it complains of using too many of them. Checking the code I can see it has one for each texture sample but also one for worldNormals which doesn't seem to be used anywhere? Internal maybe? I dunno but it wasn't happening before, got it compiling by removing a texture. Also the new fresnel node generates far too much code and the reason I say this is because I was hitting the interpolators cap with it, the fresnel code alone generates two of them while doing one by hand I can just reuse the internal ones for the view direction and the normals and those two extra interpolators, in fact I'm not even sure why do we need to calculate those when those vectors already exist.

    I upgraded to the latest 5.5 beta and my background is now light grey, I can't understand why, not sure if it's a unity bug, If i change to gamma instead of linear it shows up okay though. No option in the texture asset seems to fix it.
     

    Attached Files:

    Crossway, benderete and MS80 like this.
  29. kebrus

    kebrus

    Joined:
    Oct 10, 2011
    Posts:
    414
    When you use it like that the editor will generate the appropriate connections, in your case it will transform a float into a float2. If you want to specify a different x and y you can use the "append" node and choose the "vector2" from the node property.
     
  30. benderete

    benderete

    Joined:
    Aug 31, 2014
    Posts:
    129
    Hi, Thanks for the reply. Yes, the append node is that i need.
     
  31. benderete

    benderete

    Joined:
    Aug 31, 2014
    Posts:
    129
    Hi, again. Using append node it works ok, but the user input for tiling are ignored.
    There is any method to use the user tiling in material window and execute the animated offset or i must to include custom parameters for tiling. In this case, is possible hide the standard inputs for tiling and offset of a texture?

    Also, i had seen than vector 2, vector 3 and vector 4 like properties are all showns like vector 4 (x, y, z, w).

    Finally when you reopen and shader in canvas save it, all the order index values are reseted to -1.
     
  32. kebrus

    kebrus

    Joined:
    Oct 10, 2011
    Posts:
    414
    1. You need to include those custom properties as well, this is because you are overriding the uvs in the sampler, what I would like tho is that they would give you access to the default ones so that I could just reuse the values in the inspector instead of creating new ones. As far as I know thats not still possible, but they are open to suggestions so most likely they we'll read this and think about it.

    2. True, thats just how the unity editor for materials work, they are missing those and just fallback to vector 4, I believe this is mainly because you can only send either a float or a vector4 by script into materials? I could be wrong, I don't know if it's even possible to have those kind of properties but if it is it should be straightforward to create custom inspectors for those. (which is just another reason I believe it's not possible)

    3. I believe that's a bug, can't find it right now but I think it was reported already. They usually are fast fixing these simple bugs so you can probably expect it fixed soon.
     
  33. benderete

    benderete

    Joined:
    Aug 31, 2014
    Posts:
    129
    Hi kebrus,

    Thanks for your answer again ;)
     
  34. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,422
    yep i'm also getting order index reseted to -1 everytime reopening the shader graph.
    Personally i think the UVTexture node at the moment are kinda odd, i think it shouldn't have Tilling and Offset input slot those two value should be derived from the tilling and offset value in material editor.
    Uv modification should be happened in between Texcoord node and sampler node. Also i think this is how Texcoord node behaviour in other shader/material nodes editor UE/ShaderFX/Hypershade.
     
  35. benderete

    benderete

    Joined:
    Aug 31, 2014
    Posts:
    129
    On Unity 5.5b4 the snow accum shader example raises the error

    Shader error in 'ASESampleShaders/SnowAccum': Too many texture interpolators would be used for ForwardBase pass (11 out of max 10) at line 22

    Removing some connection to the main node (for example Occlusion or Metallic) clear the error.

    Well, i know that is an error in a beta of Unity but i tell you advise for possible future problems ;)
     
  36. kebrus

    kebrus

    Joined:
    Oct 10, 2011
    Posts:
    414
    I'm not sure if I follow. The texture sampler node only has one input not two and that is correct, many shaders play with this input, we should assume that tilling and offset is the only thing we want to do with it. Am I missing your point?
     
  37. benderete

    benderete

    Joined:
    Aug 31, 2014
    Posts:
    129
    I think that texture coordinates node could have the option of recover tiling and offset values from editor. Or other new node to receive such vales
     
  38. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    5,263
    Willl this have an option to bake shader to texture? That's the one thing anyone don't know they want until they have them.
    Also if it can create set up for post effect, so that we create a shader and it generate the script to attach to the camera directly. Those are massive differentiator from concurrence. Bonus point if we can use the node graph to swizzle texture channels (I mean shift, merge, replace channel from one texture to another one, basically it's automatic if we have shader baking).
     
  39. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,422
    I mean like this no input slot in the left side of the nodes
    upload_2016-10-3_13-24-42.png
    tilling and offset base value are using material editor values

    Btw, how to do vertex color blending in ASE? it seems i cannot sampling vertex color outside vertex shader
    Edit : found the node, nevermind :)
     
    Last edited: Oct 3, 2016
  40. Zieba_1

    Zieba_1

    Joined:
    Nov 1, 2013
    Posts:
    1
    Hi,
    it will be great to have some generated textures like gradient ramp or noise.
    example: https://i1.creativecow.net/u/179676/material1.jpg
    and more tutorial/manual info for non-programing users.

    Do You have any schedule for new beta releases?

    Although You are making amazing job!

    ps. Enyone have some advices for making 2-color gradient shader along local object Y axis?
     
  41. benderete

    benderete

    Joined:
    Aug 31, 2014
    Posts:
    129
    About post effects, now if you right click on project window and create --> Shader there are the two options "Amplify Surface Shader" and "Amplify Post-Process Shader", but de Post-process Shader option is disbled. Maybe that is something on their roadmap but not implemented yet.
     
    neoshaman likes this.
  42. Amplify_RnD_Rick

    Amplify_RnD_Rick

    Joined:
    Feb 15, 2016
    Posts:
    513
    Hey guys,
    First of all awesome feedback and suggestions all around! Thanks for them!

    This is something we internally already discussed to do.

    Can you elaborate a bit on how this works? Is this to create like a connection between two distante nodes on the graph without having a wire?

    Yes, this node will definitely be created. Already on the roadmap.

    We already have a Commentary Box. Just hit 'C' when having multiple nodes selected and hit will create a box surrounding the nodes. This can be more customized and, like you suggested, maybe tweak its color and be multiline.

    Will take a look at what's happening and provide a fixed build as soon as possible.


    The shader looks fantastic! Awesome work indeed!


    I'll try to replicate the issue and fix it as soon as I know what's wrong.

    That's quite odd. Yes, I will have to check this issue out.
    I'll also will simplify the Fresnel node to use the pre-calculated data.


    GUI.DrawTextureWithTexCoords() which is used to draw the background had a regression fix because of this issue. We had to turn off Bypass sRGB Sampling for it to be correctly drawn.
    Now we will maybe have to turn it back on again. Will open the beta and see how it behaves.

    For now, you must include your custom parameters for tiling.
    Regarding your suggestion, we will register it and discuss internally if it can be done. Nevertheless, it's a nice suggestion.

    This is exactly what kebrus as commented. Materials only support vector4. We give the user the possibility of having Vector2 and Vector3 properties but they will always be Vector4 internally.


    Your not the first person reporting this issue on this build. Rest assured that you'll have a new build today with this fixed.

    Kebrus also reported this issue. Will take a look at what might be happening and fix it.

    It is not possible for the shader to access the material tiling and offset values as far as I know. But I will take a closer look into.

    Yes, we already have this planned on a later beta stage.

    Yes we will release more tutorials soon.

    We still have some internal development to be done in order to wrap up Beta 1 but is almost over. Expect Beta 2 soon.

    Exactly, the option is disabled because it is not implemented yet.


    Hopefully I haven't missed any question from you all. But if I did please hit me up and I'll answer it soon.

    I will release a new build later today with as many bug fixes as possible.

    Thanks again everyone for the amazing feedback and suggestions!
     
    neoshaman and kebrus like this.
  43. RoyArtorius

    RoyArtorius

    Joined:
    Jul 11, 2013
    Posts:
    70
    I do have one more suggestion. For the multiply and add nodes, it would be nice if they could take in multiple inputs rather than just 2. Like if the two inputs were filled a new input would appear.
     
    kebrus likes this.
  44. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,422
    Man i like this tool :D
    and they say it can't be done refraction and shadow :D

    upload_2016-10-3_18-49-47.png

    Great to hear that will wait for the new update
    yep i'm also hitting interpolator limit when using fresnel node, would be great if this can be simplified

    Yes basically something like that

    Oh okay this is something new, didn't even knew if this exist thanks :)

    @Amplify_RnD_Rick is instance node only work for basic uv sampler? because if i creating an instance node for bump sampler it gave me this error
    Code (csharp):
    1.  
    2. ambiguous overloaded function reference "tex2D(sampler2D, float4)
    3.  
    upload_2016-10-3_19-19-37.png
     
    Last edited: Oct 3, 2016
  45. benderete

    benderete

    Joined:
    Aug 31, 2014
    Posts:
    129
    Suggestion: Remap Node
    A node to remap a value from a min-max range to another min-max range.

    Question about Lerp Node :
    I understand than in Lerp Node you could attach values from other nodes or write them in properties (A and B values). Well, writing the values in properties no works (or not ever). Maybe my understand of Lerp Node is wrong and only must work with values from nodes attached.
     
    RoyArtorius likes this.
  46. benderete

    benderete

    Joined:
    Aug 31, 2014
    Posts:
    129
    Well, Through trial and error i have wrote a custom remap node (watching code from other nodes and after several fails) ;)
    Sure that is full of wrong things but it seems works. Feel free of try, use and optimize it.

    The node will be available on Operators like TFHC - Remap

    Code (CSharp):
    1.  
    2. // Amplify Shader Editor - Visual Shader Editing Tool
    3. // Copyright (c) Amplify Creations, Lda <info@amplify.pt>
    4. //
    5. // Custom Node Remap by The Four Headed Cat - @fourheadedcat
    6.  
    7. using UnityEngine;
    8. using System;
    9.  
    10. namespace AmplifyShaderEditor
    11. {
    12.     [Serializable]
    13.     [NodeAttributes( "TFHC - Remap", "Operators", "Remap value from old min - max range to new min - max range", null, KeyCode.None )]
    14.     public sealed class TFHCRemap : DynamicTypeNode
    15.     {
    16.  
    17.         protected override void CommonInit( int uniqueId )
    18.         {
    19.             base.CommonInit( uniqueId );
    20.             m_inputPorts[ 0 ].Name = "Value";
    21.             m_inputPorts[ 1 ].Name = "Min Old";
    22.             AddInputPort( WirePortDataType.FLOAT, false, "Max Old" );
    23.             AddInputPort( WirePortDataType.FLOAT, false, "Min New" );
    24.             AddInputPort( WirePortDataType.FLOAT, false, "Max New" );
    25.             m_textLabelWidth = 100;
    26.             m_useInternalPortData = true;
    27.         }
    28.  
    29.         public override void OnInputPortConnected( int portId, int otherNodeId, int otherPortId, bool activateNode = true )
    30.         {
    31.             base.OnInputPortConnected( portId, otherNodeId, otherPortId, activateNode );
    32.             m_inputPorts[ 0 ].MatchPortToConnection();
    33.             m_inputPorts[ 1 ].MatchPortToConnection();
    34.             m_inputPorts[ 2 ].MatchPortToConnection();
    35.             m_inputPorts[ 3 ].MatchPortToConnection();
    36.             m_inputPorts[ 4 ].MatchPortToConnection();
    37.             m_outputPorts[ 0 ].ChangeType( InputPorts[ 0 ].DataType, false );
    38.         }
    39.  
    40.         public override string GenerateShaderForOutput( int outputId, WirePortDataType inputPortType, ref MasterNodeDataCollector dataCollector, bool ignoreLocalvar )
    41.         {
    42.        
    43.             string a = m_inputPorts[ 0 ].GenerateShaderForOutput( ref dataCollector, inputPortType, ignoreLocalvar );
    44.             string b = m_inputPorts[ 1 ].GenerateShaderForOutput( ref dataCollector, inputPortType, ignoreLocalvar );
    45.             string c = m_inputPorts[ 2 ].GenerateShaderForOutput( ref dataCollector, inputPortType, ignoreLocalvar );
    46.             string d = m_inputPorts[ 3 ].GenerateShaderForOutput( ref dataCollector, inputPortType, ignoreLocalvar );
    47.             string e = m_inputPorts[ 4 ].GenerateShaderForOutput( ref dataCollector, inputPortType, ignoreLocalvar );
    48.             string strout =  "(" + d + " + (" + a + " - " + b +  ") * (" + e + " - " + d + ") / (" + c + " - " + b + "))";
    49.             //Debug.Log (strout);
    50.             return strout;
    51.  
    52.         }
    53.  
    54.     }
    55. }
    56.  
     
    Last edited: Oct 3, 2016
    DINKmod likes this.
  47. Amplify_RnD_Rick

    Amplify_RnD_Rick

    Joined:
    Feb 15, 2016
    Posts:
    513
    Yes, makes sense. It will save nodes count.

    This should have worked with any kind of texture sample. I'll look into this and provide a fix.

    This should work also with the ports internal values if no node is attached to them. Will take a look a see what is happening.


    :D Awesome! Rest assured that this will be on the next build. I would like to also credit you on the release notes!
     
    benderete likes this.
  48. benderete

    benderete

    Joined:
    Aug 31, 2014
    Posts:
    129
    I'll check it twice. Maybe my fault testing.

    Great! Surely needs fix and improvements ;)
    When the custom nodes creation docs? :D
     
  49. Project-Mysh

    Project-Mysh

    Joined:
    Nov 3, 2013
    Posts:
    223
    Quad tessellation support.
    Since unity 5 we have the option to pass quads to the shader (quad tess fix, from the obj import settings) and still there is no shader using it on the store.
     
    benderete likes this.
  50. rerwandi

    rerwandi

    Joined:
    Dec 8, 2014
    Posts:
    532
    what do you mean with » » BETA 1 only price! « « ?
    Is it a one-time purchase even after Amplify Shader Editor released or just for BETA 1 only ?
     
unityunity