UNOShader UNLIT - Property toggler inside the material editor


[
click image to see demo

UNOShader UNLIT - Property toggler inside the Material Editor

This is a material editor extension that creates and toggles between shaders on the fly.
It uses shader model 2.0 as a base and it was mainly designed to be used for mobile devices.

You can toggle through these material properties:
Color | Diffuse | Decal + Tint | Reflection | Rim | Lightmap | Emission | Vertex Colors | Outlines (normal, varied width)

You can enable/disable these settings :
Backface Culling | Z Sorting | Fog

Shadows :
Enable realtime shadows and also have the ability to choose a custom shadow color

UV motion scripts:
Scroll and rotate UVs scripts are built in Material Editor UI

Render queue order:
Adjust render queue order built in Material Editor UI

Other:
Transparent master slider | transparent Edges (normal/inverted) | HDR compatible | Blend Ambient/Main directional light

— Current Version 1.3 -----------------------------------------------
Added support for 4.6 to 5.0 upgrade (read text file for instructions after upgrading)
Transparent Edges
New compact UI when toggling property creator

— Forum chat -------------------------------------------------------
Hi everyone,
I’m an artist and I have been learning programming as of late and while working in unity projects I kept writing simple shaders all the time to cover many uses. I got fed up and wanted to write a catch all UI that can toggle through shaders and thats what this tool is, hope you like it.

I know some of you have been using UNOshader and we’ve chatted through email, you have helped me make this a more polished tool and I just wanted to express a thank you! and I hope we can use this section for more of that.

Also if you don’t mind I would love to see screenshots of some of the stuff you guys are doing with it. I will be putting up my site soon and I wanted to created a gallery of users using UNOShader :slight_smile:

Please use this space for bugs, report any problems or features you would like to see in the future.

Cheers](Unity Asset Store - The Best Assets for Game Making)

Yeaah. Bookmarked. :sunglasses:

Purchased. Is there any docs for your shaders, or any plans to make one in future? Btw, can I use one Material to control different Emission parts, like give different Emission colors to different Parts of the body, within 1 single Material, to save drawcalls?

yeah, i m not buying yet cos read in reviews theres no docs. Pls add some and make the website work pls.

i really like this shader as it save performance, it work fine on ois so far but got few graphic bug on windowsphone. could u investigate that issue?

Hi everyone sorry for being absent last month was pretty crazy with work and normal life stuff. Sorry if my responses are super late but here they are for others that might be interested, and more some updates as well.

Site and doc is up and running, LIT version is getting close to being done I will create another thread for it soon.

For docs go here http://www.unoverse.com/unoshader link from inside UNOShader should work as well.
No you can not control individual colors independently, but your texture can have what ever colors you want and you can use the Alpha channel of the texture to determine transparency.
If you are looking for a shader that has the ability to control independent emission colors in combination with other textures textures let me know, I don’t think it would be that hard to write one real quick for you.

When you get a chance could you send me some screenshots of the errors you are getting so i can look into it, thanks much :slight_smile: I don’t have a windows phone to test my stuff.

1 Like

Modify Source Code Plz.

public void getRenderQueue()
{
//queueLast3 = currentMat.renderQueue % 1000;
queueLast3 = queueLast3 % 1000;
}

Hey,
I use that line to retrieve the current material renderQueue order so I can display it in the UI
The line adjusted above doesn’t call for anything.

Is the renderQueue messing something up on your end, could you explain this adjustment a little bit, so I can address it properly.
Thanks =)

long time no update…is it still supported? Does it work with Unity 5.2?

Hi there, it should work on 5.2 I haven’t had any reports of not working, but you are right this plugin is due for an update.
I have been swamped with regular work but I’m off from work this whole month and this is definitely going to be receiving some love.

Thats wwesome news…what are the new features you are planning to add in?

So I have all this new features in and working. Hopefully after i do some testing I will update the store this week.
New features:

Added basic lighting support ( I know… I know… its called UNLIT )

  • In the past you could mix an ambient color ( now you have full Ambient Source Support), you now have access to the Gradient, skybox or single color now.

  • With full ambient source support you now have lightprobe support as well

  • In the past you could mix the directional light color ( now you have a full directional light with fall off)

BRDF texture ramp lookup so you can do toon like materials.

  • uses the Red Channel as fall off (fake toon effect)

  • uses the Blue Channel to create custom rim outline

  • uses the Alpha Channel to tweak the fall off ramp… (hard to explain I’ll post some samples later)

Xray Effect

  • You can use it to display silhouette behind objects, You can choose a color and transparency amount

Improved the UI

  • Sliders now have box values at end where you can punch numbers
  • Using the new compact texture picker that the standard shader uses
  • UVs sections are now collapsed to save space ( can be expanded )

Shaders are now smarter ( no need to keep hitting the “Create Shader” button)

  • On the past when you toggled shadows you had to create a new shader, now they are just toggles that are built in the shader
  • Areas that dont’ have a checkbox can be altered and toggled around without having to create a new shader

Miscellaneous

  • Outlines now support 2d cameras (choose from perspective or orthographic)

  • Reflections are now pbr centric so they behave just like the standard shader and also respect what ever is set on the Lighting Window

  • Reflections also respect probe reflections if present ( there is a limitation with shader model 2.0 that I’m still messing with)

  • New metallic slider in Reflections

  • Rim now has intensity so you can do glowing effects with it

There are other stuff but in general is more of a workflow improvement, but the toon ramp and lighting seem to really give you more options regarding effects now, I’ll post some actual materials from scene soon.

2 Likes

Wow that’s loads of features…Just last question before buy, how much performance cost with this shaders? Have you done any benchmark? Something like Unity’s Mobile Unlit vs Your Unlit with shadows etc

bump?

Well looks like we have an update. This is a very good asset. :slight_smile:

hi guys,
Sorry I did do an update, I just haven’t updated the Doc file on the main website yet. Holidays got me preoccupied.
I may have to do a quick update patch soon though. The new reflection update is more compatible with Unity 5 stuff and it respects HDR stuff, but the trade off is that the fake reflection intensity I had before looked nice (fake but nice). So I’m looking into that at the moment to see if I can add a intensity slider back on.

Idurvesh,
Sorry I have not done an intensive benchmark test comparing Unity’s unlit vs unoshader unlit, I’ve done only something very light. I don’t have many devices but to answer some of your question, I tried this on an HTC M8.

32 models 60k triangles each (diffuse, unlit, lightmap support) = 1,9 million triangles
Unity unlit - 39 fps
Unoshader unlit - 41 fps

unoshader unlit with Shadows drop to 17fps

It is probably not efficient to have 32 objects casting shadows, I’m assuming a more realistic scenario is to have your character only cast shadows and some objects around the scene receiving it. I’ll do more performance tests when I get a window of time.

1 Like

Boom looks promising…thanks for sharing benchmark…Was looking for Unlit with shadow though we opt for lightmap for performance…We will soon buy it once our need arrive for Xray and other promising features like Rim,decal …great job buddy…plz keep updating asset frequently …

Truly awesome! Great work.
What is the configuration for the absolute fastest mobile shader - all options unticked?
Is there a way to automatically change all my materials with this shader in one go?

You can do that easily by following code,

Public Material myUNOMaterial

[ContextMenuItem("Add Uno Materials"]
void AddUno(){

       GameObject[] allMaterials= FindObjectsOfType(typeof(Renderer)) as GameObject[];


foreach(GameObject t in allMaterials){

t.GetComponenet<Render>().material = myUNOMaterial;

PrefabUtility.ReplacePrefab(t, PrefabUtility.GetPrefabParent(t), ReplacePrefabOptions.ConnectToPrefab);

}

}

Drag all gameobjects into scene

add above code script to Main Camera
add desire UNO material to the “myUNOMaterial”
From Context menu (besides help icon) click “Add Uno Materials”

PS : Code is not tested so check with single prefab.

*EDIT
Edited code

Thanks idurvesh - you are a great help.
I have made the SwapShader.cs file and attached to the main camera in scene but can not find SwapShader in the Context menu :frowning:

I had to modify your script like this to get the compile to work:

using UnityEngine;
using UnityEditor;


public class SwapShader : MonoBehaviour {

    [ContextMenuItem("Add Uno Materials","SwapShader")]

    public Material myUNOMaterial;

    void AddUno(){
        GameObject[] allMaterials = FindObjectsOfType(typeof(Renderer)) as GameObject[];
        foreach(GameObject t in allMaterials){
            t.GetComponent<Renderer>().material = myUNOMaterial;
            PrefabUtility.ReplacePrefab(t, PrefabUtility.GetPrefabParent(t), ReplacePrefabOptions.ConnectToPrefab);
        }
     }

}