Search Unity

  1. Calling all beginners! Join the FPS Beginners Mods Challenge until December 13.
    Dismiss Notice
  2. It's Cyber Week at the Asset Store!
    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. Takamba

    Takamba

    Joined:
    Jan 11, 2018
    Posts:
    25
    Hi all

    I am looking for a video tutorial or a written tutorial regarding Custom Render Textures within ASE

    I would like to use a caustics texture generated out of the water ripple normals and project it to the water ground with a decal projector, so the caustics change according the water ripple normals.

    Does anyone know of a tutorial describing such a process?

    Thanks in advance,
    Phil
     
  2. lorddesu

    lorddesu

    Joined:
    Aug 20, 2014
    Posts:
    25
    That error gone after restarting Unity. But some times appear again.
    upload_2019-5-10_0-8-45.png
     
    Last edited: May 9, 2019
  3. arnoob

    arnoob

    Joined:
    May 16, 2014
    Posts:
    152
    Hello Everyone!

    So thanks to ASE, I am now able do use Custom Render Textures, and this opens a LOT of opportunities for me (I am currently working on a real time GI thanks to it).

    However, while it works great, I have a performance problem, that is very likely due to a bug.

    I am using a 3D CRT right now, but the resolution Z (or W) makes the setpass draw calls skyrocket! Even in the inspector, be it in play mode or not. Here are some screenshots I made.

    Is it a bug from ASE? Can it be resolved?

    Anyway, keep up the good work everyone!
     

    Attached Files:

  4. Sibylline-Siren

    Sibylline-Siren

    Joined:
    Jul 8, 2012
    Posts:
    8
    Not sure if this is the right place to ask, but I was wondering if anyone else was having any success combining matcaps with normal maps. It works perfectly in Shader Forge, but in ASE the normal map affects the diffuse but not the matcap:

    (Please ignore the fact that I linked the matcap to albedo rather than emission in ASE)
     
  5. Alan47

    Alan47

    Joined:
    Mar 5, 2011
    Posts:
    129
    Hi,

    I'm trying to follow this tutorial (which is for Unity Shader Graph) with Amplify Shader Editor. I noticed that Amplify does not seem to have any nodes for generating Perlin Noise and Voronoi Noise procedurally. Those two kinds of noise are very useful for various effects (as shown in the tutorial) so it would be nice to have them as functions, rather than resorting to a noise texture.

    Does Amplify Shader Editor have perlin and voronoi noise generation built-in somewhere?
     
  6. Alan47

    Alan47

    Joined:
    Mar 5, 2011
    Posts:
    129
    I went on ahead and created the voronoi node myself, based on the open-source code provided by Unity ShaderGraph.

    Here's the "custom expression" code:

    Code (CSharp):
    1. float2 g = floor(UV * CellDensity);
    2. float2 f = frac(UV * CellDensity);
    3. float t = 8.0;
    4. float3 res = float3(8.0, 0.0, 0.0);
    5. float r = 0.0;
    6. for(int y=-1; y<=1; y++)
    7. {
    8.     for(int x=-1; x<=1; x++)
    9.     {
    10.         float2 lattice = float2(x,y);
    11.         float2 iUV = lattice + g;
    12.      
    13.         float2x2 m = float2x2(15.27, 47.63, 99.41, 89.98);
    14.         iUV = frac(sin(mul(iUV, m)) * 46839.32);
    15.         float2 offset = float2(sin(iUV.y*+AngleOffset)*0.5+0.5, cos(iUV.x*AngleOffset)*0.5+0.5);
    16.         float d = distance(lattice + offset, f);
    17.         if(d < res.x)
    18.         {
    19.             res = float3(d, offset.x, offset.y);
    20.             r = res.x;
    21.             Cells = res.y;
    22.         }
    23.     }
    24. }
    25. return r;

    How to use it:

    1. Create a Custom Expression node
    2. Copy-paste above code into the "Code" text field of the node
    3. Under "Inputs", create the following:
    I hope somebody will find this useful.
     
    anomas, marcatore and BOXOPHOBIC like this.
  7. BOXOPHOBIC

    BOXOPHOBIC

    Joined:
    Jul 17, 2015
    Posts:
    195
    I think you need to connect the normal map tex to the World Normal > Normal input in order to "perturb" the normals used for matcap.
     
  8. DaronLin

    DaronLin

    Joined:
    Mar 10, 2016
    Posts:
    5
    Hi everyone,

    I have a qusetion on Amplify editor.
    How do I create a node like "Matrix2X2" or "Matrix construction"?
    even if I can editor code a new node for Matrix2X2?
    ex:"Matrix construction" on Unity Shader Graph editor window.

     
  9. unity_5fpsmegasupergiperprogramer

    unity_5fpsmegasupergiperprogramer

    Joined:
    Dec 1, 2017
    Posts:
    101
    Hi, everybody. Using LWRP + Android

    Can't be easy Shader to Amplify analogue "SimpleLit" from Unity. Shader is obtained on many more slowly.

    That is, I do "SampleTexture" and all.

    Difference in FPS:
    - Unity SimpleLit: 59
    - Amplify Lightweight PBR: 37

    Maybe it's worth your asset to use the functions in "Packages/com.unity.render-pipelines.lightweight/Shaders/".

    Need mobile oprimization.
     
  10. Amplify_Borba

    Amplify_Borba

    Joined:
    Jul 24, 2017
    Posts:
    538
    Hello, although we have no specific tutorial or sample for a caustics effect I'll register this as a suggestion for the developers to consider for a future sample.

    Regarding custom render texture, we do provide a sample that could help you, you can find it within the CustomRTRain folder, it comes packed as a unity package for compatibility reasons as it can only be used in Unity 2017 and above.


    Hey there, can you ensure that you're using the latest version from our website?

    If you're on the latest version, could you provide a sample with the issue present as we're unable to replicate this behavior?


    Hello, and thanks!

    I'm not entirely sure but it doesn't seem likely that ASE is at fault here, since Unity should be calculating the render textures for each layer of the 3D CRT, which in turn makes sense that the drawcall count increases accordingly.

    In any case, could you please share a sample to support@amplify.pt with additional details regarding how we could test this without having a 3D CRT?


    Thank you for sharing, would you like to contribute this to our package?

    More information here!


    Hello, you may create your own nodes for ASE, you can find more information regarding this in our node API.
    Also, be sure to check our Matrix Operators for a reference to all out currently available nodes.


    Hey there, the comparison made wasn't correct as you're comparing a PBR lighting model with a simple one.
    We would suggest that you use the LW Unlit template with the Blinn-Phong Light shader function that we provide.

    Also, please refrain from posting questions to both our support email and to this thread, we'd rather if you just choose whichever you prefer, thanks!
     
  11. Sibylline-Siren

    Sibylline-Siren

    Joined:
    Jul 8, 2012
    Posts:
    8
    That worked beautifully, thanks a lot.
     
    BOXOPHOBIC likes this.
  12. EiknarF

    EiknarF

    Joined:
    Apr 28, 2011
    Posts:
    96
    I'm a bit lost trying to get multi pass shaders to work. I found the template and imported it but don't know how to edit it or add more passes.

    I would really like to make a fur shader where I can increase the number of shells and offset them or change the clipping values in the shader rather than manually make lots of objects with lots of materials.

    Thanks
     
  13. bonzaiferroni

    bonzaiferroni

    Joined:
    May 26, 2016
    Posts:
    30
    1. I'm interested in both the Amplify Shader Editor and Amplify Occlusion and I'm not sure which one to get (or both). Are these assets intended to go together and do they compliment each other? Is it something like Unity's Post-Processing stack where you can include the Amplify Occlusion asset in the pipeline?
    2. I am currently using Unity's Post-Processing stack for all my projects, is this intended to be a replacement for that or does it integrate?
    3. In the store description it lists "Volumetric Pixelize by Raphael Ernaelsten" under Samples, is there some resource where I can find out more about what that is?
     
  14. Sibylline-Siren

    Sibylline-Siren

    Joined:
    Jul 8, 2012
    Posts:
    8
    I was trying to make tinted shadows and came across this post which covers exactly that: http://amplify.pt/forum/viewtopic.php?f=23&t=622
    To my surprise, it doesn't work for me. I tried creating a new project in case that was the problem, but that's not it. There must be something I should have done that I'm missing, but I don't know what. This is the as I copied it from the mentioned thread:


    Instead of blending nicely as a shadow, the Lerp blends the textures as if the float went directly into de Alpha value. It's sa if the Light Attenuation part didn't exist at all.
     
  15. Amplify_Borba

    Amplify_Borba

    Joined:
    Jul 24, 2017
    Posts:
    538
    Hello, we have an example and guide available in our Wiki Manual specific for setting up multi-pass shaders, and also offer a sample within the ASE package by the name of MultiPassDistortion.

    To edit the shader code itself you must use a text editor, you can quickly open your current shader by pressing this convenient button:



    Please be aware that you need to have some programming and shader knowledge in order to take advantage of this feature!


    Hello, thank you for your interest!

    1- Both have entirely different scopes; the Amplify Shader Editor is a tool that allows you to create shaders, including post-processing ones, whereas Amplify Occlusion is simply an image effect. Amplify Occlusion makes use of the PPS2 in Unity 2018.3 for supporting the LW and HD pipelines, we're currently investigating how we can add support for Unity 2019 as well.

    2 - Neither asset is a replacement for the stack. Amplify Occlusion may be used together with the PPS as an alternative to Unity's occlusion solution as it presents a different technique, which is visually more accurate and flexible, while still being very performant. Do note that it's not yet compatible with Unity 2019.

    3 - This is a community contribution that was kindly submitted by Raphael Ernaelsten, more information inlcuding a public download link for the sample here.


    Hello, can you share which specific Unity and ASE versions you're currently using?
     
  16. EiknarF

    EiknarF

    Joined:
    Apr 28, 2011
    Posts:
    96
    Thanks for the reply Borba, so is the workflow;
    Edit the template in a text editor > import to ASE > Make a new shader with the new template > edit shader as normal in ASE?
     
  17. HiWill

    HiWill

    Joined:
    Jun 2, 2013
    Posts:
    14
    need to fix shadowbias error with 2019.1.2;

    Shader error in 'ASESampleShaders/SRP Lightweight/GlintSparkle': redefinition of '_ShadowBias' at line 363 (on d3d11)

    Compiling Vertex program with UNITY_PASS_SHADOWCASTER
    Platform defines: UNITY_NO_DXT5nm UNITY_ENABLE_REFLECTION_BUFFERS UNITY_NO_CUBEMAP_ARRAY 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 UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_LIGHTMAP_DLDR_ENCODING
     
  18. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    1,385
    What's your SRP Lightweight version?
     
  19. Sibylline-Siren

    Sibylline-Siren

    Joined:
    Jul 8, 2012
    Posts:
    8
    Whoops, my Unity version was completely out of date. Thanks, it works now. Sorry for the inconvenience.
     
  20. Amplify_Borba

    Amplify_Borba

    Joined:
    Jul 24, 2017
    Posts:
    538
    You may either use one of the ones we offer as a base ( simply duplicate it and rename / edit the duplicated file ) or create one outside of the project then import it into Unity.

    When you're done editing your template, be sure to save it in your text editor and when going back to Unity allow it enough time to reload the asset, then you may select the Template via the Shader Type drop-down list in your shader's main output node.

    Please be aware that, if you have any shaders using a template that has been modified, they should be manually recompiled.
     
  21. unity_5fpsmegasupergiperprogramer

    unity_5fpsmegasupergiperprogramer

    Joined:
    Dec 1, 2017
    Posts:
    101
    Hi! I need help.

    LWRP. Mobile optimization.

    Please tell me the best treatment option distance of the object from the camera? That is, I want something like the LOD, if the object is far away, it appears just texture, if close texture + reflection + shadow.

    And another question, why if I use "Compare A > B", etc., you first go to the calculations for all the results and then displays one of the results? And not separately depending on comparison, there is a calculation? It turns out not optimized!

    For example:
    if (...) {
    calculate1
    variant1
    }
    else {
    calculate2
    variant2
    }
     
  22. Amplify_Borba

    Amplify_Borba

    Joined:
    Jul 24, 2017
    Posts:
    538
    Hello, the first question regarding LOD setup is outside of the scope of our support, so I'm afraid I can't offer much assistance in regards to that, apologies for the inconvenience.

    Regarding your second question, please rest assured that we take great care in ensuring that the generated code is optimized, and also that the shader compiler is smart enough to only compile what it needs, so it does not generate additional instructions in this type of situations.

    The way you can test this is by compiling the shader and checking the instruction count, you'll notice that the compiled code will be optimized even though it in certain cases it may not seem as such.
     
  23. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    1,385


    The Madness Sale is almost over but did you know you can get 10% OFF your entire purchase when you spend $50 or more? Use promo code MAYSALE10PERCENT during checkout!

    Check out our deals at 50% OFF - Asset Store Page
     
  24. cyuxi

    cyuxi

    Joined:
    Apr 21, 2014
    Posts:
    35
    Hello Borba, Is there any progress made regarding to this Normal Issue? Hope everything is on track so far.
    It has already been messy that we got a lot of fbx having this issue after imported to U3D 2018 LWRP, which cost us lots of extra manual adjustment to get rid of the glitches...for some of them we just improvised to switch back to LWRP/SimpleLit.:confused:
     
  25. Amplify_Borba

    Amplify_Borba

    Joined:
    Jul 24, 2017
    Posts:
    538
    Hello, I can confirm that your reported issue is currently in our suport queue, our developer will tackle it as soon as possible, we apologize for the inconvenience.
     
  26. tab2410

    tab2410

    Joined:
    Oct 7, 2017
    Posts:
    3
    Hi,
    I am trying to use the CustomOutlineToon shader in the example folder. It's working fine with the example models. But whenever I import a model and apply the shader, it has some weird effects. Anyone knows how to fix this?

    Thanks.

    CustomOutlineToon Shader Issue.PNG
     
  27. Artkovski

    Artkovski

    Joined:
    Feb 9, 2014
    Posts:
    3
    Hey, I have just started learning ASE and it's amazing!

    I am working on a custom grass shader that uses Noise and Panner to animate the vertices. I am trying to make the Panner direction based on a global value from a game object in the scene, but I had no success so far.

    I think I need to convert the Y rotation of the global value to X and Y of the panner and I don't know how to do that.
    Any help would be appreciated, I am still learning and I am missing a lot of knowledge but so far it is fun.

    Here is how part of the shader looks like, for context:
     

    Attached Files:

  28. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    1,385
    Hey, would be great if we could test that model. Are the vertices welded?

    Have you tried the Rotator node?



    Thanks!
     
  29. tab2410

    tab2410

    Joined:
    Oct 7, 2017
    Posts:
    3
    This is happening with any imported model even with a simple sphere. However with unity's default prefabs (cube, sphere etc), it's working fine. I've tried exporting models from both maya and blender, default settings.
     
  30. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    1,385
    We would be happy to check it, can you send us one of the problematic ones?
     
  31. tab2410

    tab2410

    Joined:
    Oct 7, 2017
    Posts:
    3
    Thanks! I've attached a model.
     

    Attached Files:

  32. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    1,385
    I believe you'll have to change the outline mode to "Vertex Scale" if you want to keep the hard edges.
    upload_2019-5-17_16-33-0.png


    Alternatively, you can adjust the smoothing in Blender(assuming you are using blender), else the faces will be offset individually.

    Unity also allows you to Calculate Normals instead of importing them.

    upload_2019-5-17_16-37-35.png
    upload_2019-5-17_16-37-11.png


    Hope it helps, thanks!
     
  33. Kemonono

    Kemonono

    Joined:
    Nov 7, 2013
    Posts:
    303
    HDRP 5.13 | amplify sh ed 1.6.7 | Unity 2019.2

    Generates the following error when using HDSRPTemplates.unitypackage :

    Shader error in 'Hidden/Templates/HDSRPLit': 'InitBuiltinData': cannot convert from 'struct PositionInputs' to 'float' at line 476 (on d3d11)


    am I missing something?
     
  34. EscalatorSafe

    EscalatorSafe

    Joined:
    Apr 12, 2018
    Posts:
    21
    Hello
    Having some weird issues with normal maps and LWRP
    The top one is an unlit shader not in LWRP
    the bottom is the same shader in LWRP and amplifys LWRP unlit template
    Normal map is imported as normal map and unpack normals is checked.
    Am I doing something wrong?

    Cheers

    Capture.PNG Capture2.PNG
     
  35. lorddesu

    lorddesu

    Joined:
    Aug 20, 2014
    Posts:
    25
    Last edited: May 20, 2019
  36. unity_5fpsmegasupergiperprogramer

    unity_5fpsmegasupergiperprogramer

    Joined:
    Dec 1, 2017
    Posts:
    101
    Hello! Do you have the Normalize float function with the Min Max parameter? or you need to add yourself?

    Example:

    public static float Normalize(this int value, float min, float max)
    {

    return (Mathf.Clamp(value, min, max) - min) / (max - min);

    }
     
  37. Amplify_Borba

    Amplify_Borba

    Joined:
    Jul 24, 2017
    Posts:
    538
    Hello, we don't officially support Unity Betas or Alphas, which is the case for 2019.2 and 2019.3 respectively.

    As such, we recommend that you use the latest stable version with our editor, Unity 2019.1.3f1, together with the HDRP v5.13.


    Hello, please send a sample together with your textures to support@amplify.pt while also referencing this post, thanks!


    Hello, we don't offer any node comparable to that one but it's something that we're hoping to tackle as soon as possible. Could you share further details regarding what you're trying to do and why do you require the sampler state to be separated, so that we may provide any further insight?


    Hey there, our Normalize node does not offer such parameters but you should be able to accomplish this through a Custom Expression node.
     
    Kemonono likes this.
  38. lorddesu

    lorddesu

    Joined:
    Aug 20, 2014
    Posts:
    25
    Thank you for your response. Nothing really require to use the sampler state for now. Im new in ASE so just trying to dig and compare with Shader Graph.
     
    Last edited: May 20, 2019
  39. specular12

    specular12

    Joined:
    Jan 28, 2014
    Posts:
    8
    Hello,
    Is it possible to create a shadow matte using ASE? Here's an explanation of what I mean by shadow matte:
    https://docs.arnoldrenderer.com/display/A5AFMUG/Shadow+Matte
    In my scene, I have
    -a photographed image on a plane as a background plate
    -a perpendicular 2D plane as a floor (shadow catcher)
    - and a 3D object on the plane
    I would like to see through the 2D floor plane to the background image while catching the shadow of the 3D object on the plane.
    Perhaps something similar to the grab screen position / color example could be modified to work to catch shadows.
    http://wiki.amplify.pt/index.php?title=Unity_Products:Amplify_Shader_Editor/Grab_Screen_Color

    Any thoughts would be appreciated!
     
  40. Amplify_Borba

    Amplify_Borba

    Joined:
    Jul 24, 2017
    Posts:
    538
    Hello! Transparency and shadows is a complicated matter to deal with due to rendering limitations present in most engines. Transparent materials are not meant to handle shadows as the shader is written in the transparent queue, but not in the depth buffer, so it's not accounted for by Unity's shadow pass.

    A possible workaround, that would be far from perfect, would be to turn your transparent object into opaque and use a grab pass to try and simulate transparency on your own. For this you would also need to consider the Render Queue offset so that this object would be rendered after all other opaque objects.

    Alternatively, if you're comfortable with shader programming, you could try setting up a custom shader through our templates system to handle this specific situation.
     
  41. Beauque

    Beauque

    Joined:
    Mar 7, 2017
    Posts:
    17
    Hello,
    I am looking for a simple way to controle multiple static switches (with the same keywords) at the same time directly in the material inspector. I don't know if the "Fetch" mode of the node can help in this but I wasn't able to make it work for what I want.
    Will I need to use an external script for this?
    Thank you
     
  42. anomas

    anomas

    Joined:
    Jul 3, 2016
    Posts:
    33
    Hi, is it possible to create normals from a RGBA output instead of a Tex output? I've made a shader that works with my character creation system, so i need the normals to be generated at runtime from the texture combination(scars, skin detail, etc). Can you help me solve this issue?
    Thanks.
     
  43. specular12

    specular12

    Joined:
    Jan 28, 2014
    Posts:
    8
    Thanks! Using an opaque material and adjusting the Render Queue worked like a charm, I just had to dial down (subtract) a little from the grab pass emission so the shadows would show up better.
     
    Amplify_Borba likes this.
  44. unity_TIzzud-xCECbdA

    unity_TIzzud-xCECbdA

    Joined:
    Oct 2, 2018
    Posts:
    1
    Please help me...

    I'm using HDRP for my project and I would like to use Amplify
    I'm currently using 4.10.0 version of HDRP and tried to use HDSRPTemplates as was described in the SRP Amplify Wiki
    (since there is a chance I missed something:in a whole setted HDRP project, I downloaded the Amplify package and opened/imported the HDSRP templates)

    there wasn't a SRP version of Amplify Shader in the "Create" option when I right-clicked... so I made a Amplfiy Surface Shader and changed the Shader Type to "HD Lit" and tried testing it but it didn' t work

    20190523_171303.png

    By the way I just tried to put the Color node in Albedo........

    I'm not sure I did anything wrong... would love some help
     
  45. jayatubi

    jayatubi

    Joined:
    Dec 9, 2013
    Posts:
    67
    Hi,

    Can the blend/depth/stencil options could be override on individual materials instead of creating a new copy of shader?
     
  46. Amplify_Borba

    Amplify_Borba

    Joined:
    Jul 24, 2017
    Posts:
    538
    Hello, could you please provide additional information regarding what exactly do you want to use the static switches for, and what do you mean by controlling multiple switches?


    Hello, you could try creating a new shader function based on our provided NormalCreate one, simply double click it to see how it's set up.



    Hello, the HDSRPTemplates.unitypackage is meant for Unity 2019.1 and the new HD SRP 5.xx, since you're using the HD SRP 4.10 ( Unity 2018 ), you need to extract the HDSRPTemplates 4xx (Legacy).unitypackage.

    We've noticed that the manual is slightly outdated and have proceeded to update this information, it's still present in the readme.txt included in the templates folder of the ASE package in any case.


    Hello, yes it should be possible to set most of those parameters per material.
     
  47. Beauque

    Beauque

    Joined:
    Mar 7, 2017
    Posts:
    17
    A bit hard to explain I hope this is clear enough:
    I am making a terrain shader with splatmap, that would lets the users choose how many different materials they want to blend together, between 2 and 5.
    For each option I would need to enable three Layered Blend nodes (for Albedos, Normals, MetalSmoothHeights) that have the corresponding amount of layers (2,3,4 or 5). But I can't find a way to enable them simultaneously (to switch between these different groups of three), using one single command in the inspector.
    For now the only solution I found is to have a keyword enum for the number of Albedo layers, a keyword enum for the number of normal layers etc, wich results in three dropdown lists in the material inspector, for three values that need to be equal. Not very practical and it unnecessarely multiplies the amount of shader features.
    In other words, I would like to use the same switch to change different things in the shader at the same time, but I am not sure if this is possible.

    EDIT: I need this to optimize the material by disabling unused texture slots if for exemple, the user only wants to blend 2 or 3 different materials (using only some of the splatmap channels).
     
    Last edited: May 24, 2019
  48. Beauque

    Beauque

    Joined:
    Mar 7, 2017
    Posts:
    17
    (sorry I can't edit my post anymore. here is my screen)
     

    Attached Files:

  49. DGordon

    DGordon

    Joined:
    Dec 8, 2013
    Posts:
    434
    Hey,

    Is there any way to know which camera (or more specifically, which target eye for VR) is currently rendering? I would love to create a shader that knows to use different UV offsets based on which camera/eye, that way I can have 1 material for both left and right eyes in our VR project. Its not using real 3d, but two panorama images with a proper offset, each rendered by a different eye. We have two cameras, one for the left eye and one for the right, two spheres, two materials, etc.

    [Edit -- I'm aware this may not be possible. I don't really understand how multiple cameras rendering different eyes interact with shaders to begin with]
     
    Last edited: May 24, 2019
  50. Amplify_Borba

    Amplify_Borba

    Joined:
    Jul 24, 2017
    Posts:
    538
    Thank you for the additional details! I believe that you can use the same keyword for different static switches, meaning that you won't need different keywords for Albedo, Normal, etc.
    Also, if you want to change the keyword through the material inspector and only use one enum list simply disable the Material Toggle paramets for all the Static Switch nodes.

    You can find additional information regarding the use of this node, such as how to change the keyword via code, in this post. Please let us know if the shared information helps!


    Hello! According to the Unity Documentation, shaders expose the constant in-built variable ‘unity_StereoEyeIndex’ to allow for eye-dependent calculations, and you may access this in ASE by creating an Int node then setting it to Global and its variable mode to Fetch, so that the declaration is not registered on the shader:



    Keep in mind that the value of "unity_StereoEyeIndex" is 0 for left-eye rendering, and 1 for right-eye rendering.