Dissolve Shader

1This shader is available in the Unity Asset Store. (Link)
The shader dissolves any given Object like in Borderlands the enemies are dissolving through acid and fire.
The package comes with two shaders:
Dissolve_TexturCoords:
The Shader Dissolve_TexturCoords uses the TextureCoordinates of the given Object. That gives you the Opportunity to set where the object should Dissolve first.
Dissolve_WorldCoords:
The Shader Dissolve_World Coords uses World/Object Coordinates to Dissolve the Object. This method gets rid of the Texture seams, but is not suitable for animated Objects.

Properties:
Amount – Animate this to Dissolve the Object
StartAmount – Sets the Value from witch the dissolve starts
Illuminate – Sets the Value of Illumination for the rims
Tile – Sets the tiling of DissolveSrc and DissolveSrcBump
DissColor – Sets the Color for the rims
ColorAnimate – Sets witch RGB-Value should be animated X = Red, Y = Yellow, Z = Green (Ignore W)

2

Links:
Live Demo Here
Asset Store

Video:

14 comments

  1. The dissolve shader is very cool and I have been using it for a while now, but do you think it would be possible to have a transparent object dissolve?

  2. Hey, im using unity 5 and it doesnt seem to be working, could you check it and tell me if you see why its not working or what i could do to make it work?

    1. The shader works just fine in Unity 5. The problem is the script that demos the shader.

      Just replace the content of the Timed.cs with following code:

      using UnityEngine;
      using System.Collections;

      public class Timed : MonoBehaviour
      {
      public float m_fDestruktionSpeed = 0.1f;
      public Material m_Mat;
      public float m_fTime;

      void Start ()
      {
      m_Mat = GetComponent ().material;
      }

      void Update ()
      {
      m_fTime += Time.deltaTime * m_fDestruktionSpeed;
      if (m_fTime >= 1.5f)
      m_fTime = 0;
      m_Mat.SetFloat (“_Amount”, m_fTime);
      }
      }

      Or you could have selected API update Yes when importing the asset. Unity5 would have made the changes by itself. I’m gonna update the package soon. Thanks for reporting!

      Cheers and have fun with it

      1. Hey! Thank you for getting back to me, but there is still an error after I changed the rimed script:

        Assets/DissolveShader/DemoSzene/Timed.cs(20,33): error CS1525: Unexpected symbol `’

        And when i load the demo scene, the objects are all pink. Thanks for the assist!

      2. Alright, thanks to the guys in the unity forums i know the fix, it isnt the timed.cs script, its both of the shaders that need to be changed, just one line of code:

        Under GDPROGRAM

        #pragma exclude_renderers d3d9

  3. Any chance you can get this working for Android? It wasn’t made clear that it wasn’t suitable for Android. Not everyone is an expert on which shaders will work only on certain platforms!

    1. I’m sorry i was under the Impression that it should work on Android aswell! I’ll take a look at this soon! Which device and android version are you talking about?

      1. I guess apologies may be in order. My current project was set for Android and using OpenGLES2. It seems DX11 is necessary for the shader to work. Opening a new project set to Android and installing your demo scenes work perfectly – still learning.

      2. No DX11 definitely is not necessary i originally made the shader on dx9 and OpenGL3 and i it worked on IOS … but i can’t remember the last time i tried on Android sorry for that … i hope i have time for that today or tomorrow! But don’t worry i’ll provide you with a working version for Android soon!

  4. Just to clarify. I had, at some point, set Unity to emulate Open GL ES 2.0. (Edit>Graphics Emulation>Open GL ES 2.0.
    After setting this back to ‘No Emulation’ your demo scenes work perfectly. Apologies! Perhaps this may be useful to someone else (hoping it will be – to save me further embarrassment!)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s