Search Unity

  1. 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. daibutsu

    daibutsu

    Joined:
    Nov 28, 2017
    Posts:
    23
    I'm curious are there any tutorials or information about optimizing shader to mobile? I didn't find any in amplify
     
  2. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    1,864
    Hey there!

    Not on our end, this is a broad topic beyond the scope of our editor so we definitely recommend using whichever shader development references you can access. Performance will ultimately depend on the complexity of the operations executed but the editor does provide a precision parameter which you can lower on mobile devices.

    upload_2020-5-27_16-26-50.png

    Are you looking for any specific optimization information?
     
  3. daibutsu

    daibutsu

    Joined:
    Nov 28, 2017
    Posts:
    23
    Not yet actually. we have shader and vfxes on the game made by hand, but they're so slow on the mobile device, that's whay i want to recreate them on Amplify. And yeah, i know that it's complex topic, but wanted to be sure that i can o[timize inside ampllify newly created shaders.
     
  4. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    1,864
    Thanks for elaborating!

    Should be possible to optimize it but it will ultimately depend on what exactly you need to adjust; one thing I should point out is that manual code changes made to the shader file will be ignored by the editor, meaning that if you save the shader in the editor after manual code changes, they will be discarded.

    However, you have at your disposal several features/options to make the best out of ASE:
    -Custom Expression for custom shader code
    -Shader Templates for Custom Vertex/Frag shader types
    -A Node API, perfect if you have a well defined pipeline
    -The Vertex to Fragment node can also be helpful(specific uses)
    -You can also add your own cginc files if required.
     
  5. daibutsu

    daibutsu

    Joined:
    Nov 28, 2017
    Posts:
    23
    Got it. Thaks a lot. I have Amplify, and it's very convenient and very good Editor thanks for it.
     
    Amplify_Ricardo likes this.
  6. Ruskul

    Ruskul

    Joined:
    Aug 7, 2014
    Posts:
    58
     
  7. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    1,864
    Still a bit experimental I'm afraid, I would give it some more time before committing to a 2d lit workflow. We do intend to expand on this later on, definitely something that we want to provide parity on with what Shader Graph offers and more.
     
  8. rcazzy

    rcazzy

    Joined:
    Jun 7, 2014
    Posts:
    12
    Hey guys, I'm trying to create a splat map for mesh terrain based off colours. I need 4 layers and I was wondering what would be the way to use the generated splat map to assign colours. I was thinking Red, Green, Blue, Yellow as the colours to use. Is there any way to differentiate between the colours. I have previously made a version based off the Four Splats First Pass Terrain that works with RGBA that I've attached, but this provides issues as when creating a splat, one layer being in alpha causes issues.
    Any advice would be appreciated! :)
     

    Attached Files:

    Last edited: May 28, 2020
  9. Ruskul

    Ruskul

    Joined:
    Aug 7, 2014
    Posts:
    58
    Thanks for letting me know. if you have any updates in this area, and you think of it, let me know :)
     
  10. Tracecat

    Tracecat

    Joined:
    Mar 20, 2014
    Posts:
    22
    I am wondering if it is possible to speed up compile times of HDRP shaders during Unity editor development. I am an old guy still remembering that there was a time where shaders updated almost instantly upon change. Now it takes about 10 seconds for each try which is quite annoying. It is important to mention that i am NOT talking about compling shader variants during the building process but when you try to develop something nice looking in the editor. Is there a way to reduce the waiting time? I tried to downsize the graph but this didn't help much. I also tested the built-in Unity shader graph but it behaved even worse than Amplify. I not sure if it is possible but if Amplify could improve on this, it would be really great!
     
  11. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    1,864
    Have you seen the single channel mask example or the color mask Shader Function?

    We'll make note of it, thanks for understanding!

    We know what you mean, it's a bummer sometimes; especially if we use Static Switches for multicompile. Unfortunately, there's not much we can do on our side, we're limited to how you Unity handles it and the resulting speed.
     
  12. Tracecat

    Tracecat

    Joined:
    Mar 20, 2014
    Posts:
    22
    Yeah already thought that this might be out of your control. But thank you for the quick response! I really wished Unity would have a dedicated performance team that hunts down this issues. It is the same with c# code compile/domain reload. When i started with Unity 4 it took somewhere below a second for new projects. Now it takes ages...
     
  13. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    1,864
    Can definitely related to that, we're hoping this will improve beyond Unity 2020.
     
  14. adamz

    adamz

    Joined:
    Jul 18, 2007
    Posts:
    1,033
    Here is a better example of what I'm trying to do. I'd like to take the circle texture and and move it to an area on my UV, then allow the user to scale the circle at that position, and then use that for the alpha on my Blend Operations node.

    Is that possible? I took a look at the UV nodes and can't seem to find the right combination.

    Thanks!

    example.jpg
     
  15. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    3,853
    so how do I use those? I want diffuse behavior from a lookup to the blended reflection probe
     
  16. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    1,864

    Try this http://paste.amplify.pt/view/raw/5859426c (paste link into canvas) Be sure to set your circle texture Wrap Mode to Clamp, it's on repeat by default.

    Sorry, didn't really have an exact idea in mind but you can manipulate the output of that node via a Custom Expression.
     
  17. adamz

    adamz

    Joined:
    Jul 18, 2007
    Posts:
    1,033
    This sort of works, but is there a way to scale the texture after its position? I'd like to be able to position the texture, then scale that texture relative to the position. Right now if I scale the texture, I have to reposition it again. Thanks again for your help!
     
  18. rcazzy

    rcazzy

    Joined:
    Jun 7, 2014
    Posts:
    12
    Hi, again. I've attempted to use the Color Mask shader Function to separate the colours on my custom splat mask, and I can get it to work, but I'm having trouble with getting them to blend between the layers, instead I'm getting black borders. I've tried the blending layers, but the input seems to only take RGBA and not custom weights, leaving my yellow channel out? Unless there is a way to generate custom weights from the Color Masks? Here is my current layout of how I think it should go:
     

    Attached Files:

  19. passeridaepc

    passeridaepc

    Joined:
    Jun 16, 2019
    Posts:
    59
    Hi!
    Can someone help us with Vector Displacement Maps?
    There are many attempts of implementation with UE Blueprints, but they all have issues with handling both minimum and maximum values. As do we. We've started with the famous "Ear" map (https://docs.arnoldrenderer.com/display/A5AFCUG/Vector+Displacement)

    And we have some results:
    Sorry for the wireframe look, we don't have normal reconstruction for this, so it's shaded incorrectly.
    We do have some overhang geometry, so it kinda works. However, the problem is that it moves vertices only in a single direction along each axe. The correct result is, of course, when the geometry is moved in both directions.
    And we don't know how to achieve this. Moving vertices in one direction seems like using only positive values for a usual grayscale displacement map. But the thing is, the middle point (which means no movement up or down) for a regular grayscale displacement map is gray. So we can determine which parts of such map will be pushed inwards and outwards just by looking at it. But all Vector Displacement Maps use black colour as a starting point. And most offline renderers are okay with it after certain manipulations like this one:
    We also tested some maps with Corona Render + 3Ds Max, which handles them perfectly and almost out of the box (with Gamma override for a VD map changed from "automatic" to 1,0). So, most offline renderers seem to be doing some kind of remapping. And it looks like it's not that simple because we haven't found anyone who did it with Blueprints or Shadergraph and got correct results, There are some examples which use 16 bit VDM (which means loss of information, as far as I understand) baked in World Space. But nothing with 32 bit + Tangent Space (which are default export options in Mudbox). Mudbox and ZBrush associates 16 bit with gray background colour (that's why it's possible to use such maps) and 32 bit with typical black colour. I would appreciate it if someone could explain the reasoning behind this, since Xnormals allows you to choose bg colour yourself and bakes it into an alpha channel. So, is there a way to solve this?

    Sorry, if the question is too noobish, shaders are quite new to us and there's not much documentation on Vector Displacement out there, so we are struggling to understand even its basic concepts sometimes.

    Our current setup:


    Thanks!
     
    Last edited: Jun 2, 2020
  20. Summerson

    Summerson

    Joined:
    Nov 24, 2013
    Posts:
    7
    I have the same issue. FormatException:Input string was not in a correct format
    Updated Amplify can open previously created shaders but after saving it can't reopen it. just opens empty window (flat color) but if you leave it open and restart unity it loads your shader fine. until you try to reopen again.
    It's fresh URP project unity2019.3.9f1 URP 7.3.1
     
  21. Maverick

    Maverick

    Joined:
    Dec 18, 2009
    Posts:
    100
    Hello,

    An old question, is there a way to compile all ASE shaders/functions at once? Maybe there is an API (something like ASE.Compile(asset)) ?

    Opening each function/shader in the editor and pressing compile is a real pain. :)
     
  22. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    1,864
    Shader UV control does not provide that functionality, you'll have to make the calculations yourself based on the texture anchor. Try dividing the offset based on the multiply value; do keep in mind that the texture anchor is not at its center but the lower left corner.



    Hey, what a coincidence, we've actually been looking into and struggling with this in the past weeks. We've been doing some tests of our own and so far it seems really hard to get coherent results out of baking tools. I don't know if you've had the chance to test the Zbrush Test Scene but it might be a good idea to confirm that things are working as expected; we find that World 48 and Tangent 41 seem to give out the "best results" for now.

    As for your particular case; be sure to use the Transform Direction node to handle Tangent to Object conversion. World based VDM works but you'll have to handle axis orientation based on your authoring tool; for zbrush, you invert Z; you might also need to swap the Green for the Blue channel in Unity. Another thing to consider is scale, check the model import options in Unity, you might need to disable "Convert Units".

    We're looking into a simple and reliable way of baking and bringing in those maps in a manner that Unity can handle.

    So far, the best results we've seen are from Mudbox Tangent VDM's. We're going to continue exploring options, even though this is not specific to our editor, we'd love to offer a working solution.

    TL;DR
    We don't have a solution for this yet but we're looking into it; not specific to our editor.
    2 problems here, actually baking the data in a manner that you can use in Unity and interpreting that data correctly in Unity.

    That's definitely not good, can you send us the problematic shader(s) so that we can test it on our side? (support@amplify.pt)

    What's your platform and System language?


    Afraid not, it will be possible but this is tied to a new feature we're developing regarding shader compilation.
     
  23. Summerson

    Summerson

    Joined:
    Nov 24, 2013
    Posts:
    7
    it works with any previously created shader
    I just created empty shader for example URP unlit, saved it and it's not opening again.
    it's opens shaders fine in 1.7.8 though it shows the same error couple of times. I just didn't pay attention before this bug.
     
  24. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    1,864
    Please update to the latest ASE version available on our site. If the problem persists, we need to know what you see on your console and to test a sample shader.

    http://amplify.pt/download v1.8.1.002 – 28th May 2020
     
  25. passeridaepc

    passeridaepc

    Joined:
    Jun 16, 2019
    Posts:
    59
    Wow, it's good to know we are not alone in this:)
    Yeah, I've checked it. But in our case there weren't any perfect results. Zbrush VDMs seem to be the most hard to implement. I've seen a number of issues people have with them even when using inside Vray.
    Could you please share your current setup which works with either world or tangent (be it 32/16 bit exported from Mudbox or Zbrush) if you have one? Even if it's still experimental and not ready yet, we could learn from it and experiment.
    Yeah, the same goes for us. Mudbox Absolute Tangent 32 bit looks like the best option at the moment. But again, how do you control negative values of the map? We've noticed that people who managed to implement it in Unreal shift the image from 0-255 range to 125-255 and then subtract it from 0.5 to get it working properly. What's your approach?

    UPD:

    We managed to get a perfect sample of vector displacement with the "EAR" Map. The map turned out to be baked in Object Space + no channel swapping was needed, though we did invert the green channel. We checked it against the same map rendered in 3Ds MAX and Corona. No difference.




    We have also managed to bake maps for some more complex objects. Here's an example of a column photoscan from Quixel. The map is baked in Mudbox in Object Space. No channel swapping again, but this time it required inverting both Green and Blue channels.

    Here's the current setup:


    We also followed your advice and used Transform Direction. We tested it with the same Column VDM baked in Tangent Space in Mudbox. It works, but this time we had to swap green and blue channels:


    But, as I said before, in order to use VDMs like this, we clamp them in Photoshop by setting "Levels" adjustment to 125-255 range. Then we subtract it from 0.5 to shift it in -125 125 range, so we could get both negative and positive values. This way we lose half the data stored in the map. Do you know any way to avoid that and shift the whole range from 0 255 to -128 128 inside Amplify?

    Thanks!
     
    Last edited: Jun 4, 2020
  26. Cookieg82

    Cookieg82

    Joined:
    Mar 28, 2017
    Posts:
    73
    Hey! I bought ASE (Looks to be just what I need). I may have jumped the gun a little but I am using 2020.1.0bf7 - Do I need to downgrade the Unity engine to use this asset, say to a 2019 edition? I Didn't think to look at the wiki or the forums, I just presumed it would work as it says HDRP ready etc. My main problem is Everything is Pink? How do I sort that? Thanks muchly :)
     
  27. dragonikus

    dragonikus

    Joined:
    Sep 29, 2010
    Posts:
    3
    When i open my shader after 1.8.1 update a can`t do this and see in log:


    FormatException: Input string was not in a correct format.
    System.Number.ParseSingle (System.String value, System.Globalization.NumberStyles options, System.Globalization.NumberFormatInfo numfmt) (at <437ba245d8404784b9fbab9b439ac908>:0)
    System.Single.Parse (System.String s, System.Globalization.NumberStyles style, System.Globalization.NumberFormatInfo info) (at <437ba245d8404784b9fbab9b439ac908>:0)
    System.Single.Parse (System.String s, System.IFormatProvider provider) (at <437ba245d8404784b9fbab9b439ac908>:0)
    System.Convert.ToSingle (System.String value) (at <437ba245d8404784b9fbab9b439ac908>:0)
    AmplifyShaderEditor.InlineProperty.ReadFromSingle (System.String singleLine) (at Assets/AmplifyShaderEditor/Plugins/Editor/Utils/InlineProperty.cs:260)
    AmplifyShaderEditor.TemplateOptionsUIHelper.SetReadOptions () (at Assets/AmplifyShaderEditor/Plugins/Editor/Templates/TemplateOptionsUIHelper.cs:805)
    AmplifyShaderEditor.TemplateMultiPassMasterNode.SetReadOptions () (at Assets/AmplifyShaderEditor/Plugins/Editor/Templates/TemplateMultiPassMasterNode.cs:546)
    AmplifyShaderEditor.TemplateMultiPassMasterNode.OnRefreshLinkedPortsComplete () (at Assets/AmplifyShaderEditor/Plugins/Editor/Templates/TemplateMultiPassMasterNode.cs:539)
    AmplifyShaderEditor.ParentGraph.OnRefreshLinkedPortsCompleteInternal (AmplifyShaderEditor.UsageListTemplateMultiPassMasterNodes masterNodes) (at Assets/AmplifyShaderEditor/Plugins/Editor/Graphs/ParentGraph.cs:3143)
    AmplifyShaderEditor.ParentGraph.OnRefreshLinkedPortsComplete () (at Assets/AmplifyShaderEditor/Plugins/Editor/Graphs/ParentGraph.cs:3131)
    AmplifyShaderEditor.ParentGraph.Draw (AmplifyShaderEditor.DrawInfo drawInfo) (at Assets/AmplifyShaderEditor/Plugins/Editor/Graphs/ParentGraph.cs:1299)
    AmplifyShaderEditor.AmplifyShaderEditorWindow.LoadObject (UnityEngine.Object objToLoad) (at Assets/AmplifyShaderEditor/Plugins/Editor/Menu/AmplifyShaderEditorWindow.cs:1418)
    AmplifyShaderEditor.AmplifyShaderEditorWindow.OnEmptyGraphDetected (AmplifyShaderEditor.ParentGraph graph) (at Assets/AmplifyShaderEditor/Plugins/Editor/Menu/AmplifyShaderEditorWindow.cs:5565)
    AmplifyShaderEditor.ParentGraph.Draw (AmplifyShaderEditor.DrawInfo drawInfo) (at Assets/AmplifyShaderEditor/Plugins/Editor/Graphs/ParentGraph.cs:1101)
    AmplifyShaderEditor.AmplifyShaderEditorWindow.OnGUI () (at Assets/AmplifyShaderEditor/Plugins/Editor/Menu/AmplifyShaderEditorWindow.cs:4915)
    System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <437ba245d8404784b9fbab9b439ac908>:0)
    Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
    System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <437ba245d8404784b9fbab9b439ac908>:0)
    System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <437ba245d8404784b9fbab9b439ac908>:0)
    UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at <a20a50bbfaff4193bf6ba6b262f9a71f>:0)
    UnityEditor.HostView.Invoke (System.String methodName) (at <a20a50bbfaff4193bf6ba6b262f9a71f>:0)
    UnityEditor.HostView.InvokeOnGUI (UnityEngine.Rect onGUIPosition, UnityEngine.Rect viewRect) (at <a20a50bbfaff4193bf6ba6b262f9a71f>:0)
    UnityEditor.DockArea.DrawView (UnityEngine.Rect viewRect, UnityEngine.Rect dockAreaRect) (at <a20a50bbfaff4193bf6ba6b262f9a71f>:0)
    UnityEditor.DockArea.OldOnGUI () (at <a20a50bbfaff4193bf6ba6b262f9a71f>:0)
    UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout, UnityEngine.Rect layoutSize, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <78b213560771414e9fa6f1b95f5ad8bb>:0)
    UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

    P.S. Unity 2019.3.15f1
     
  28. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    1,864

    More of a reference to other users as we've already communicated via DM.

    -Set you project to linear, gamma projects will clamp values 0-positive.
    -For now, use Mudbox Tangent or Object bakes.

    We're still working on our samples, we'll be sure to post more about it at a later time.

    I think we already talked via Discord but for other users, we don't actually support beta or alpha versions. Using a compatible SRP, and a release Unity version, will ensure that it works as expected.

    Thanks!
     
    Cookieg82 likes this.
  29. Ell223

    Ell223

    Joined:
    Jan 27, 2014
    Posts:
    5
    Hello,

    Does anybody have any ideas on how I can create a blend between two textures I have on my terrain.
    mudSquare.PNG

    I am rendering the grass on the entire terrain. I create a texture at runtime to use as a mask to define the areas where the mud should show (defined by the user at runtime from the game grid system). I use this mask as the alpha on a lerp between the mud and grass. This works great, except for the blend between the textures is obviously binary.

    I have managed to define a border region around the mud which I would like to act as the blend:
    mudSquareOutline.PNG

    Any idea how I can achieve this? Would it be a case of manually lerping these border mask values when I set them in the script, or am I able to blend this area within the shader?
     
  30. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    1,864
    Hey there!

    Can you show us the texture and the current shader?

    Thanks!
     
  31. Ell223

    Ell223

    Joined:
    Jan 27, 2014
    Posts:
    5

    This is the shader as I have it currently. The mask texture is a 1000x1000 texture defaulted to black. I map it over a 500x500 terrain mesh so that 1 unit square is equal to a pixel in the mask texture- so when I select a 4x4 square in game, it will set the relevant pixels in the texture to red for example.
    maskTexture.PNG
     
  32. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    1,864
    Thanks for sharing additional details; in this case it seems that you'll have to actually process the mask generated in order to add some blur to it before using in it your shader.

    There's a couple of alternatives that you could explore but this will ultimately depend on how you intend to use the mask. Does it change size, is it fixed, what's the purpose?
     
  33. Ell223

    Ell223

    Joined:
    Jan 27, 2014
    Posts:
    5
    Thanks for the quick replies! The mask texture doesn't change size after it is initially created, it will always be a fixed size relative to the terrain size. Currently it is 2:1 (i.e terrain is 500x500 units large, and texture is 1000x1000 pixels). The colours on the mask will change during gameplay, e.g if the player places a path or a building over an area the mask will change the relevant pixels to the colour the path texture is mapped to, in order to "paint" that texture onto the terrain. If player deleted that path, the pixels will be set back to black etc. The idea is the various textures will be mapped to the channels on the mask to decide which texture needs to be displayed at any particular spot on the terrain.
     
  34. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    1,864
    Thanks for elaborating, in this case I think the best choice is to pass the texture on to the shader with the blur/fade already in place.
     
  35. Ell223

    Ell223

    Joined:
    Jan 27, 2014
    Posts:
    5
    Thanks for the advice. Will take a look at implementing it that way. Cheers!
     
    Amplify_Ricardo likes this.
  36. doublegumbo

    doublegumbo

    Joined:
    Oct 24, 2013
    Posts:
    45
    I'm curious as to whether Amplify Shader is currentliy able to provide the Universal Rendering Pipeline with the ability to make custom post-processing effects. This has been an issue for most of URP's lifetime (as it relates to Shader Graph), but I figured it might be good to check in and see if Amplify currently offers a solution through Amplify Shader.

    thanks!
     
  37. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    3,853
    This Distance Dither shader also z-test the shadows as if shadow is using the same alpha test as the camera. I thought it recomputed the opacity mask from the viewpoint of the light but it seems to optimize that thinking that mask is constant, is it possible to turn that optimization off?

    upload_2020-6-7_21-2-17.png

    SOLVED the shadow having dithering: use a static switch to fill the shadow with 1 when it's in the SHADOWCASTER pass, thanks to your thread

    problem remaining: shadows not there
    upload_2020-6-7_21-56-9.png
    solved: switching to renderqueur = transparent
    upload_2020-6-7_21-57-45.png

    problem remaining it shows the inside of the tree as we get near - how do I add a node that does
    Pass{ColorMask 0} before the shader to prevent seeing through the concave area of the tree?
    upload_2020-6-7_22-3-32.png
     
    Last edited: Jun 8, 2020
  38. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    1,864
    Not quite yet, we do intend to officially support it in the near future. Some of our users have already "hacked it away", we're going to expand on this later on.


    Based on dev input, you have to distinguish between Depth and the Shadow Caster as so:



    Hope it helps!
     
    laurentlavigne likes this.
  39. Allen-Chou

    Allen-Chou

    Joined:
    May 20, 2013
    Posts:
    14
    Hi:

    Here's a feature request regarding tessellation.

    Currently, turning on the tessellation option changes the vertex stage to simply copy over positionOS and normalOS to the vertex control output, as well as calls the original vertex function (without tessellation enabled) during the domain stage.

    I'd like to tessellate a mesh whose data is pulled/constructed from custom compute buffers and is rendered via Graphics.DrawProcedural / Graphics.DrawProceduralIndirect, and SV_VertexID is needed at this stage. So ASE's current implementation of tessellation wouldn't cut it in my case.

    I see that in the generated code, ASE even attempts to forward SV_VertexID as an attribute from the vertex stage down to the domain stage and interpolate it using the barycentric coordinates from the hull stage, which semantically doesn't make sense is not what I wanted.

    What I really need is to be able to still edit the vertex stage (reading SV_VertexID and construct the procedural verticies like the original vertex stage without tessellation), and then tessellate afterwards, instead of having my vertex function getting moved from the vertex stage to the domain stage.

    A temp workaround would be modifying the generated shader to suit my need, but it would be a pain to maintain every time I need to change my shader in ASE.

    I hope this makes sense.
     
  40. zelmund

    zelmund

    Joined:
    Mar 2, 2012
    Posts:
    413
    hi there
    is it possible to make a normal map from noise generator? wanted animated nrm from noise gen.
     
  41. Noors84

    Noors84

    Joined:
    Jul 12, 2016
    Posts:
    19
    Hello !
    I'm trying to use the Parallax Mapping node in VR single pass (built-in pipeline) to fake depth in an ice shader but it doesn't work. It works fine in multi pass. I guess this is a common issue with VR (view dir or uv's ?), but i don't find how to fix it nor if it can be done. Thanks.
     
  42. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    1,864


    Thanks for reaching out!

    We don't fully understand your aim there but our Tessellation implementation mirrors what Unity provides. We do intend to offer additional controls for the effect but not as you require; I think you're looking at a custom solution here beyond the scope of what we currently offer.


    You could but it's not really recommended, Noise is performance intensive. We would recommend looking into blending 2 noise textures that pan in opposite directions, this is commonly used to fake water normal noise effects.

    Use this Height - Normal node with caution:
    http://paste.amplify.pt/view/raw/be2cafb3 (paste link on canvas)

    VR can be problematic when it comes to those types of effects; we'd need to see a sample on our side for further testing/examination. What's your target platform?

    We're available via support@amplify.pt

    Thanks!
     
  43. iamarugin

    iamarugin

    Joined:
    Dec 17, 2014
    Posts:
    523
    Tried DOTS Instancing. Looks like Hybrid Instanced props doesn't work. Unity 2019.4, HDRP 7.4.1, Hybrid Renderer 0.5.1
     
  44. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    1,864
    Hey there, there's partial Hybrid Renderer support with the latest ASE version but it's fairly experimental.

    To be clear, we're unable to support Unity Beta/Alpha versions or experimental features such as the Hybrid Renderer; support will be added at a later time as Unity matures these features.
     
  45. zelmund

    zelmund

    Joined:
    Mar 2, 2012
    Posts:
    413
    thank you
    will try this
     
    Amplify_Ricardo likes this.
  46. deverolirc

    deverolirc

    Joined:
    Jan 19, 2014
    Posts:
    583
    Any news on accessing the Terrain Per Pixel normal map with amplify in URP?
     
  47. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    1,864
    Our apologies, it's still in our support queue. We will absolutely get back to you as soon as one of our developers takes care of it.

    Given our small team size, it's always a bit tricky for us when we get a bit overload, we appreciate your patience.
     
  48. WryMim

    WryMim

    Joined:
    Mar 16, 2019
    Posts:
    25
    Hello. As I understand only I have this error?
    Creating a new Shader, selecting URP. Save. But I can't open it for editing anymore!

    Unity Version: 2019.3.15
    Version Of Amplify Shader: 1.8.1

    upload_2020-6-12_15-28-54.png upload_2020-6-12_15-31-23.png
     
  49. passeridaepc

    passeridaepc

    Joined:
    Jun 16, 2019
    Posts:
    59
    Hi!

    Does anyone know how to get multiple textures from a single texture array?

    I'm about to have a situation where I need to extract a number of textures from a single array, but a texture array node can receive only one index at a time and therefore output only a single texture. I guess, an obvious idea is to create some kind of a cycle where I address a single array multiple times to get as many textures from it as I want, but that's not really the best approach performance-wise, is it?

    To be more specific: I need to be able to blend a wide range of different textures inside a shader. From 10 to hundreds. So, I can't just sample them as 2D textures and I can't even sample to many different arrays, because It's possible to use only 16 different samplers in a parallel manner, if I understand it right. So, I was wondering if there's an efficient way to sample one or a couple of arrays multiple times?
     
  50. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    3,853
    what is that suppose to do?
    upload_2020-6-12_17-27-34.png
    for
    upload_2020-6-12_17-27-46.png

    vs preferable
    upload_2020-6-12_17-28-26.png
    upload_2020-6-12_17-28-19.png
    what I'd like is that the inside of the tree doesn't show at all when the camera is in it, you can see a bit of the trunk
     
unityunity