Search Unity

  1. We're looking for feedback on Unity Starter Kits! Let us know what you’d like.
    Dismiss Notice
  2. Unity 2017.2 beta is now available for download.
    Dismiss Notice
  3. Unity 2017.1 is now released.
    Dismiss Notice
  4. Introducing the Unity Essentials Packs! Find out more.
    Dismiss Notice
  5. Check out all the fixes for 5.6 on the patch releases page.
    Dismiss Notice
  6. Help us improve the editor usability and artist workflows. Join our discussion to provide your feedback.
    Dismiss Notice

Amplify Shader Editor - Node-based Shader Creation Tool

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

  1. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    3,637
    I'm creating a setup that is similar to Paragon where I can use special ID maps to place tiling normal/AO maps. I could probably use the alpha channel of my splat map as an extra channel :)

    And black is unaffected
     
  2. brisingre

    brisingre

    Joined:
    Nov 8, 2009
    Posts:
    174
    Thanks for the answers!

    To clarify:

    Copying and pasting nodes keeps links between nodes being copied. It does not copy any links from nodes that weren't copied to the nodes that were.
    ASECopyBehavior.PNG

    When I talk about grouping material settings, I'm talking about the material inspector. I see an option to supply a custom inspector, but that seems like overkill just to make a couple collapsible groups of related settings.

    I'm also talking about the material inspector when I talk about no ambient light. I see the option in ASE to disable it for the whole shader, I'm wondering if there's any way to do it on a per-material basis.

    ASEMaterialEditor.PNG
     
    Pecek likes this.
  3. brisingre

    brisingre

    Joined:
    Nov 8, 2009
    Posts:
    174
    A couple bugs:

    -If you paste a frame, it will draw over nodes and you can't select those nodes. Fixes itself if you box select the frame and nodes. Merely annoying.
    -I had a crash related to undo, but I can't reproduce it. I broke a wire, hit ctrl-z and my console filled up with this error and I had to restart unity before I could interact with the ASE window in any way (couldn't even close it.)

    ASECrashBug.PNG

    A bunch of UX stuff you can take or leave -- your UX is quite good as-is:

    Multi-relinking is a really great feature for usability. Replacing one group of nodes with a different one is a pretty common thing to have to do, and it's time-consuming and error-prone if you're manually recreating a dozen links.

    Directly related: right now the way making new wires work is pretty inconsistent. There's a lot of stuff you can usually do that you can't under some specific circumstances. Most of the time you can drag from an output or input to a node of the other type to make a new wire, but not if you start on the input end and there's already something connected there. You can break wires from the end of the wire, but not from the start of the wire. There are four distinct things that can happen from a left click drag -- you can make a new wire, a new node, move the end of an existing wire, or break a wire. You get the most generally useful one, but it's a pretty complicated system.

    ASECurrentUX.PNG

    I have a proposal that I think is simpler, more consistent, and more complete in terms of being able to manipulate wires from both ends.

    - Left click drag always draws a new wire.
    - If you draw a new wire to the canvas, you get the new node pop-up.

    -Shift + Left click drag always moves the end of existing wires.
    - If you move the end of an existing wire to the canvas, it breaks that wire.

    -In both cases, if you try to make a connection to an input that already has a connection, it will replace that connection.
    -In both cases, if you try to make connections that just don't work, like output-output, nothing happens.

    ASEProposedUXChanges.PNG

    Other miscellaneous UX stuff:
    -I would love to be able to click on a wire to highlight it (and from there, move its endpoints by dragging them or break it by dragging an endpoint to the canvas, or by pressing DEL).
    -I can't box select nodes in comment frames. If I start the box selection on the frame it just selects the frame, if I start it off the frame I can select the frame and its contents, but then I have to de-select the frame every time.
    -It seems that Wire Nodes can only have 2 outputs and if you add a 3rd it disconnects one of the existing ones more-or-less at random. I imagine there's an underlying technical reason for this, but it limits their usefulness, and I just found out about it the hard way -- might be worth changing.
    -I'd like a hotkey to compile/apply/preview/whatever the shader. (Just does exactly what that little button in the top left does.) This might exist and I just don't know what it is.
     
    Last edited: May 4, 2017
    kebrus likes this.
  4. Shiyao

    Shiyao

    Joined:
    Nov 27, 2013
    Posts:
    13
    Thanks for efficient answer. I already use shader model 5, but I only can register 13 textures per shader. is that the max number?

    I want to store AO and height map into normal map channels. Is that a way to use red and green channel to get same result of general normal map? The image on the below is how I blend red and green channel to get blue channel of normal map. I got similar result, but still have some problem. UV seam will become obvious. Is that a way to solve this problem? Thanks. test unpack normal.png
     
  5. corjn

    corjn

    Joined:
    Feb 6, 2014
    Posts:
    24
    Hey, I am interested in your asset and I would like to have some infos about it:

    I am making a game for a french music group, we plan for a september release, but I need custom light for the project (toon/ramp shading to be precise about what I want), it seems it's impossible to do yet, do you have any idea when it will be supported by amplify shader ?

    Thanks in advance for help,

    Jonathan
     
    arnoob likes this.
  6. strich

    strich

    Joined:
    Aug 14, 2012
    Posts:
    199
    Really need much better support for global properties at the moment. I see that the Texture Object can be set to a global property, but I don't see how I can do anything with the Texture Object - How do I sample it? In the end I'm using the Texture Sampler and manually editing the shader code to comment out the property header. I have to do this every time I modify the shader of course.

    Please fix it soon. :)
     
  7. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    775
    Hi guys,

    We've just uploaded a new build into our website with some exciting features!
    Release Notes v0.7.2 dev 01:
    • New features:
      • Added Shader Functions
      • Added new 'Object Scale' node
    • Fixes:
      • Fixed multiple issues with Copy/Paste
      • Fixed issues with nodes on Vertex Function
        • 'Fresnel'
        • 'Posterize'
        • 'Heightmap Texture Blend'
        • 'Unpack Scale Normal'
      • Fixed issue with incorrect data read from 'Texture Coordinates' nodes on versions bellow 0.5.0 dev 003
      • Fixed issue on inverted Receive Shadows toggle
    • Improvements:
      • Can Copy/Paste between different Shaders and Shader Functions
      • Shader properties created by Refraction, Translucency, Mask Value and Tessellation now appear on the Output node Material Properties list and can be reordered
      • Preventing UndoParentNode to generate DefaultValue conflicts caused by other plugins
      • Removed warnings generated on some situations by the 'Screen Position' node
    • New Samples:
      • LowPolyWater by The Four Headed Cat
      • ForceShield by The Four Headed Cat
    Shader Functions is a major new feature on which you can create and re-use node networks over different shaders.
    Please take a look at our wiki page for a brief description and a quick tutorial on how to start using them.

    [​IMG]

    Our developer will also reply to all unanswered posts as soon as he can.

    Happy shader creations!
     
    petersx, Pecek, KRGraphics and 3 others like this.
  8. rea

    rea

    Joined:
    Oct 10, 2009
    Posts:
    1,859
    Oooh. . . now we're talking. . . .
    or shading.
     
    Amplify_Ricardo likes this.
  9. benderete

    benderete

    Joined:
    Aug 31, 2014
    Posts:
    114
    Shader Functions... yeah!
     
    Amplify_Ricardo likes this.
  10. brisingre

    brisingre

    Joined:
    Nov 8, 2009
    Posts:
    174
    Ooh shader functions!
     
    Amplify_Ricardo likes this.
  11. Mark_T

    Mark_T

    Joined:
    Apr 25, 2011
    Posts:
    269


    Nice and clean implementation! Very nice!
     
    Amplify_Ricardo likes this.
  12. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    3,637
    I can now make my shader effects within my shader such as turning a character into gold, or triggering damage effects
     
    Amplify_Ricardo likes this.
  13. Pecek

    Pecek

    Joined:
    May 27, 2013
    Posts:
    71
    I'm not sure what caused exactly the issue, but after I changed the value type of the input node and tried to save it I got a key not found exception and it can't even load the graph anymore(the window closes itself right away).

    Edit: also it seems like the input order can't be changed(in the function's graph it looks fine, however when I drag it into another shader's graph it shows the default order). Not sure about outputs, didn't tested that yet.

    Edit2: after further experimenting with functions I couldn't reproduce the issues above, I tried to do the same thing again but this time everything worked - hopefully the exception will point you guys in the right direction.

    I couldn't figure this one out, I hope someone can help me. I would like to modify the UVs of a texture array in a function, the problem is I have no idea how can I pass in the array from the shader - is this even possible? Also what about references, can we pass in a texture\texture array as reference from the main shader? If so how?
     
    Last edited: May 6, 2017
  14. zelmund

    zelmund

    Joined:
    Mar 2, 2012
    Posts:
    310
    HI
    Is Shader functions simplify visual adaptation of shader or its simplify end code too?
    If i compile shader, do i need to have shader function file after? example: i want to give shader to my friend and he dont have amplify.
     
  15. Pecek

    Pecek

    Joined:
    May 27, 2013
    Posts:
    71
    @zelmund After you compile the shader there is no need for ASE in any way, shader functions are just shorthands in the editor.

    Edit: I had some fun with this, in case you are interested(fprobably could use some work but for a quick and dirty wind it could be useful)
     

    Attached Files:

    Last edited: May 6, 2017
  16. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    3,637
    @Amplify_Ricardo @Amplify_RnD_Rick So with the new shader functions, is it possible to do stuff like turn the player into gold or do a forcefield effects? I think it is possible now.
     
  17. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    3,637
    This would be AWESOME for a field of grass or foliage... thinking about doing a foliage shader.
     
  18. brisingre

    brisingre

    Joined:
    Nov 8, 2009
    Posts:
    174

    I don't think anything is possible now that wasn't possible without shader functions. They're just an organizational shortcut for groups of nodes you'll need to repeat several times for whatever reason. You could get the same effect, albeit with more labor, a more complex graph, and more possibility of making an error, by copying the nodes in question.

    That said, both those things seem like things that were possible before.
     
  19. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    3,637
    Because I will have to do these effects in code too and I want to make sure it works... and it looks cool too.
     
  20. kkqqpp

    kkqqpp

    Joined:
    Aug 13, 2014
    Posts:
    3
    Hello developers,

    I hope you can add two features like Unreal Material Editor's Stats Panel and Code Panel.
    Stats Panel shows the performance of the shader, for example, how many things doing inside the final codes.
    Code Panel shows the actual final codes so we don't need to back and forth open the code in a code editor.

    Kenneth

    Edit 1: The Code Panel is non-editable. It is very useful for some experience users. We can preview the actual code immediately.
    Edit 2: Unreal analyze the shader performance by the number of instructions.
     
    Last edited: May 8, 2017
    Pecek likes this.
  21. rea

    rea

    Joined:
    Oct 10, 2009
    Posts:
    1,859
    Stats Panel would be a great addition, or maybe it can be added into the Master Node Properties.
    Not sure about the Code Panel tho, seems to complex to be added (hey, i might be wrong)
    @Amplify_RnD_Rick
     
  22. Pecek

    Pecek

    Joined:
    May 27, 2013
    Posts:
    71
    @Amplify_Ricardo Any chance we will get an option to change\overwrite the tangents? Since terrains don't have tangents I have to copy and paste a few lines into the vertex program every time to get an approximation. Or if this is too much of a hassle(and from the top of my head I don't really see another usecase for it) a simple checkbox would be sufficient as well(like the one for tessellation\stencil buffers\etc), it would simply paste the code below. Or better yet a code node(like the one in Shader Forge). If by chance this is already possible in some way please let me know.

    Btw this is the code for the approximation in case anyone else working on a terrain shader, just paste it anywhere into the vertexDataFunc
    Code (CSharp):
    1. void vertexDataFunc(inout appdata_full v, out Input o) {
    2.     float3 T1 = float3(1, 0, 1);
    3.     float3 Bi = cross(T1, v.normal);
    4.     float3 newTangent = cross(v.normal, Bi);
    5.     normalize(newTangent);
    6.     v.tangent.xyz = newTangent.xyz;
    7.     if (dot(cross(v.normal,newTangent),Bi) < 0)
    8.         v.tangent.w = -1.0f;
    9.     else
    10.         v.tangent.w = 1.0f;
    11. }
     
  23. rea

    rea

    Joined:
    Oct 10, 2009
    Posts:
    1,859
    Code Node are available in ASE already it called Custom Node if i'm not mistaken
     
  24. Pecek

    Pecek

    Joined:
    May 27, 2013
    Posts:
    71
    @rea
    Sadly that's not going to work because currently there is no way to assign new values for tangents from the editor(if there is, please let me know), it works if I plug a custom expression like v.tangent = float4(0,0,0,0) into the vertex normal\offset output, however obviously it will also modify the vertex normal\offset, so in the end this method requires manual editing as well. This node is great for a lot of things, but I have a more general code node in mind.

    Also there is a bug with custom expressions and the append node, this setup will generate wrong code(In0 always is declared in the very beginning, way before the appendResult, In0 is trying to reference appendResult before it's created)
     

    Attached Files:

  25. Amplify_RnD_Rick

    Amplify_RnD_Rick

    Joined:
    Feb 15, 2016
    Posts:
    230
    Oh That's pretty cool. I really need to take a look at what the unreal guys are doing in paragon so I can better know on how they are doing that and give you a proper answer.

    Ah I see. Apologies for the confusion.
    Yes this might come in handy. Though we need to also keep the original copy/paste.
    This may need to be associated to a different keyboard combination.

    Concerning grouping properties, this can only be achieved via a custom inspector. From the shader side the most we can do is give access to material property drawers and these are associated to a single property and cannot be used to achieve what you are requesting.

    Our option to disable ambient light is the noambient code generation option and it associated with the shader itself, so unfortunately we cannot activate/deactivate it through the material.


    Concerning the bugs you've reported we'll try to reproduce on our end and fix them as soon as possible. Thank you so much for reporting them.

    Oh my, these are super awesome. Thank you for such detailed and cool suggestions on how to improve ASE user experience! We really appreciate it!
    We will definitely take them into account!

    With Shader Model 5.0 the max Sampler amount is 16. The problem is, since we are using surface shaders, Unity internally uses some of them and the amount available to us is a bit lower.
    The amount used by Unity depends on your current setup p.e. if you are using lightmaps or not,etc.


    By looking at your graph we're a bit confused on those Remap nodes since we think you should be remapping values to a [-1,1] range.
    Also, your Z reconstruction seems to be incorrect. You should be using Saturate on the Dot result and a Sqrt on the One Minus result. Also that Remap node in the end should be removed and the Sqrt result should be connected to the Append [2] input port.

    Yes, unfortunately we still don't support custom lighting into our shaders. We won't be able to tackle this at least on the next month or so.
    Apologies for the inconvenience.

    You are absolutely right. We'll add support to sampler global variables soon.


    Thank you so much for reporting this. We'll be doing some tests on shader functions in order to try and reproduce this issue you experienced.
    If this happen again could you take a screenshot of your console with the error selected in order for us to see it's callstack?

    About the Tangent request,
    Unfortunately there's is currently no way to write on vertex tangents. We'll take a look at your request and see what is the best way to expose them.
    Our Custom Expression nodes for now cannot be used to achieve that since you can only write operations over its inputs, you cannot assign results into other variables.
    But we can extend them to be able to achieve that. It will be greatly useful.

    Yes, we want to implement some sort of stats panel to indicate p.e. instruction count.
    Code panel seems a bit tricky but we'll add it to our suggestions list and analyse it when we have some time.


    Concerning shader functions, they don't have offer any features other than better organizing your main graph and sharing graph snippets. What you can do inside a shader function is the same on what you can do on the main shader graph.
    It's source code is also generated using the same tools as the main graph.
    Editor performance wise, it is good to use and abuse on shader functions since you'll be working on smaller subsets of graphs, thus it will be faster.
    They are still a bit rough around the edges but they will be greatly improved thanks to your suggestions and bug reports.
     
    Last edited: May 8, 2017
  26. brisingre

    brisingre

    Joined:
    Nov 8, 2009
    Posts:
    174
    Great to hear that my feedback is appreciated. I'm really enjoying working with ASE.

    Couple new things:

    -My Vertex Texcoord nodes keep switching from 3d back to 2d for some reason.
    -I clicked the top left preview button on a shader function and it closed ASE. I can still use ASE but it will always close when I try to open that function. The function works fine if I use it in another graph, but I can't edit it. This happens when I try to open it.
    ASECrashBug2.PNG


    -Is Deferred Translucency totally impossible, or just not currently supported?
     
    Last edited: May 9, 2017
  27. Amplify_RnD_Rick

    Amplify_RnD_Rick

    Joined:
    Feb 15, 2016
    Posts:
    230
    Is it possible for you to share both your shader as your shader function with us ( via support@amplify.pt ) so we can replicate the issue on our end and fix it?
     
  28. AkiLap

    AkiLap

    Joined:
    Sep 14, 2014
    Posts:
    17
    Is it possible to achieve sort of shield effect similar to fps games only using shader?

    Here are couple of references of what I am looking for:
    https://cdn1.epicgames.com/ue/item/...-896x488-e67fde525a30b34fd433f67856b27027.png
    http://media.moddb.com/images/mods/1/1/753/logo.jpg


    In my current project I have done this kind of effect by adding extra model around current one,
    and applying material to it. But I want to avoid this as many extra models and their rigging is quite a work.

    I remember I have seen somewhere it could be possible to somehow offset material so it "wraps" around base model, and needing just one model and material.


    As you can see from images, the shield/powerup material floats around main model, offseted a bit. They may have done this with extra model, but if same effect can be done just in shader, great!
     
  29. WarrenMarshall

    WarrenMarshall

    Joined:
    Jun 7, 2015
    Posts:
    44
    Shader functions, oh shiiiii ... Awesome addition, thank you!
     
    KRGraphics likes this.
  30. Amplify_RnD_Rick

    Amplify_RnD_Rick

    Joined:
    Feb 15, 2016
    Posts:
    230
    Apologies, I missed this question, Translucency is a forward only feature.

    We've just uploaded a new build into our website mostly with bug fixes.

    Release Notes v0.7.2 dev 03:
    • Fixes:
      • Fixed issue with 'Vertex TexCoord' not writing properties correctly into shader meta
      • Fixed cast and port activation issues on Blend Nodes
      • Fixed various issues with SF:
        • Saving no longer deselects
        • Reordering is now working properly
        • Autocast now has port restrictions into account and deletes with warning when possible
        • Sampler types no longer duplicate
     
    petersx and arnoob like this.
  31. brisingre

    brisingre

    Joined:
    Nov 8, 2009
    Posts:
    174
    Sure thing. Sent.

    Oh well. I'll figure something out. Makes sense that it'd be forward-only, custom lighting stuff basically always is.
     
  32. brisingre

    brisingre

    Joined:
    Nov 8, 2009
    Posts:
    174
    All sorts of weird things seem to happen when I nest shader functions. If I make a simple function (say, divide an input by 10) and another simple function that just calls the first function and returns its output, the output of the second function is different from the first.

    Also sometimes this:
    ASECrashBug4.PNG

    (Is this thread the best place to report bugs, or do you have a system for that?)
     
  33. Teh_Lemon

    Teh_Lemon

    Joined:
    May 12, 2015
    Posts:
    10
    Hello
    I wanted to extend the example RefractedShadows shader. However switching this shader to the Standard or Standard Specular light model produces this error. Is this normal behaviour?

    Code (CSharp):
    1. Shader error in 'ASESampleShaders/RefractedShadows': Fragment program 'frag_surf': sampler 'samplerunity_Lightmap' has no matching texture and will be undefined.
    2. (on d3d11)
    3. Compiling Fragment program with DIRECTIONAL LIGHTMAP_ON DIRLIGHTMAP_COMBINED DYNAMICLIGHTMAP_ON SHADOWS_SHADOWMASK
    4. Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP
    I'm using Unity 5.6.
    Thanks
     
  34. zelmund

    zelmund

    Joined:
    Mar 2, 2012
    Posts:
    310
    someone help me please, im stuck. cant do triplanar shader ((
    have a node "triplanar sampler", but i cant make it work with paralax, so i need to do old style triplanar shader.
    sample i have in amplify is providing this triplanar effect but textures blend in that shader not like in triplanar sampler. i have something like overlayed terxtures, but i dont want to see part of axis Y in axis Z (etc.) textures. i tried lerp them, blend, multiply... nothings work.
    ealier i solved that problem in shader forge by "chanel blend" node ( https://s-media-cache-ak0.pinimg.com/originals/90/7c/c7/907cc7ea8b6d5e52a32f7cb576453e4f.jpg ) and it works perfectly. but here i cant find such node.
    please, if anyone can tell me analogue of this node. :(
     
  35. kebrus

    kebrus

    Joined:
    Oct 10, 2011
    Posts:
    411
    There's a new build in the website that solves a bunch of shader functions problems, try that one and see if the problem persists.

    I can't seem to reproduce the problem, I tried picked the sample and switching the mode to the standard one in both unity 5.4 and 5.6 and everything seems to be fine, share us your sample.
    Keep in mind that the triplanar node does not generate uvs, it actually generates the colors based on the uvs it produces, it's just a way to simplify the process. If you want to create parallax with triplanar individuals nodes is the way to go, what are the issues you are having? share what you have so far.
     
  36. brisingre

    brisingre

    Joined:
    Nov 8, 2009
    Posts:
    174
    All fixed! Thanks.
     
  37. x4000

    x4000

    Joined:
    Mar 17, 2010
    Posts:
    117
    Is there any function that lets us do conversions to hsv format, and then back to rgb format? Right now there doesn't seem to be, and that's something that was hugely useful in shader forge. Making sure that it wraps properly when the value goes out of the 0-1 range, rather than clamping to that range, is also really helpful since that makes modifiers a lot more photoshop-like.

    Any thoughts on those as nodes?
     
  38. x4000

    x4000

    Joined:
    Mar 17, 2010
    Posts:
    117
    Oh -- one other question. In the latest builds, it seems like the ability to create the Shader Functions is gone? It's not in any of the menus. I'm on unity 5.6.0p2. I'm relatively new to Amplify Shader Editor, but am an old hand at Shader Forge.
     
  39. Teh_Lemon

    Teh_Lemon

    Joined:
    May 12, 2015
    Posts:
    10
    I've been unable to reproduce it in an empty project too. The shader file itself seems to be fine if I copy it over.
    Error seems to come and go. If the error comes up, sometimes it'll look fine in-game, other times it changes it to the pink error shader.
    The same error occurred on the SimpleRefraction shader too, even though that one has always used the Standard lighting model. Everything else I've made/modified with ASE hasn't shown the "symptom" yet...
    For now, I'm slowly importing in any visual assets into the empty project to see if any of them are triggering it.
     
  40. brisingre

    brisingre

    Joined:
    Nov 8, 2009
    Posts:
    174
    Tonight in ASE bug reports: I only have one, but it's a pretty big one. In fact, you've probably got it already, but I'll mention it just in case.

    Transparent shaders don't work at all in the current alpha. If you set render type to transparent on new shader you get an error.
     
  41. Amplify_RnD_Rick

    Amplify_RnD_Rick

    Joined:
    Feb 15, 2016
    Posts:
    230
    We currently don't have these color conversion nodes but they are really useful indeed.
    We'll try to implement them on a near future.

    For you to create a Shader Function right mouse click on your project and select Create > Shader > Amplify Shader Function.
    Please check our wiki for a brief example on how to use them.

    I'm not being able to replicate this issue on our current version. Are those errors from the shader or from the editor itself?
    Can you send us a screenshot ( or the shader ) so we can be able to replicate this on our end and provide a fix?
     
  42. zelmund

    zelmund

    Joined:
    Mar 2, 2012
    Posts:
    310
    thx for advice, but its not a problem to use colors as uv. problem is to blend them.
    for now i cant share it, its looks like a dirty mess. + my bosses dont like when i sharing something with community. (((
     
  43. zelmund

    zelmund

    Joined:
    Mar 2, 2012
    Posts:
    310
    another question.
    how to use "World tangent " node? is there any simple shader that can be used with normal maping?
     
  44. x4000

    x4000

    Joined:
    Mar 17, 2010
    Posts:
    117
    I appreciate it. I know how to write the code to get it into those color spaces, though, if need be on my own. Basically using a custom code node I'd expect to take in float3 (for rgb), then put out a different float3 (for hsv), and that happens per pixel. Then I do things to the result for a bit, and later I put another custom node to put it from float3 for hsv back to float3 for rgb.

    The main problem I have there is that the custom code section is really not seeming to have much documentation, and it's also only showing up as a single inputfield line rather than a text area type box, so there's neither instructions on how to use them nor really the space to do it.

    I imagine that what I want to do is pretty straightforward in terms of custom code, so perhaps it would make a good example for the wiki? Right now I didn't see any custom code examples.

    The code for this (one version of such) is right here, if you'd like a plug and play version: https://forum.unity3d.com/threads/hue-saturation-brightness-contrast-shader.260649/

    Unfortunately this isn't the case, for whatever reason. I've made no modifications to Amplify Shader Editor, and it's using 0.70_dev03. I am on windows 10, 64bit editor, pro version, 5.6.0p2. 1070 graphics card, not that that probably matters.

    On the wiki it shows the two things that I'd want as being under the shaders section, as you say. On my machine I see

    Create > Shader > Amplify Surface Shader
    and
    Create > Shader > Amplify Post-Process Shader (grayed out)
     
  45. Amplify_RnD_Rick

    Amplify_RnD_Rick

    Joined:
    Feb 15, 2016
    Posts:
    230
    This node outputs the tangent vector in world space and you just simply connect its output to what you need.
    Is it possible for you to give us a bit more context on what situation you need to use the 'World Tangent' node so we could further clarify your question?

    We'll add these nodes anyway since we feel they will be useful to many others.
    Concerning Custom Expression nodes, the fact you mentioned it made us look at them again and realize they are very limited as they expect only expressions on top of its inputs.
    We will greatly improve them and provide a revised version on our next build along with better documentation.

    This is incredibly strange. The way we show the Amplify Shader Function option is the same used on the Amplify Surface Shader option.
    Have you tried re-importing ASE on your project or importing it into a new one and see if it becomes visible?


    In other news, we've just uploaded a new build into our website with yet more fixes on Shader Functions.
    Here are the release notes.

    Release Notes v0.7.2 dev 05:
    • Improvements
      • Changed tool tip display to trigger when mouse is on top of the node ( now displays below the node)
      • Shader Functions
        • Added default values for input node in SF (these are used when there's no connection)
        • Added port restrictions to dynamic node types
        • Changed way input node work with restrictions when changing type to prevent invalid connections
    • Fixes:
      • Fixed minor typo on 'Rotator' node
      • Fixed multiple issues on save behavior when changing modes
      • Fixed issue with shader functions not assigning the main node correctly
      • Fixed issue on Project Window Change callback
      • Fixed graph count increasing on shader switch
      • Fixed version numbering in function nodes
      • Fixed nested SF issue with inputs
     
  46. Pecek

    Pecek

    Joined:
    May 27, 2013
    Posts:
    71
    A custom code node combined with shader functions might lead to a massive amount of user generated stuff, I would love to see this as well.
     
  47. x4000

    x4000

    Joined:
    Mar 17, 2010
    Posts:
    117
    Got it -- thanks! Really looking forward to both things, but in particular the HSV functions.

    I had not tried a re-import, no. I went ahead and just upgraded to the latest version via your website link there, and now it shows up perfectly! Not sure if that was an import issue on my end previously for some reason, or if this was something fixed since the build on the asset store, or what.

    Either way, I'm personally all set now with that, and anybody else with the problem is advised to just get the latest version from the website. Thanks!
     
    Amplify_RnD_Rick likes this.
  48. brisingre

    brisingre

    Joined:
    Nov 8, 2009
    Posts:
    174
    I would get sooo much out of custom expressions nodes if they were a little better. I just found out about those last night and they're a great idea.

    HSV functions are also a great idea.

    The transparency thing was my fault. I wasn't setting blend mode to transparent, I was setting render type of an opaque shader to transparent, which is a more complicated thing and I'm not surprised it didn't work. Transparency's working now. I've attached the error if you're interested, I think it might have to do with not defining blend modes? (The shader's just a default empty graph with "render type" set to transparent and no other changes.)

    upload_2017-5-12_10-44-13.png
     
    Amplify_RnD_Rick likes this.
  49. Pecek

    Pecek

    Joined:
    May 27, 2013
    Posts:
    71
    This question isn't exactly ASE related, but how can you use the stencil buffer in deferred rendering? I thought it will work like transcluency, drawn in forward and that's it, but the objects in the demo scene's cube are either always show up or not at all(if I set it to forward\deferred only).
     
  50. renardmf

    renardmf

    Joined:
    Jun 29, 2012
    Posts:
    34
    Hello,

    I am currently getting this error when enabling tessellation in 0.7.2 dev 05:

    "Shader error in 'Standard_Mask': 'vertexDataFunc': output parameter 'v' not completely initialized at line 77 (on d3d11)"

    Thanks!