Search Unity

Feedback Wanted: Shader Graph

Discussion in 'Graphics Experimental Previews' started by Kink3d, Jan 10, 2018.

Thread Status:
Not open for further replies.
  1. HeadClot88

    HeadClot88

    Joined:
    Jul 3, 2012
    Posts:
    690
    Why not make a shader sub graph a separate asset that we can reference inside unity? Here is my reasoning for this.

    Reuse existing shader sub graphs opposed to having one monolithic sub graph that cannot be reused and would have to be remade in another shader graph. Unreal does this to great effect with Material Functions.
     
    Lars-Steenhoff likes this.
  2. Grimreaper358

    Grimreaper358

    Joined:
    Apr 8, 2013
    Posts:
    534
    Sub Graphs are already separate files you can use in other projects. Each Sub graph is stored as an "asset" (.ShaderSubGraph file)

    upload_2018-1-18_21-14-48.png
     
  3. JohnML

    JohnML

    Joined:
    May 24, 2013
    Posts:
    11
    Hmm, still no Shader Graph menu showing up for me in 2018.1.0b3. I create a project, then get a bunch of errors in the console (see attached). I'm not on VPN either. Any ideas?
     

    Attached Files:

    manran likes this.
  4. michidk

    michidk

    Joined:
    Feb 18, 2014
    Posts:
    4
    Is it possible to create non-PBR shaders with this?
     
  5. Tim-C

    Tim-C

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    2,093
    We have an unlit master node, we will be adding a -blinn-phong also
     
    Gekigengar likes this.
  6. Ziboo

    Ziboo

    Joined:
    Aug 30, 2011
    Posts:
    290
    Would it be possible to have BlendingMode be set on the material like the Standard Unity Shader (Checkbox), instead of on the Shader ?

    It's the same issue I have with AmplifyShaderEditor, I did a UberShader for our project and I need to update 3 variants each time depending blending mode.
     
  7. Dev_Sebas

    Dev_Sebas

    Joined:
    Jul 10, 2014
    Posts:
    14
    Hey this is great!
    See the footprint of the custom shader would be awesome, like see who much performance cost it takes.

    Thanks
    Seb
     
  8. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,366
    @Tim-C Oh, i'm not sure if it's already there or not. Can we have a debug info for the shader graph for instruction count, alu count, etc ?
     
  9. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    25,348
    Small request:
    It would be nice if there is a render mode similar to overdraw that shows shader complexity as a colour spectrum within scene view as artists can have trouble tracking down problem shaders. Sorry if this isn't the area of shader graph feedback (not sure).
     
    Gekigengar likes this.
  10. HeadClot88

    HeadClot88

    Joined:
    Jul 3, 2012
    Posts:
    690
    Ok my bad. Looks like I need to use the system more.
     
  11. Player7

    Player7

    Joined:
    Oct 21, 2015
    Posts:
    1,383
    So I thought it was a bit odd the 2018.1 board was completely void of shader graph discussion seeing as it should be getting a lot more talk.. and I forgot about this board...anyway I found the thread.. some of you may stop reading here :p

    Is that what is happening? I haven't really taken a look at SRP at all, I'm out of the loop hell it might not even be like the hlsl shader code.. I wouldn't know its not my area. But if it isn't and users are going to be pushed towards only using the shadergraph then that seems like going from one extreme to the other. While never ever supporting both at the same time. :/

    As my first thoughts on looking at this was open a shadergraph file.. expecting to see something like shader code..

    I really believed that the Unity approach to a building a shader graph tool would be doing it from the position that a user can finally write or load a shader written in code and view/work with it in a nodegraph view aswel ... with the shader code transformed into visual nodes (at least as far as what is supported in features the node graph can handle) I mean that would have been the perfect ideal. Amplify Shaders don't complete this, the downside is you can't open a shader that was written outside of Amplify... maybe never will. I always hoped the built in Unity shadergraph version would have been able to do so, I guess the SRP stuff changes things as they won't be supporting the old shaders?.. Anyway the Amplify output shader from the nodegraph has a top section that is your normal looking shader code, readable and mostly usable for people who are more familiar with working in shader code, and a bottom half section where it stores the nodegraph layout details that the user had left etc...

    Why you no do the same...

    Your shadergraph file is just a mess of json data ..not even the human readable kind of json either.. just very verbose json data with \\n newline strings all over it... you might aswel just save it as binary imo, its unsightly and I should never have opened it .. my bad :) I am dissapointed in that aspect. Probably pointless asking if you are going to offer a shader export? I always liked the idea of having a nodegraph of spaghetti noodle mess and modifications transformed into pretty code and vice versa :) At some points they cross over where its easier to work with one over the other, like more visually with nodegraphs but other times just easier to go in code view to work with.

    Anyway as far as the editor goes though I guess its wip, (if you want to know what to support in UX/UI a lot user suggestions people have given to Amplify shader would apply here ) I had some minor bugs with it visually upon testing it earlier, some of the lines going into the last output node just became detached from it and you could zoom in/out and they just remain unnattached but still looking like they were attached, couldn't replicate again after opening another shadergraph and didn't screenshot it. I guess it will do and will see how this new SRP stuff goes.. ultimately driven to use whatever is going to be supported with extra content, training and really what allows for better performance in games.

    Right now Amplify shaders is still nicer..

    Not disappointed as its finally being built in and will continue to get better right :)
     
  12. Grimreaper358

    Grimreaper358

    Joined:
    Apr 8, 2013
    Posts:
    534
    Would be cool if there was a quick way for people to export shader graphs as shaders for those who want to write code. For now this is the way

    upload_2018-1-19_21-39-15.png

    Also you will be able to extend the shader graph with custom nodes (Was also mentioned in an earlier post)
     
    Player7 likes this.
  13. manran

    manran

    Joined:
    Jan 30, 2014
    Posts:
    34
    Same situation here
     
  14. SniperEvan

    SniperEvan

    Joined:
    Mar 3, 2013
    Posts:
    161
    Last edited: Jan 21, 2018
  15. difra

    difra

    Joined:
    Oct 29, 2016
    Posts:
    3
  16. Kustuk

    Kustuk

    Joined:
    May 29, 2016
    Posts:
    8
    hello, I just installed 2018.1b3 and there no any Shader Graph option anywhere
     
  17. JakubSmaga

    JakubSmaga

    Joined:
    Aug 5, 2015
    Posts:
    416
  18. Demkeys

    Demkeys

    Joined:
    Nov 14, 2014
    Posts:
    30
    So I have a ShaderGraph named MyShaderGraph01. Here's a screenshot of it:
    screencap.png This works perfectly fine.
    I created a ShaderSubGraph called MyShaderSub-Graph04 and put all these nodes (except for the ShaderSubGraph you see at the bottom) into MyShaderSub-Graph04 and hooked it up to the SubGraphOutputs node. That's shown in this screenshot:
    screencap2.png

    Then I brought MyShaderSub-Graph04 into MyShaderGraph01 and tried to hook it's output to the Albedo input of the PBR Master node. It doesn't seem to be working.
    I've tried two ways of creating the MySubShaderGraph04.
    1. Select all the nodes that I want to put into MyShaderSub-Graph04, right-click, and click Convert to Sub-Graph.
    2. Select all the nodes that I want, right-click, Copy. Then create a ShaderSubGraph from the Project Panel, open it up in the Shader Editor, Paste the nodes in there, and hook it up to SubGraphOutputs.
    Neither method seems to be working. But the nodes on their own, without using a ShaderSubGraph seem to work just fine.
    Any idea what's wrong?
    Do let me know if you need more info.
     
  19. Andy-Touch

    Andy-Touch

    A Moon Shaped Bool Unity Technologies

    Joined:
    May 5, 2014
    Posts:
    1,009
    Hey everyone!

    I put together a small library of Shader Graph examples for 2018.1 beta users to dig into and experiment with!

    Screen Shot 2018-01-19 at 15.41.22.png

    https://github.com/UnityTechnologies/ShaderGraph_ExampleLibrary

    I will be adding more examples as the tool progresses in development, so if you have any requests then please send them my way! :)
     
    ThaiCat, hwaet, Alverik and 13 others like this.
  20. freedomize

    freedomize

    Joined:
    Aug 6, 2015
    Posts:
    30
    It would be nice if you will create a toon shader with/without the outline (with the ability to adjust its thickness and colour).
     
    chiapet1021 likes this.
  21. freedomize

    freedomize

    Joined:
    Aug 6, 2015
    Posts:
    30
    Also I would really like to see the implementation of the "X-Ray" shader. Shader that shows the player's contour filled with solid color, when the player is not visible behind another object.
     
  22. Andy-Touch

    Andy-Touch

    A Moon Shaped Bool Unity Technologies

    Joined:
    May 5, 2014
    Posts:
    1,009
    To implement the outline effect in the way that 'most' people do it in Unity would require a node to offset the vertices; Shader graph doesn't currently support this. Ill add this example when it is possible to do. :)
     
  23. Andy-Touch

    Andy-Touch

    A Moon Shaped Bool Unity Technologies

    Joined:
    May 5, 2014
    Posts:
    1,009
    Creating an effect like this probably isn't possible yet (Although, I haven't attempted it), however the fantastic 'Makin' Stuff Look Good' Youtube Channel has a brilliant tutorial on how to create this kind of effect (And even supplies an example project you could modify):
     
    Blitzkriegmlg, Alverik and freedomize like this.
  24. Player7

    Player7

    Joined:
    Oct 21, 2015
    Posts:
    1,383
    Some good 'wireframe shaders' are always handy to have around.
     
  25. Andy-Touch

    Andy-Touch

    A Moon Shaped Bool Unity Technologies

    Joined:
    May 5, 2014
    Posts:
    1,009
    Do you have an example screenshot of what you are thinking of? :)
     
  26. Player7

    Player7

    Joined:
    Oct 21, 2015
    Posts:
    1,383
    Well is plenty of examples screenshots just searching wireframe shaders.. https://github.com/Chaser324/unity-wireframe or this https://forum.unity.com/threads/wireframe-shader-the-amazing-wireframe-shader.251143/ ..as many features as possible, with variation types to pick apart and reuse would be nice..

    or basic as options go, just something that takes texture, has control for face color to overlay ontop of texture, and wireframe color... maybe a special node option could be added.. I dunno.. noticed it was something amplify shaders don't have an easy option yet for either... they are always a nice effect to have for geometry in loading, option screens etc.
     
    JakubSmaga likes this.
  27. Thibaud_SERRE

    Thibaud_SERRE

    Joined:
    Jun 15, 2017
    Posts:
    4
    I'm actually working with ShaderForge and in fact there is not much you can do to apply effect on the edges of the model (like the Wireframe @Player7 was talking about).

    Also a shader who will "analyse" your model and apply effect on hard edges (or edges superior/inferior to X°) would be really nice. I haven't seen anything like this in both ShaderForge and Amplify.

    I don't think something like this is possible in Shader Graph for the moment, I'll try tonight.
     
  28. Andy-Touch

    Andy-Touch

    A Moon Shaped Bool Unity Technologies

    Joined:
    May 5, 2014
    Posts:
    1,009
    It looks like both those examples you sent me are created using Geometry Shaders; I don't think the same functionality exists in Shader Graph currently. However, there are plenty of free public Wireframe Shaders to use so you don't need to wait for Shader graph to make one for you. :D
     
  29. Player7

    Player7

    Joined:
    Oct 21, 2015
    Posts:
    1,383
    Well hopefully it does support them it would be a good addition :)
     
  30. KevinMaxon

    KevinMaxon

    Unity Technologies

    Joined:
    Oct 11, 2017
    Posts:
    12
    Sorry I can't be more helpful and thank you for the detailed report.

    Unfortunately "what's wrong" is just that subgraphs are very very broken in this beta release :X
     
    Demkeys likes this.
  31. Onigiri

    Onigiri

    Joined:
    Aug 10, 2014
    Posts:
    76
    I have a couple of questions about future implementation of shader graph in hd render pipeline.
    Do you plan more generic output for surface and displacement(and maybe volumetics) without reference to a particular shader/master(like in houdini or blender)
    Do you plan to add bsdf nodes(diffuse, glossy, subsurface etc) into shader graph with ability to mix and layer them?
    I wonder if the partitioning into shaders, shader graphs and materials will remain. I think material and shader graph is just an interfaces for shader which can be merged together.
    Also, if the shader graph is the main tool for authorizing shaders in hd render pipeline, i think that you can just convert all the shaders into the nodes and remove shader selection option from the material inspector, am i right?
     
  32. quixotic

    quixotic

    Unity Technologies

    Joined:
    Nov 7, 2013
    Posts:
    66
    What do you want to pin? Pin a specific node to a location? How would you want to be able to organize things?
     
  33. Grimreaper358

    Grimreaper358

    Joined:
    Apr 8, 2013
    Posts:
    534
    I was thinking of small pins to reroute the node connections when the graph gets complex.

    Something like this

    No Pin
    upload_2018-1-22_21-22-31.png

    With Pin
    upload_2018-1-22_21-23-21.png
     
  34. recursive

    recursive

    Joined:
    Jul 12, 2012
    Posts:
    583
    The ability to set the type of curve for the pin would be fantastic.
     
    Gekigengar likes this.
  35. dadude123

    dadude123

    Joined:
    Feb 26, 2014
    Posts:
    787
    I'm also missing pins. Maybe not just a single dot, instead a tiny block (like a fully collapsed node already looks).
    Also the ability to set a comment!

    Like in sf, where you can add a "relay" node that displays a text above it as comment.
     
    Gekigengar likes this.
  36. Demkeys

    Demkeys

    Joined:
    Nov 14, 2014
    Posts:
    30
    I have two questions:
    1. So, back when I was learning ShaderLab, there was this trick that I'd discovered with which I could have multiple copies of the mesh rendered with offset positions to create an interesting effect. I don't remember how I did it but does anyone have any ideas for how I could do that with the current set of tools provided in the Shader Editor?
    2. Back when I was learning ShaderLab, I remember there being an issue with debugging. Like we didn't have any way to display values of variables, so we would have to use alternate methods. Is it possible to add a node that just displays the value of whatever is connected to it's input, just for debugging purposes? I can understand that this would have to accommodate for all types of inputs and I think the Preview Node already does this, but to a certain extent. For example, I've noticed that with Float values, it represents them as a color between black and white. But the value is clamped between 0 and 1. So if the value goes above 1, it's not shown. If the Preview Node could be further improved to preview all types of inputs, and represent them exactly as they are passed in instead of a color, gradient, etc. that would be great.
     
  37. Invertex

    Invertex

    Joined:
    Nov 7, 2013
    Posts:
    890
    Was about to come here to suggest this! Glad to hear it's being worked on, as one of the biggest complaints people have about node generated shaders is how messy and inefficient they can be due to often having to take a roundabout approach to something that could have been done in a simple bit of code, makes the tool a lot more attractive to people who write shaders as well. Hope it goes well!

    Also, Shaderlab used to let use define a default color for an unassigned texture input, (white, gray, black), is this a feature that will be added to the graph? Or are we instead now expected to just set our own default texture reference as it seems to allow?
     
  38. Kink3d

    Kink3d

    Unity Technologies

    Joined:
    Nov 16, 2015
    Posts:
    45
    @Invertex This is something I'm currently trying to fix. The complication is that when a property is connected to the Texture input of a sampler thats what injects the property declaration into the shader generator. This means that we need to make the sampler node apply its default colour (this also includes default bump support to unassigned textures) down the graph hierarchy to the Property. This kind of logic doesn't currently exist in the graph (its all upstream).
     
    Invertex likes this.
  39. NFeelone

    NFeelone

    Joined:
    Oct 25, 2014
    Posts:
    3
    Can I make Post Process Imagebased shader right now with shadergraph ?
     
  40. Erwin32

    Erwin32

    Joined:
    Feb 26, 2014
    Posts:
    3
    Tried the shader graph yesterday it left me wondering if it will be possible to use for 2D sprite shaders? If it is possible already I haven't figured out how.
     
  41. JakubSmaga

    JakubSmaga

    Joined:
    Aug 5, 2015
    Posts:
    416
    When is Shader Graph going to be available via Package Manager? (The HDRP one)
     
  42. Ryan-Gatts

    Ryan-Gatts

    Joined:
    Sep 27, 2012
    Posts:
    54
    Hey, thanks for pushing out this test version. I'm testing the current build on behalf of a bunch of artists here at FXVille, and I'm aggregating their feedback. We all use a lot of different editors like this in a lot of different engines; I hope our feedback will be useful.

    Bugs:

    1. Shift clicking always adds to the selection, but shift drag selecting toggles the selection (that should be for ctrl).
    2. F is the standard "focus" keyboard shortcut in every other context in Unity. Having it also be A in the Shader Graph context leads to unintentional input.


    Feature Requests:
    1. Keyboard Shortcuts for placing nodes. The current implementation is slightly more cumbersome than in Unreal where you right-click and immediately start typing a node name (currently in Unity, you have to right-click, then pick the Create Node option from the list, which is unnecessarily slow for the primary user action). This could be as simple as the Houdini method of hitting Tab to immediately enter a node-placing context. Or better yet, you could implements a set of commonly used Key+Click shortcuts like Unreal and Shaderforge do. Ideally these would be editable by the end user and arbitrarily settable to most keys on the keyboard. Vectors of various lengths, basic math, shader properties, and some vector operations are good candidates for shortcuts.
    2. Rearranging the order of Properties is a must.
    3. HDR, toggle, slider, space, etc. flags for properties. Important for making nicely formatted material interfaces, one of the key strengths of writing shaders in Unity.
    4. Vertex World Position Offset.
    5. Vertex Shader Pass Output Pin. Some calculations only need to be done in the vertex program in order to save on complexity. Unreal solves it with a concept of "Customized UVs" which serve as a way to isolate some calculations to the Vertex Program and pull the results later in the Fragment Program.
    6. Light and Camera Settings in Preview Window. It would be nice to be able to change background color, load post-process settings, rotate the preview light, preview fog or soft particle behavior, etc.
    7. Performance monitor. Maybe even warnings for particularly expensive nodes. Instruction count is always useful.
    8. Preview on billboard. I know that this very VFX specific, but VFX artists author more unique shaders than anybody else and it would be really helpful to be able to test shaders on camera-facing geometry like a particle will be.
    9. Extra inputs into nodes that don't care about order of execution like Mult and Add would be welcome. I'm often stuck stringing lots of contributing lighting functions or masks together with multiple adds or multiple mults in a row. Shaderforge handles this more elegantly than any other editor I've seen.
    10. It would be great to have Lerp's default connection be T -- not A. Most of the time when pulling a pin off of a node and starting a lerp, I want that node to be the T input.

    Node Requests:

    1. Static Switches or Multi-Compile. Shaders should be able to opt into some of their features like Soft Particles or Normal Mapped Specular. This is best handled by having some nodes behind a static Swtich Node.
    2. Light Direction.
    3. Bumped Normal. If you want to do any lighting or fresnel calculations, you have to do per-fragment normal calculations that are redundant with the calculations already being done inside the HDR shader. (And using Combine Normals with a normal map and vertex normals, transformed to the same space, gives unexpected results)
    4. Reflection Vector. Part of phong reflection calculations.
    5. Half Vector. Part of blinn reflection calculations.
    6. Camera/View Position. Part of fog and various camera effects.
    7. Append. Combines two variables, sticking the second input into higher dimensions on top of the first input.
    8. Maybe a custom code node? Not sure where this is meant to be implemented, but there's no way to call ShadeSH9 or any other particular lighting functions.
    9. Reroute or Pass-through nodes can be very useful for organizing a large material.
    10. Set & Get. Again, Shaderforge does this better than anyone else. Being able to solve something in one section of the graph, assign it to a variable, and call it in a different section is very useful and helps keep ideas and shadergraphs clear and organized.
    11. Comments. There doesn't seem to be any way to group several nodes into a comment or comment an individual node. This is really important on longer and bigger projects where multiple artists work together.

    Things that we weren't quite sure about:
    1. Channel Mask does not work the way I expect. I would expect it's primary function would be to use only some dimensions of a vector as a lower dimensional vector. Currently, if I input a V3, I get a V3 back even if I ask for just R. There's no way to ask for a V2 from a V3, or pick which channels you want to use.
    2. Combine Vector only lets you make a V4. It also doesn't take a V2 or V3 as meaningful input -- only using the R. There's no way I can find to construct a V2 or V3 out of arbitrary inputs.
    3. Texcoords/UVs are only V2. While this would typically be fine, these need to be V4s in order to receive data from the Custom Vertex Streams in Shuriken.
    4. The output node system is a little cumbersome to use. I am unsure if I am able to, say, have an unlit additive blend output (it doesn't seem so at the moment). Also I can have an arbitrary amount of output nodes, but there doesn't seem to be a way to designate one as the actual output. The terminology is a bit different than I'm used to as well, with "Overwrite" being what I think is usually called Opaque or Solid.
    5. Vectors and Directions should be all called either one or the other, for ease of searching. It can be hard to find the particular vector or direction I'm looking for without knowing what the node was called, as e.g. View Direction vs. Normal Vector.
    We are very excited to see this implemented in Unity! Sorry if the requests got a little overly granular, I figure the time for feeback is as early as possible, and it would be great to solve even some shader editor problems that every other engine has!
     
    mh114, NitroN, dadude123 and 3 others like this.
  43. Grimreaper358

    Grimreaper358

    Joined:
    Apr 8, 2013
    Posts:
    534
    This might be early but will there be support for deferred decals in the shader graph? Maybe its something only HD pipe will be able to have opposed to LW?
     
    AntonioModer likes this.
  44. Kink3d

    Kink3d

    Unity Technologies

    Joined:
    Nov 16, 2015
    Posts:
    45
    Wow thats a lot of points. Thanks. Will try to answer as best as we can.

    Forwarded this feedback to out UX team who work on the shortcut keys

    Noted, we have a task to discuss this, but it likely won’t be done for the first release. We have fixed 2 clicks per node create for the next release though (space key shortcut)

    In development now

    In development now

    Hoping to have this done for v1, but depends on how we track.

    We have a plan on how to handle this, but it won’t make V1, it’s on the roadmap.

    We are working out what further features we want to support in the main preview window. Dont expect to see any of these in V1, but were discussing options.

    Again, we have plans for this. We want to make sure we solve this in the correct way though that is actually helpful to users of all ability levels.

    This won’t come for v1, but the requests are noted.

    This is on our TODO for post 1.0 release.

    This is a good idea, but to change this will break existing graphs…. I think we might be able to do this as we are not final release.

    This is on our roadmap. It should be noted that we will not be supporting multi compile in the shader graph as SRP is already creating a large amount of shader variants. We will however be supporting static branching based on shader feature.

    In the graph context there is no concept of ‘light’ you could have one of 20 lighting models connected in the back end. For example in deferred you use a light accumulation buffer, in LW we do multiple lights in a pass. The shader graph is mostly for material description. Adding lighting support and making it work across all possible backends isn’t something we can guarantee. As an engine unity doesn’t have concepts like ‘main light’ or similar. It really means that if you want this kind of behaviour you’ll need to make a custom render pipeline with custom nodes (that would only work on that given pipeline).

    Im sorry I dont think I understand exactly what you want here. Could you elaborate?

    Reflection vector requires Light Direction to calculate therefore the answer is the same as above. We do however have a Reflection node (Math > Vector > Reflection) which would calculate this given the correct light direction.

    Half vector is just normalize(lightDir + viewDir). Therefore the answer is the same as it is for Light Direction request.

    We have this already. See Camera node in Input > Scene > Camera

    This is on our todo for post 1.0

    This is on our todo for post 1.0

    There are plans to allow adding “pins” in a connection between two nodes. These will be used to reroute connections as the user desires. This, however, will not make version 1.0.

    This is on our todo for post 1.0

    This is on our todo for post 1.0

    Right now we have no concept of a dynamic output length based on certain “rules” within the node. This is part of the same work that allows us to ship an Append node. When we have this we will add a second output to the Channel Mask node that only contains the non-masked input channels.

    This is somewhat solved by future Append node depending on use case. You can truncate the Combine nodes output V4 if you want to construct from V1s, otherwise you will need Append to construct arbitrary vectors.

    Originally we used V2 for texcoords because of the way HD pipeline packs its interpolators. However, lots of people have been requesting this and with good reason. We will change to allow V4 texcoords (in some manner) and make the necessary adjustments to the HD pipeline to support this.

    Yeah this is an issue, the graph should only support one output node. We need to add tooling around this still.

    Good points here, we will try and address
     
    Last edited: Jan 25, 2018
    dadude123 likes this.
  45. JakubSmaga

    JakubSmaga

    Joined:
    Aug 5, 2015
    Posts:
    416
    Hi @Kink3d Is there a public roadmap for SG?
     
  46. Kink3d

    Kink3d

    Unity Technologies

    Joined:
    Nov 16, 2015
    Posts:
    45
    There isnt currently as it was a secret project. But maybe there should be now, will speak to the team.
     
    chiapet1021 and JakubSmaga like this.
  47. Grimreaper358

    Grimreaper358

    Joined:
    Apr 8, 2013
    Posts:
    534
    Will an "If" node make it in soon?
     
  48. Kink3d

    Kink3d

    Unity Technologies

    Joined:
    Nov 16, 2015
    Posts:
    45
    If node functionality is implemented in latest on Github. Expect to see it in the next package release. Note that "If" functionality is two nodes in our graph. This allows you to use the same logic to branch based on an arbitrary toggle (hidden, exposed property, another condition like "Is NaN")

     
  49. Andy-Touch

    Andy-Touch

    A Moon Shaped Bool Unity Technologies

    Joined:
    May 5, 2014
    Posts:
    1,009
  50. Ryan-Gatts

    Ryan-Gatts

    Joined:
    Sep 27, 2012
    Posts:
    54
    Really, thank you for taking the time to respond to all of that! It's reassuring to see you guys being so participatory in the feedback thread!

    So, when doing something like a Fresnel Calculation on a shader that also takes a normal map, I have to do the tangent space conversion and combine the normals manually. These calculations seem like they would be redundant with whatever normal map calculations the PBR Master shader does with its own normal map input.

    upload_2018-1-25_18-28-39.png

    If I don't do the normal map transform and normal blend, I miss out on the pixel normal information and end up with a smooth, per-vertex fresnel.
    upload_2018-1-25_18-32-10.png

    Both of these results might be things you want to do, so having either a toggle or another node that outputs the pixel normal is probably ideal.

    Also, I was confused before when I said that the Normal Blend node was giving unexpected results. The actual unexpected result was coming from transforming my normal map from Tangent Space to World Space (which would make sense since I authored a tangent space normal map). That gives very strange results back. On the other hand, if I transform the normal map from Object Space to World Space, everything works as I would expect. Is this expected behavior?
     
Thread Status:
Not open for further replies.