Search Unity

[Best Tool Asset Store Award] Amplify Shader Editor - Node-based Shader Creation Tool

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

  1. BananaMcMuffin

    BananaMcMuffin

    Joined:
    Jan 13, 2018
    Posts:
    1
    Hello, I'm creating a grass shader. It uses an opacity mask and is set to transparent cutout as well as using vertex offset and various other effects.

    But, how do I get it to receive shadows. To my knowledge, the receive shadows option won't work with transparent cutouts, but I have seen other amplify grass shaders that are able to receive shadows. Is it possible to sample the shadow coordinates of the screen space using Amplify? Ideally, I would want to be able to choose the color of the shadow, so returning a float by sampling the shadow coordinates would be ideal, but I'm open to any solution.

    Thanks in advance
     

    Attached Files:

  2. ayk

    ayk

    Joined:
    Nov 14, 2013
    Posts:
    58
    Hey there, I'm trying to create an unlit shader that also adds a single-pixel outline to a model. Anyone know how to go about doing this? I'm totally stumped.
     
  3. Amplify_RnD_Rick

    Amplify_RnD_Rick

    Joined:
    Feb 15, 2016
    Posts:
    528
    Unity's shader compiler is smart enough to see what variables are being used in each permutation and optimize it, so although the computedColor is generated over the shader, it will only have impact on the permutations that actually use it.

    So Unity can be a bit tricky on certain situations. So for the shadows to be properly generated, the sampler property you use must match the one used by Unity's replacement shader when calculating the lightmaps.
    On the Albedo texture sampler you can maintain the Name but the Property Name must necessarily be _MainTex.

    By looking at your shader there's at least something I don't quite get and is its the usage of the World Position node. You are calculating an object to tangent transform matrix, but then you are multiplying it with a world position.
    Can you let us know a bit your train of thought over what you have done?

    What most likely is happening is that you have another class on your project called Path which is not on a proper namespace.
    When this happens the compiler gets confused on which class it should actually use.
    Can you please confirm this?

    Yes I can confirm on what as been told to you over our discord. We do have plans to implement this but still haven't got the chance to do it.

    We haven't tested the Alpha To Coverage option under the Lightweight RP environment so I can't let you know for certain if it works as it should.
    Because of that we haven't added that option over the Lightweight template. For now you must manually open the shader and add the AlphaToMask On option right under the SubShader Tags declaration.
    Please let us know how it goes.

    By looking at your shot the only thing you need to is, you need to do is go to your Render Queue dropdown (under the Blend Mode area) and set it to Alpha Test.

    We have an Outline node on our Standard Surface Shader Type. You can use this Shader Type and set its Light Model to either Custom Lighting or Unlit.
    This Outline node extrudes your object according to the value you specify over the Width input port. You can play around with it to have the result you desire.
    Besides that you can create an outline via a post-processing effect. For this one you can check our Sobel example, which may be a good starting point.
     
  4. bigbenmatt

    bigbenmatt

    Joined:
    May 30, 2019
    Posts:
    11
    Hiya

    i'm having problems with the scale factor of a Normal Texture sample? It won't scale to 0,0,1. Latest amplify with Unity 2019.1.12f1

    NormalScaleIssue.PNG
     
  5. Amplify_RnD_Rick

    Amplify_RnD_Rick

    Joined:
    Feb 15, 2016
    Posts:
    528
    Hey,
    I've run some tests on my end across multiple Unity versions and everything seems to be working as expected when modifying the Scale input port.

    Can you let me know which steps you took in order to break the node?
    Also, if applying the respective material into an object, are the scaled normals also broken in the object itself?

    Just to be sure what you mean when you mention it won't scale to 0,0,1, what are these values you're referring to?
    From the screenshot I assume these are the Min,Max and Default Values of the Float node.

    I've also noticed that you're working on Shader mode so these values you are setting will be written as the property's default value and not set on the material itself.
     
  6. QuantumTheory

    QuantumTheory

    Joined:
    Jan 19, 2012
    Posts:
    1,081
    Hey Folks,

    In the HDRP template, I notice the Offset Factor and Offset Units are not available under the Depth rollout. Is this forthcoming or a limitation?
     
  7. SuperUltraHyper

    SuperUltraHyper

    Joined:
    Sep 7, 2015
    Posts:
    112
    Thanks, worked! Seems a little obscure sooo... For future searchers....
    Static Mesh Renderer of Amplify Shader with Opacity Mask Not Casting Baked Shadows: Fixed
     
  8. xinoHITO1

    xinoHITO1

    Joined:
    Jul 2, 2012
    Posts:
    33
    Hello! Been using Amplify and loving it but right now I'm kinda stuck and have spent too much time trying to solve it myself.

    I'm working on a Terrain shader with custom lighting. I've managed to make both FirstPass and AddPass shaders work with Lambert lighting. The problem is when I want to modify them to use Custom Lighting because the terrain shaders use a special surface option called finalcolor:SplatmapFinalColor.

    I found out that this function is inside Unity's built-in shaders in a file called TerrainSplatmapCommon.cginc. I've already tried to include this file in my shader and it doesn't work cause that file already uses it own Input struct and that messes up with the Input struct that Amplify generates.

    I'm leaving here a screenshot of both my shaders which use the same ShaderFunction called ColorfulTerrainCustomLighting. This shader function basically reads a mask to denote which parts of the terrain are colored. I want to be able to add my own lighting code to ColorfulTerrainCustomLighting.

    Oh and if I don't use the finalcolor:SplatmapFinalColor the AddPass won't work correctly :/

    Please help me I've been struggling with this the whole weekend.

    firstpass.png add pass.png colorful custom lighting.png console.png


     
  9. Amplify_RnD_Rick

    Amplify_RnD_Rick

    Joined:
    Feb 15, 2016
    Posts:
    528
    Not really.
    Hey its not really a limitation. We usually use Unity's own template structure to create our own ones and there they don't have that setup exposed.
    We'll register your request and add it on a future build.

    Yes I agree, this isn't an obvious solution. We need to understand a bit how replacement shaders works and when they are used.

    You can declare your own SplatmapFinalColor function so you can use your own structures.
    If you take a look into our SimpleTerrain example you'll notice that we declared the SplatmapFinalColor directly on our shader.
    That SplatmapFinalColor node is a custom expression which is marked to auto-register and its input port types are set as custom so we could define the proper input and output structures.
    The function name is set by the Custom Expression name and it can be whatever you want, as long as you then properly register it over the Additional Surface Options ( much as you are already doing it over your shot ).
    P.e. if you name your custom expression MyCustomFinalColor, then on the Additional Surface Option it should be finalcolor:MyCustomFinalColor.
     
  10. Polygonmaker

    Polygonmaker

    Joined:
    Nov 18, 2013
    Posts:
    81
    Hello,

    I am trying to create a shader to use Object-Space Normal map.

    Unity HDR pipeline allows to use it.

    I was wondering how I could do the same with the default pipeline in Unity using Amplify Shader.

    Thanks for your support

    Fabio
     
  11. alanmthomas

    alanmthomas

    Joined:
    Sep 7, 2015
    Posts:
    197
    Hi. I just purchased ASE yesterday and am getting going using it in my project. I've been using ShaderGraph, but haven't been entirely thrilled with the final results there. I am attempting to create a toon shader that I can then animate the vertices on for vegetation. I can't imagine that it is something that should be that difficult. I'm targeting LWRP in Unity 2019.2. I figured that the easiest way to start would be to take the CustomToonLighting example included with the asset and change it over to LWRP. When I do, I get a warning in the Light attenuation node that a shadow caster pass is need in the template. Is there an easy way to add that?

    Also, I'm hoping to be able to use the normal correction sample for the animated vertices. I'm targeting mobile devices, so is this something would wind up being to intensive for newer mobile devices?
     
  12. Amplify_RnD_Rick

    Amplify_RnD_Rick

    Joined:
    Feb 15, 2016
    Posts:
    528
    So if you are using the default pipeline Standard Shader Type then you necessarily have to plug a tangent space normal into its Normal input port. But you can p.e. use an object space normal map and then use the Transform Direction to transform its result from object to tangent space.

    Glad to have you on board! You can ignore that warning since our Unlit LW Template does contain a shadow caster pass and that node is correctly working over there.
    Regarding your second question, this really depends on how expensive is the way you are using to modify the vertices since you'll also need to use two more times to calculate the new normal vector.
    Usually when dealing with grass you can usually get good results without having to reconstruct its normals and have them p.e pointing up.
     
    Last edited: Aug 20, 2019
  13. Tracecat

    Tracecat

    Joined:
    Mar 20, 2014
    Posts:
    23
    Hi!
    Just tried to create a new HD Lit shader in Unity 2019.2.1f1. But I get " invalid subscript 'worldToTangent' " errors in the shaders inspector window. The shader itself is just the master(gbuffer) node without any other nodes...Maybe the new Unity version broke something?
     
  14. Amplify_RnD_Rick

    Amplify_RnD_Rick

    Joined:
    Feb 15, 2016
    Posts:
    528
    Can you let us know which ASE version are you using? Is it the v1.6.9rev002 from our website?

    EDIT: If not, can you please download this version and reimport the HDRP templates ?( only if if our template auto-importer doesn't import the new HDSRPTemplates.unitypackage )
     
  15. Tracecat

    Tracecat

    Joined:
    Mar 20, 2014
    Posts:
    23
    Wow that was fast! Thx! Updated to rev002 (had rev00) and it works now! Maybe the version on the Unity Asset store should be updated, as that's where I had the rev00 from and there was no futher update available...
     
  16. xinoHITO1

    xinoHITO1

    Joined:
    Jul 2, 2012
    Posts:
    33
    Hey! thanks for the super quick reply!!
    So... I checked the thing you mentioned about the custom expression. I added a custom expression for the final color function called CustomCustomFinalColor and changed the output type to the same output struct Amplify spits out when using the Custom lighting option. It's called SurfaceOutputCustomLightingCustom (had to check the shader's code to know the output struct's name). I changed the surface option in both my shaders to use CustomCustomFinalColor and the error went away but now my terrain looks completely black (ignore the grass that's another shader). Am I doing something wrong here?

    first pass.png final color expression.png terrain.png
     
  17. Amplify_RnD_Rick

    Amplify_RnD_Rick

    Joined:
    Feb 15, 2016
    Posts:
    528
    Yes, we usually update the Asset Store after gathering a couple of updates from the versions on our website.
    For us, having that website version is a way to, if needed, give you guys new builds as fast as possible without having to wait for Unity's approval process when submitting a new build into it.

    If the terrain gets black what's most likely to be happening is that your SurfaceOut.Alpha is always 0 thus when applying the final color calculation it is getting always black.
    How are you calculating that Alpha value over your shader function?
     
  18. xinoHITO1

    xinoHITO1

    Joined:
    Jul 2, 2012
    Posts:
    33
    Well the only way I use the Alpha is with the FourSplatFirstPassTerrain function. I simply output its alpha node to the opacity port in the master node. Maybe when setting the shader for custom lighting the alpha is not set on the FourSplatFirstPassTerrain function?

    Apart from that I use the StandardSurfaceLight node to replicate unity’s standard lighting and then output it to the custom lighting port in the master node. The same code that generates the Albedo part of the shader worked fine with Lambert lighting so I assume the issue isnt there.

    Btw is there a problem with me using FourSplatFirstPassTerrain function in both the FirstPass and AddPass shaders?
     
  19. zhuchun

    zhuchun

    Joined:
    Aug 11, 2012
    Posts:
    433
    Hi, I'm curious about the relationship between ASE and ShaderGraph on Unity HDRP, are they using the same API behind the scene? My project suffers from SG Lit master node, it could take up to 3-5 mins to strip/optimize for each build, which is not ideal. I would like to know does ASE have the same problem as well?
    Another question is would ASE support feature that SG currently doesn't have, say Stencil buffer?
     
  20. jayatubi

    jayatubi

    Joined:
    Dec 9, 2013
    Posts:
    143
    Could the nested static/function switch within a shader function node to be exposed to the outside user?

    For example if I create a shader function 'Function_A' with an function switch named 'options_a' then I put it into another shader function 'Function_B'. When I add this 'Function_B' into my final shader I want to change the value on the 'options_a' of the instance of 'Function_A' in the instance 'Function_B'.
     
  21. Amplify_RnD_Rick

    Amplify_RnD_Rick

    Joined:
    Feb 15, 2016
    Posts:
    528
    Ok so I tested out our Simple Terrain with Custom Lighting and got the same result as you do. The problem here is, when we are doing custom lighting the Alpha of that SurfaceOutputCustomLightingCustom is not being written thus the final color process fails.
    This, however, is by design since on Custom Lighting we do not want to write data on that structure since all lighting calculations are done via what is set into the Custom Lighting port.
    But don't worry as there's a simple solution, you need to to remove that finalcolor:SurfaceStructure option from the Additional Surface Options and manually do that multiplication of the final color value by the alpha before setting into the port.

    Something like this:


    You can check a modified version of the Simple Terrain over here. Please notice that importing this package will rewrite the original sample.

    Regarding the FourSplatFirstPassTerrain shader function question, yes you can use it on both First and Add passes. You can notice that we are using it on both our SimpleTerrainFirstPass and SimpleTerrainAddPass shaders on the SimpleTerrain sample.

    Sure, that's a pretty valid question. We are using Unity own HDRP API and our templates are based on their templates for each of their types of Master Nodes ( Unlit, PBR, Lit ).

    On our end you do however have access to each pass that is being used/written into the shader and you can select a couple ones out.

    P.e. if may not want the Motion Vectors or the Meta pass, so you can select those ones out.



    This will decrease shader compilation times.

    One other thing you can do, but this is on a much more advanced level, we do give you guys access to our templates as they are default hlsl shaders with some ASE special tags. You can open the template and customize it to your needs, remove unwanted keywords and this way decrease the amount of permutations.

    Regarding Stencil Buffer operations, our template system allows them. But in the case of HDRP we did not exposed them since each pass in HDRP requires a specific stencil buffer setup to properly work.

    Hum it's a really neat idea but I really don't know if this would make much sense ( depending on how you want to modify them ).

    Changing the value of a Static Switch is Enabling/Disabling keywords which is something that is not controlled via shader operations or properties.

    On ASE we do have that UI on the node to change the values, but what we are doing internally is enabling/disabling that specific keyword.

    How were you thinking on exposing those options on the upper shader functions? Maybe list the available switches on the SF Node Properties window?
     
    zhuchun likes this.
  22. jayatubi

    jayatubi

    Joined:
    Dec 9, 2013
    Posts:
    143

    I'd like to wrap a set of nodes into a reuseable shader function and each shader function would provide several options, functon switches, for different purposes. Then I'd like to wrap them into a larger shader function.

    For example:

    My_Final_Shader_1
    + Use a shader function 'Function_B'
    |--+Use another nested shader function 'Function_C'

    My_Final_Shader_2
    + Use a shader function 'Function_B'. And I want to change the opitions on this Function_B to be different from the 'My_Final_Shader_1' which is doable.
    |--+ Use another nested shader function 'Function_C'. And I want to change the opitions on Function_C to be different from the 'My_Final_Shader_1' which is not doable.
     
  23. xinoHITO1

    xinoHITO1

    Joined:
    Jul 2, 2012
    Posts:
    33
    Thank you for the answer it worked perfectly!!!
     
  24. Amplify_RnD_Rick

    Amplify_RnD_Rick

    Joined:
    Feb 15, 2016
    Posts:
    528
    Thank you for the additional info.

    For Static Switches, is a bit like I stated earlier, it doesn't make much sense to have that kind of behavior so we are not planing on doing that.

    Regarding Function Switches we do plan to implement that sort of behavior, on which selecting the shader function will show not only the Function Switch options from that SF but also from all the SF it is internally using.
    Unfortunately we're unable to give you an ETA on when we will be able to tackle it.

    Cool, really glad to hear!
     
  25. Takamba

    Takamba

    Joined:
    Jan 11, 2018
    Posts:
    25
    Hi

    I got the ASE Sample Water to work for 2019.1.1 with the help of Amplify_Borba, but when I open this project in version 2019.2.2 I get this error:

    Shader error in 'ASESampleShaders/Water/WaterSample': invalid subscript 'worldToTangent' at line 2418 (on d3d11)

    Any help on fixing this error is much appreciated.
    I have no clue whats causing this.

    Edit:

    Problem solved, found the solution a some post above.

    Regards,
    Phil

     
    Last edited: Aug 23, 2019
    Amplify_RnD_Rick likes this.
  26. Juliken

    Juliken

    Joined:
    Jan 30, 2017
    Posts:
    17
    Thanks for your answer. I dont know how to quote only your answer so I quote all the answer.

    I tried to use the Custom Lighting mode but I figured out a new problem. My character has a flashlight and I use a spotlight to simulate this. The problem is that the shader does'nt support very well the kind of lights. When the light aim an object with the shader the light's shape is a square instead of a circle.

    Is this a known problem ?
     
  27. Amplify_RnD_Rick

    Amplify_RnD_Rick

    Joined:
    Feb 15, 2016
    Posts:
    528
    This seems to be just a simple matter of you using an outdated template.
    Can you update your ASE version to the latest one available at our website and re-import the latest HD templates (if they are not automatically imported)?

    EDIT: Glad to know you just found a fix to your issue!

    Can you let me know what's your current node setup? Are you multiplying your light calculations with the Light Attenuation node so its attenuation is correctly taken into account?
     
  28. o1o101

    o1o101

    Joined:
    Jan 19, 2014
    Posts:
    639
    Hi guys, is it possible to control fog strength via shader? For example, I want to keep my lighting settings as is, but I want a certain material to render about 50% fog instead of either Fog ON, or Fog Off.
     
  29. Amplify_RnD_Rick

    Amplify_RnD_Rick

    Joined:
    Feb 15, 2016
    Posts:
    528
    Legacy Fog is being calculated using the global variable unity_FogParams.
    I'm not sure if you are going to have success trying to manually set it because since its a global variable, changing it will affect all objects.
    I also don't know if you can even set a new value into it since Unity may be overwriting on a later render stage.
     
  30. thestroyer_

    thestroyer_

    Joined:
    Oct 12, 2015
    Posts:
    10
    Hi! I have some trouble using Amplify Shader Editor. Is it by design the fact that tesselation is not supported using GPU Instancing or is it some kind of bug?

    Thanks in advance! :)
     
  31. eco_bach

    eco_bach

    Joined:
    Jul 8, 2013
    Posts:
    1,601
    Hey guys, trying to understand something very basic when creating shader using the HDR pipeline. Created a new material, assigned a ASESample shader Dithering Fade. But why is the shader pink? Also tried creating custom dissolve shader from scratch following this tutorial
    and tried creating a HDRP shader by right-clicking Create > Amplify Shader > HD Lit but same result in each case, pink shader. Using Unity 2019.2

    HDR_pipeline_pink.JPG
     
  32. Amplify_RnD_Rick

    Amplify_RnD_Rick

    Joined:
    Feb 15, 2016
    Posts:
    528
    This is a Unity limitation. Unfortunately there's nothing we can do for now on our end.

    Does the shader compiles correctly without errors?
    If no error is thrown, have you created an HDR Pipeline asset and set it up over the Unity's Scriptable Render Pipeline Settings (under the Graphics window)?
     
  33. thestroyer_

    thestroyer_

    Joined:
    Oct 12, 2015
    Posts:
    10
    Thanks for the answer!
     
  34. VincentAEG

    VincentAEG

    Joined:
    May 6, 2019
    Posts:
    2
    Hi there!

    For our upcoming game we're having difficulty with ASE-built water shaders on PS4 (and Mac) We get weird artefacts. Dots across the water, and the mesh-lines of the object are showing in grey.

    The picture taken was of the example ASE water shader.
    Any idea in which direction a solution might be found?

    We need a transparant water shader for our game.

    With kind regards,

    Vincent.
     

    Attached Files:

  35. eco_bach

    eco_bach

    Joined:
    Jul 8, 2013
    Posts:
    1,601
    Hi. I am using a custom dither shader which is finally working after upgrading to latest ASE and Unity 2019.2
    see https://github.com/gkjohnson/unity-...hader/blob/master/docs/AmplifyShaderEditor.md

    But instead of dithering from a flat color to transparency, I want to dither from a video texture on a Quad to transparency. The video material itself is a custom Material+Shader applied to a Quad. I need to dynamically dither this video, or dissolve, from fully opaque to fully transparent. So the first question is

    1) How do I dynamically drive the Alpha value in the attached screenshot
    and
    2) Is it possible somehow to use this dithering effect as a stencil on an existing material, or substitute the existing flat red color with the custom video material-shader?

    Dither_shader.JPG
     
  36. Amplify_Paulo

    Amplify_Paulo

    Joined:
    Jul 13, 2017
    Posts:
    297
    Hi Vincent, so it happens that I do have an idea of what that is, simply because we had the same issue in our game and I spend a few days trying everything that made sense until I finally figured out the real issue.

    For some reason I can't explain (I haven't found any information on this in unity docs or forums, nor at sony dev forums) the depth buffer doesn't seem to work exactly the same as in a PC build. And this is important because what you are seeing is either the "depth fade" node or a calculation with "screen depth" node failing, both of which use the depth buffer. They fail because when they run they are supposed to sample the depth buffer in order to do the depth coloring effect, however you also want your shader to write to depth so it intersects with your characters and objects, this usually done by setting your shader at a later Queue like transparent but leaving the depth writing ON, but by having these together it seems the depth buffer is not available or it can't figure out whether it's own depth contributes to the buffer on not. Usually it is the case that transparent objects do not go to the depth buffer but in PS4 they do (and btw nintendo switch has a similar issue so if you are planning on that be warned).

    In our case we solved it by turning the depth writing OFF in the water shader while setting it to Opaque. Doing this will visually fix the artifacts but it will also ruin the intersection with other objects, they will simply float on top. We solved this last part by creating a second shader that only writes to the depth buffer (ColorMask 0) and does that at a later Queue, AlphaTest+49 (just before transparent). In the water object we added two materials to the material list, one for each shader with the "depthonly" shader on the second place in the list. This solution is not perfect, you'll have two draw calls for the water instead of one (not a big deal since one isn't heavy), the biggest issue is that if you have different water bodies that can be seen at different heights on top of each other it might not know the order of rendering and you may end up with something that was supposed to be rendered below being rendered above, but this never happens in our game so it was fine with us. You could probably fix this by having different water shaders in different render queues.

    The real final solution would be to manually resolve the depth buffer at a specific stage, with that you could guarantee to work the same for all platforms. This seems far more complex, specially for legacy shaders, in SRP this seems to be somewhat trivial. This dirty hack did it for us.

    The second shader was not create in ASE, here's the full shader, nothing special, just rendering the depth
    Code (CSharp):
    1. Shader "WaterDepthOnly"
    2. {
    3.     SubShader
    4.     {
    5.         Tags{ "RenderType" = "Opaque"  "Queue" = "AlphaTest+49" "IgnoreProjector" = "True" "ForceNoShadowCasting" = "True" "DisableBatching" = "True" }
    6.         Cull Back
    7.         Pass
    8.         {
    9.             ColorMask 0
    10.             ZWrite On
    11.         }
    12.     }
    13. }
    Hope this helps, please do post a picture if you manage to fix it, it does look pretty already with those artifacts, I'd like to see it without it.
     
  37. VincentAEG

    VincentAEG

    Joined:
    May 6, 2019
    Posts:
    2
    Thank you! I'ts not perfect, but it does work, and a working 'anything' is better then what we had.

    I ended up fiddling around with the blending mode of this shader and some of the others we used, as they suddenly conflicted. Thats why I always refrain from going into the render queues, it always ends up cascading through the entire project.

    But as I said; very happy that there was a solution. Thank you!
     
  38. Sylmerria

    Sylmerria

    Joined:
    Jul 2, 2012
    Posts:
    369
    Hi,

    I have problems after import last version from amplify site ( v1.6.9 rev 02).

    It's from unity 19.1 with LWRP (5.7.2)

    Capture.PNG

    And I have many errors after unity package importation and this error each time I recompile a shader

    Capture.PNG2.PNG

    Thanks for help :)
     
  39. Kirbyrawr

    Kirbyrawr

    Joined:
    Jul 23, 2012
    Posts:
    945
    LWRP changed its name to Universal Render Pipeline, any info about how to make the shaders work with this package?

    Thanks!
     
  40. Amplify_RnD_Rick

    Amplify_RnD_Rick

    Joined:
    Feb 15, 2016
    Posts:
    528
    Which was the ASE version have you had before updating to this one?

    If possible could you try to reimport the LW templates package and recompile your shaders?



    These errors you've show appear to be from the legacy lwrp samples. Can you please re-import the LW SRP Samples.unitypackage?



    From that log I haven't been able to see errors from a custom shader of yours. When you compile your shaders which type of errors appear on its Inspector? Are they similar to the ones shown on our legacy samples?

    We haven't been able to tackle the new Universal Rendering Pipeline but what we most likely will do is mark the current LWRP templates as Legacy and create a brand new set of templates for it.
     
    Kirbyrawr likes this.
  41. Sylmerria

    Sylmerria

    Joined:
    Jul 2, 2012
    Posts:
    369
    From a fresh project of 19.1 with LWRP template, I import the package just download from your site and I unpack "LW SRP Samples".

    Capture.PNG

    Capture2.PNG

    PS: The scene shown from my last post is CustomLightingToon
     
    Last edited: Sep 2, 2019
  42. Amplify_RnD_Rick

    Amplify_RnD_Rick

    Joined:
    Feb 15, 2016
    Posts:
    528
    Thanks for the additional info, I've been able to replicate the same behavior on my end.
    The Grab Texture errors are Unity related and as far as we know they are harmless
    .
    The samples problem is due to you using LW 5.7.2. Since they where compiled using LW 5.16.1, all these errors are being thrown.

    We usually maintain the samples on the latest LW version, but you can, on your end open the sample and hit the Update button on ASE and it will compile the sample for the correct version.

    Unfortunately on version 5.7.2, our PBR template will always throw an error since again it defaults to 5.16.1. Nevertheless you can also ignore this error since ASE adapts the shader to 5.7.2 when generating the final source code.

    Apologies for the inconvenience.
     
  43. Sylmerria

    Sylmerria

    Joined:
    Jul 2, 2012
    Posts:
    369
    Indeed with LW 5.16, no problem at all.

    But with 5.7.2, it seems than something after ASE import breaks all material because even unity default shader are broken.

    Anyway, thanks for help
     
  44. Nifflas

    Nifflas

    Joined:
    Jun 13, 2013
    Posts:
    118
    Hey! I'm having trouble. I'm trying to convert a point in view space to normalized screen space. The same space as the "Screen Position" outputs in if its type parameter is set to "Normalized". Unfortunately, unless I'm mistaken the "Transform Position" node doesn't seem to have this functionality.
     
    Last edited: Sep 3, 2019
  45. Amplify_RnD_Rick

    Amplify_RnD_Rick

    Joined:
    Feb 15, 2016
    Posts:
    528
    The Normalize option over the Transform Direction refers to vector normalization, where you set its magnitude to 1.
    This only applies to direction vectors, thus it does not appear on the Transform Position node.
    I do understand your question because what you are referring to is Normalized Device Coordinates, which are Screen Position coordinates set a 0 - 1 range.
    We are planing to add the NDC transform option into the Transform Position node, but for now you'll need to use an additional Compute Screen Pos node to get the value you want.

    Something like this:

     
  46. Nifflas

    Nifflas

    Joined:
    Jun 13, 2013
    Posts:
    118
    Ah, thank you! Much appreciated!
     
  47. o1o101

    o1o101

    Joined:
    Jan 19, 2014
    Posts:
    639
    How performant are world space UVs compared to regular? (Targeting Open GLES 3.0 Android/IOS) Also how is the Triplanar sample node in terms of performance, how much more expensive ?
     
  48. Amplify_RnD_Rick

    Amplify_RnD_Rick

    Joined:
    Feb 15, 2016
    Posts:
    528
    Regular tangent space uv's comes directly from your vertex data so there's no calculation cost over the shader. World space UV's usually is a bit more expensive since there's always some type of calculation over the shader to get them.

    The Triplanar node suffers from what I've described earlier, a set of World/Object Space UVs needs to be calculated, with a more added cost that you'll need sample the texture multiple times ( for each of the planes ). So, in sum, it is a bit expensive but shouldn't cause any performance hit if used sparingly.
     
  49. ColtonKadlecik_VitruviusVR

    ColtonKadlecik_VitruviusVR

    Joined:
    Nov 27, 2015
    Posts:
    197
    Hey @Amplify_RnD_Rick,

    I have had an issue with a snow shader in our PS4 port for approx 2 months now (Snow is appear on the underside of objects in build but not in editor). I had a dialogue with @Amplify_Ricardo regarding this and he said the dev team would look at it. Since then I have sent direct messages but it has been radio silence.. Is there anyway you can check on the progress of this?

    Cheers,
    Colton
     
  50. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,389
    Hey there, sorry for the radio silence on my part; I was actually away for Gamescom and PAX West, should return to normal soon.

    Last I checked, your ticket was on our queue, I will try to find additional details.

    Apologies for the inconvenience.