Home Technical Talk

ShaderFusion (node based shader editor for Unity) released!

polycounter lvl 18
Offline / Send Message
commander_keen polycounter lvl 18
I got my shader editor working with Unity3 and added some finishing touches. Its still not completely done so reporting bugs and suggestions would be great.

NOTE: Requires Unity3.

Heres some features:
*Works with the free version of Unity.
*Works with both forward and deferred rendering (although deferred is strongly recomended).
*Simple interface and and optimized workflow. Shader graph data is stored within the shader file.
*Powerful enough to make complex shader model 3 shaders, while optimized enough to make advanced shader model 2 shaders.
*Supports multiple blending modes.
*Template based so you can make your own shader templates, lighting templates, and nodes.
*Over 60 builtin nodes and more to come.

And some screenshots:
ui02.jpg

exampleshaders01.jpg

earthcomp01.jpg

shellgrass01.jpg

Replies

  • ZacD
    Options
    Offline / Send Message
    ZacD ngon master
    You could of released this a week ago when I spent 20 hours trying to figure out how to write my own shaders :P

    Downloading now :D
  • CrazyButcher
    Options
    Offline / Send Message
    CrazyButcher polycounter lvl 18
    nice work, while I am not fond of the all visual editors for doing stuff like a*b, but anyway, my main suggestion would be
    ICONS! or at least user colors for nodes or so.

    e.g it would be much faster to differentiate between "incoming data" (textures, uv coords...) and "outgoing data" (nodes that only have inputs)
  • cman2k
    Options
    Offline / Send Message
    cman2k polycounter lvl 17
    FANCY! congrats on finally releasing this dude!
  • felipefrango
    Options
    Offline / Send Message
    felipefrango polycounter lvl 9
    YES! Finally, been waiting for this since I first saw it, congratulations man, this looks powerful.
  • Neox
    Options
    Offline / Send Message
    Neox godlike master sticky
    you crazy son of a bitch! very nice and about time for something like that for unity :)
  • commander_keen
    Options
    Offline / Send Message
    commander_keen polycounter lvl 18
    I uploaded a new version:
    Download ShaderFusion Public Beta 02

    Heres the change log:
    *Fixed U3B5 bugs.
    *Fixed VertexColor node.
    *Added SceneDepth node - Get the depth of the scene behind the surface that is being rendered.
    *Added DepthBlend node - Get a blend value based on the scene depth and the current surface depth. Good for fading water out as it gets closer to a solid surface.
    *Added SceneColor node - Get the color of the scene behind the surface that is being rendered.
    *Added some code to clean up node creation (InputValue(inputIndex:int) and InputValueOrThis(inputIndex:int, defaultValue:String)).
    *Added WorldNormal node because transforming from object to world in the frag shader seems to be broken in the current unity version. This is cheaper anyway though.
    *Added Clamp node - clamps any datatype to a range of 0-1.
    *Fixed a bug that would cause the shader files to add extra blank lines to the file every time it was saved.
    *Added ScreenPos node and changed the functionality of ScreenUVs node. Before ScreenUVs would return the position in screen space and need to be divided by ScreenUVs.w to give correct screenspace uvs. Now it gives correct uvs directly. ScreenPos does what ScreenUVs used to do.
    *Removed LightColor node.

    You should be using Unity3 Beta5 for this version. Other Unity versions will have problems.

    The main new stuff is the scene color and depth access. Heres some water shaders I made with them:
    water01.jpg
  • Snipergen
    Options
    Offline / Send Message
    Wauw! This is really great man. Thank you so much. Unity really needed this.
  • thomasmahler
    Options
    Offline / Send Message
    thomasmahler polycounter lvl 14
    They should totally hire you and use this as a default in Unity and not their crappy mat editor shit that they've got going on right now - this is really cool looking!
  • hobodactyl
    Options
    Offline / Send Message
    hobodactyl polycounter lvl 18
    Thank you so much man, great work, I'm definitely checking this out tonight! Awesome of you to release it for free :D
  • felipefrango
    Options
    Offline / Send Message
    felipefrango polycounter lvl 9
    When I import the package into my project, all materials are fucked up, missing shaders and, consequently, textures. Am I doing something wrong?
  • commander_keen
    Options
    Offline / Send Message
    commander_keen polycounter lvl 18
    Are you using the Unity3 beta? Specifically beta5? It wont work with unity 2.x. If your importing it and not getting texture assets at all (they would be in "DemoTextures" folder). then maybe theres some problem importing.
  • felipefrango
    Options
    Offline / Send Message
    felipefrango polycounter lvl 9
    Yeah, I'm using beta 5. The textures import alright, but the materials are all undefined. I've tried reimporting several times but it's always the same and I really don't know what I'm doing wrong. I'll try setting up a new project and doing it again.
  • Axios
    Options
    Offline / Send Message
    Axios polycounter lvl 10
    Mild necropost, I know, but I was wondering if there was anything like a Static Switch Parameter in this? Just started using it recently, and it's fantastic, great job. I would just like to be able to toggle shader features on and off in the material settings with a check box. Any tips on doing that? Thanks
  • commander_keen
    Options
    Offline / Send Message
    commander_keen polycounter lvl 18
    You could use a Lerp node to toggle between 2 colors and set the blend value to either 0 or 1 (using a ParamFloat node so its accessable in the material properties). Of course thats a runtime calculation so its not as optimized. Otherwise you would need to create a duplicate of the shader and change the graph manually.

    UDN says that their Static Switch Parameter is compile time which means it creates a duplicate shader for each state, so its basically doing that for you.

    EDIT: Unity actually does have an undocumented feature similar to this, but you have to set the states through code, It could be very useful for a lot of things so I should look into it.
  • Farfarer
    Options
    Offline / Send Message
    Setting material states via code in Unity's really easy;
    http://unity3d.com/support/documentation/ScriptReference/Material.html

    Could just set up the shader to have a lerp as Keen mentioned and set it 0 or 1 via script as you please.

    Or switching material entirely;
    http://unity3d.com/support/documentation/ScriptReference/Renderer-material.html

    And do it in a UE3 sorta way (two shaders, one for each state).
  • commander_keen
    Options
    Offline / Send Message
    commander_keen polycounter lvl 18
    Talon, the documentation doesnt show a set of functions used for accessing "multi compiling" variations. The unity water example uses it though, it basically makes multiple versions of a shader at compile time for each state you check for in it, then you can use those material functions to automatically swap between those hidden shader variations. That way you dont have the overhead of using dynamic lerps and having to calculate everything for both states.
  • Farfarer
    Options
    Offline / Send Message
    Yeah, I should've been clearer - I meant create two shaders and switch them in/out via script.

    Was more in response to Axios's post than yours, I just happened to have the links to the documentation handy as I'd been playing with similar stuff :)

    Although looking at it, you could maybe make a multi-pass shader - one pass for each version - and toggle the correct/incorrect pass on/off via script. Could be easier to manage than having two shader files.
  • badmouse
    Options
    Offline / Send Message
    badmouse polycounter lvl 8
    Looks realy cool, i wii tryout it tonight :)

    Are you adding filters like saturation, sharper, blur, Contrast/ Brightness?
Sign In or Register to comment.