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](http://www.keenleveldesign.com/pimp/protools/shaderfusion/shots/pb03/ui02.jpg)
![exampleshaders01.jpg](http://www.keenleveldesign.com/pimp/protools/shaderfusion/shots/pb01/exampleshaders01.jpg)
![earthcomp01.jpg](http://www.keenleveldesign.com/pimp/protools/shaderfusion/shots/pb01/earthcomp01.jpg)
![shellgrass01.jpg](http://www.keenleveldesign.com/pimp/protools/shaderfusion/shots/pb01/shellgrass01.jpg)
Replies
Downloading now
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)
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:
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.
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).
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.
Are you adding filters like saturation, sharper, blur, Contrast/ Brightness?